1// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4//
5// Sync protocol datatype extension for history delete directives.
6
7// If you change or add any fields in this file, update proto_visitors.h and
8// potentially proto_enum_conversions.{h, cc}.
9
10syntax = "proto2";
11
12option java_multiple_files = true;
13option java_package = "org.chromium.components.sync.protocol";
14
15option optimize_for = LITE_RUNTIME;
16
17package sync_pb;
18
19// All timestamps below are from Sane Time (
20// http://www.chromium.org/developers/design-documents/sane-time )
21// and are in microseconds since the Unix epoch.
22
23// Properties of history delete directive sync objects.
24message HistoryDeleteDirectiveSpecifics {
25  // Exactly one of the fields below must be filled in.  Otherwise, this
26  // delete directive must be ignored.
27  optional GlobalIdDirective global_id_directive = 1;
28  optional TimeRangeDirective time_range_directive = 2;
29  optional UrlDirective url_directive = 3;
30}
31
32message GlobalIdDirective {
33  // The global IDs of the navigations to delete.
34  repeated int64 global_id = 1;
35
36  // Time range for searching for navigations to delete. Client should delete
37  // all navigations to a URL between [start_time_usec, end_time_usec]
38  // if one of them matches a |global_id|.
39  optional int64 start_time_usec = 2;
40  optional int64 end_time_usec = 3;
41}
42
43message TimeRangeDirective {
44  // Both fields below must be filled in.  Otherwise, this delete directive
45  // must be ignored.
46
47  // The time on or after which entries must be deleted.
48  optional int64 start_time_usec = 1;
49  // The time on or before which entries must be deleted.
50  optional int64 end_time_usec = 2;
51}
52
53message UrlDirective {
54  // Both fields below must be filled in.  Otherwise, this delete directive
55  // must be ignored.
56
57  // The URL that should be removed from history.
58  optional string url = 1;
59
60  // The time on or before which entries must be deleted.
61  // In microseconds since the Unix epoch.
62  optional int64 end_time_usec = 2;
63}
64