blob: 8ec28af554ac7ff9c5f5632f12f8df92b4fd7a54 [file] [log] [blame]
// Copyright 2018 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option java_package = "dev.cobalt.storage";
option java_outer_classname = "StorageProto";
package cobalt.storage;
// A single cookie representation.
message Cookie {
// The name of the cookie.
string name = 1;
// The value of the cookie.
string value = 2;
// The domain of the url for which the cookie is store.
string domain = 3;
// The path of the url for which the cookie is stored.
string path = 4;
// The creation time for the cookie in microseconds since
// Windows epoch - 1/1/1601 UTC.
int64 creation_time_us = 5;
// The expiration time for the cookie in microseconds since
// Windows epoch - 1/1/1601 UTC.
int64 expiration_time_us = 6;
// The last access time in microseconds since
// Windows epoch - 1/1/1601 UTC.
int64 last_access_time_us = 7;
// Whether the cookie should be transmitted only over secure connection.
// Defaults to false.
bool secure = 8;
// Whether this is an HTTP-only cookie. Defaults to false.
bool http_only = 9;
}
// A single local storage entry.
message LocalStorageEntry {
// The key for the local storage entry.
string key = 1;
// The value of the local storage entry.
string value = 2;
}
// Multiple local storages identified by unique id.
message LocalStorage {
// A site id of the local storage.
string id = 1;
// The local storage entries for individual local storage.
repeated LocalStorageEntry local_storage_entries = 2;
}
// The full storage.
message Storage {
// All the cookies.
repeated Cookie cookies = 1;
// All local storages.
repeated LocalStorage local_storages = 2;
}