diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-08 14:30:41 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-12 13:49:54 +0200 |
commit | ab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch) | |
tree | 498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/third_party/cacheinvalidation | |
parent | 4ce69f7403811819800e7c5ae1318b2647e778d1 (diff) | |
download | qtwebengine-chromium-ab0a50979b9eb4dfa3320eff7e187e41efedf7a9.tar.gz |
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/third_party/cacheinvalidation')
14 files changed, 229 insertions, 76 deletions
diff --git a/chromium/third_party/cacheinvalidation/OWNERS b/chromium/third_party/cacheinvalidation/OWNERS index 3b4e07bba20..de982c8b1e8 100644 --- a/chromium/third_party/cacheinvalidation/OWNERS +++ b/chromium/third_party/cacheinvalidation/OWNERS @@ -3,7 +3,6 @@ # These are current and former members of the Sync team who have the most # knowledge and experience with the cacheinvalidation library. -akalin@chromium.org dcheng@chromium.org rlarocque@chromium.org tim@chromium.org diff --git a/chromium/third_party/cacheinvalidation/README.chromium b/chromium/third_party/cacheinvalidation/README.chromium index e46639140c8..ce5bb62e964 100644 --- a/chromium/third_party/cacheinvalidation/README.chromium +++ b/chromium/third_party/cacheinvalidation/README.chromium @@ -1,7 +1,7 @@ Name: Google Cache Invalidation API Short Name: google-cache-invalidation-api URL: http://code.google.com/p/google-cache-invalidation-api/ -Version: r307 +Version: r330 License: Apache 2.0 License File: src/google/cacheinvalidation/COPYING Security Critical: no diff --git a/chromium/third_party/cacheinvalidation/cacheinvalidation.gyp b/chromium/third_party/cacheinvalidation/cacheinvalidation.gyp index 5a38bb2d693..568f40220de 100644 --- a/chromium/third_party/cacheinvalidation/cacheinvalidation.gyp +++ b/chromium/third_party/cacheinvalidation/cacheinvalidation.gyp @@ -24,6 +24,8 @@ 'proto_out_dir': '<(proto_dir_relpath)', }, 'sources': [ + '<(proto_in_dir)/android_channel.proto', + '<(proto_in_dir)/channel_common.proto', '<(proto_in_dir)/client.proto', '<(proto_in_dir)/client_gateway.proto', '<(proto_in_dir)/client_protocol.proto', @@ -38,6 +40,17 @@ }, # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [4267, ], + # channel_common.proto contains definition of ANDROID constant which on + # android build conflicts with compiler option -DANDROID. Remove protos + # from android build. + 'conditions': [ + ['OS=="android"', { + 'sources!': [ + '<(proto_in_dir)/android_channel.proto', + '<(proto_in_dir)/channel_common.proto', + ], + }], + ], }, # The main cache invalidation library. External clients should depend # only on this. @@ -193,7 +206,6 @@ '<(proto_in_dir)/android_listener.proto', '<(proto_in_dir)/android_service.proto', '<(proto_in_dir)/android_state.proto', - '<(proto_in_dir)/channel.proto', '<(proto_in_dir)/channel_common.proto', '<(proto_in_dir)/client.proto', '<(proto_in_dir)/client_protocol.proto', @@ -203,12 +215,25 @@ 'includes': [ '../../build/protoc_java.gypi' ], }, { + 'target_name': 'cacheinvalidation_example_proto_java', + 'type': 'none', + 'variables': { + 'cacheinvalidation_in_dir': '../../third_party/cacheinvalidation/src', + 'proto_in_dir' : '<(cacheinvalidation_in_dir)/java/com/google/ipc/invalidation/examples/android2', + }, + 'sources': [ + '<(proto_in_dir)/example_listener.proto', + ], + 'includes': [ '../../build/protoc_java.gypi' ], + }, + { 'target_name': 'cacheinvalidation_javalib', 'type': 'none', 'dependencies': [ '../../third_party/android_tools/android_tools.gyp:android_gcm', '../../third_party/guava/guava.gyp:guava_javalib', 'cacheinvalidation_aidl_javalib', + 'cacheinvalidation_example_proto_java', 'cacheinvalidation_proto_java', ], 'variables': { diff --git a/chromium/third_party/cacheinvalidation/src/example-app-build/AndroidManifest.xml b/chromium/third_party/cacheinvalidation/src/example-app-build/AndroidManifest.xml index 34c71ac1b5f..c2673e9829f 100644 --- a/chromium/third_party/cacheinvalidation/src/example-app-build/AndroidManifest.xml +++ b/chromium/third_party/cacheinvalidation/src/example-app-build/AndroidManifest.xml @@ -10,12 +10,20 @@ blaze-out/gcc-4.X.Y-crosstool-v17-hybrid-grtev3-k8-fastbuild/bin/java/com/google/ipc/invalidation/external/client/contrib/android_listener_manifest/AndroidManifest.xml --> <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="14"/> - <!-- Declare and use permission allowing this application to receive GCM messages. --> + <!-- Declare and use permission allowing this application to receive GCM + messages. --> <permission android:name="com.google.ipc.invalidation.examples.android2.permission.C2D_MESSAGE" android:protectionLevel="signature"/> <uses-permission android:name="com.google.ipc.invalidation.examples.android2.permission.C2D_MESSAGE"/> <application> <!-- Configure the listener class for the application --> <meta-data android:name="ipc.invalidation.ticl.listener_service_class" android:value="com.google.ipc.invalidation.examples.android2.ExampleListener"/> + <!-- To enable background invalidations uncomment the following element: + --> + <!--<meta-data + android:name= + "ipc.invalidation.ticl.background_invalidation_listener_service_class" + android:value= + "com.google.ipc.invalidation.examples.android2.ExampleListener"/>--> <!-- Example activity --> <activity android:name="com.google.ipc.invalidation.examples.android2.MainActivity"> <intent-filter> diff --git a/chromium/third_party/cacheinvalidation/src/example-app-build/generate_protos.sh b/chromium/third_party/cacheinvalidation/src/example-app-build/generate_protos.sh index 7d7e3b11f5c..71b5d8e7831 100755 --- a/chromium/third_party/cacheinvalidation/src/example-app-build/generate_protos.sh +++ b/chromium/third_party/cacheinvalidation/src/example-app-build/generate_protos.sh @@ -18,3 +18,5 @@ TOOL=${PROTOC- `which protoc`} mkdir -p generated-protos/ $TOOL --java_out=generated-protos/ ../proto/* --proto_path=../proto/ +EXAMPLE_PATH=../java/com/google/ipc/invalidation/examples/android2 +$TOOL --java_out=generated-protos/ $EXAMPLE_PATH/example_listener.proto --proto_path=$EXAMPLE_PATH
\ No newline at end of file diff --git a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto new file mode 100644 index 00000000000..1e6a1fbd27a --- /dev/null +++ b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto @@ -0,0 +1,91 @@ +/* + * Copyright 2011 Google Inc. + * + * 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. + */ +// +// The Android delivery service's network endpoint id descriptor. +// This proto is internal to the Android channel. + +syntax = "proto2"; + +option optimize_for = LITE_RUNTIME; + +package ipc.invalidation; + +import "client_protocol.proto"; + +// Defines the valid major versions of the android channel protocol. The +// channel version controls the expected envelope syntax and semantics of +// http and c2dm messages sent between the client and server. +enum MajorVersion { + option allow_alias = true; + + // The initial version of the android channel protocol. Inbound and + // outbound channel packets contained a single binary protocol message only. + INITIAL = 0; + + // Adds batching (multiple protocol messages in a single channel message) + BATCH = 1; + + // The default channel version used by Android clients. Lower major numbers + // will represent earlier versions and higher numbers will represent + // experimental versions that are not yet released. + DEFAULT = 0; + + // The minimum and maximum supported channel major versions. Used to validate + // incoming requests, so update as new versions are added or old versions are + // no longer supported. + MIN_SUPPORTED = 0; + MAX_SUPPORTED = 1; +} + +// An id that specifies how to route a message to a Ticl on an Android device +// via C2DM. +message EndpointId { + // Field 1 was once the ProtocolVersion of this message. + + // The "registration_id" returned when the client registers with c2dm. This + // id is required by c2dm in order to send a message to the device. + optional string c2dm_registration_id = 2; + + // A key identifying a specific client on a device. + optional string client_key = 3; + + // The C2DM sender ID to use to deliver messages to the endpoint. + optional string sender_id = 4 [deprecated = true]; + + // Defines the expected channel version generated by the network endpoint or + // expected in messages sent from the server. + optional Version channel_version = 5; + + // The package name of the Android application that will receive the messages. + // Replaces sender_id. Must be set (unless sender_id is set; in which case it + // must not be set). + optional string package_name = 6; +} + +// A message addressed to a particular Ticl on an Android device. +message AddressedAndroidMessage { + // Client on the device to which the message is destined. + optional string client_key = 1; + + // Message contents (serialized ServerToClientMessage). + optional bytes message = 2; +} + +// A batch of messages addressed to potentially-different Ticls on the same +// Android device. +message AddressedAndroidMessageBatch { + repeated AddressedAndroidMessage addressed_message = 1; +} diff --git a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/channel_common.proto b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/channel_common.proto new file mode 100644 index 00000000000..58e73be28e3 --- /dev/null +++ b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/channel_common.proto @@ -0,0 +1,49 @@ +// Copyright 2011 Google Inc. +// +// 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. +// +// Common utilities used by all channel related protos. +// This is also publicly visible to all channel implementors. + +syntax = "proto2"; + +option optimize_for = LITE_RUNTIME; + +package ipc.invalidation; + +message ChannelMessageEncoding { + // What kind of encoding is used for network_message + enum MessageEncoding { + // Raw proto encoding + PROTOBUF_BINARY_FORMAT = 1; + + // JSPB-encoding: https://sites.google.com/a/google.com/jspblite/Home + PROTOBUF_JSON_FORMAT = 2; + } +} + +message NetworkEndpointId { + enum NetworkAddress { + TEST = 1; // A delivery service for testing + + // Low numbers reserved. + ANDROID = 113; // Android delivery service using c2dm / http. + } + optional NetworkAddress network_address = 1; + optional bytes client_address = 2; + + // Optional. When true, the client is considered offline but the + // client_address is maintained so that the client can potentially be reached. + // When false or undefined, the client is considered online. + optional bool is_offline = 3; +} diff --git a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h index f2adec1cf45..156b4949916 100644 --- a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h +++ b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h @@ -17,6 +17,6 @@ #ifndef INVALIDATION_BUILD_CONSTANTS_H_ #define INVALIDATION_BUILD_CONSTANTS_H_ namespace invalidation { -const int BUILD_DATESTAMP = 20130807; +const int BUILD_DATESTAMP = 20140204; } // namespace invalidation #endif // INVALIDATION_BUILD_CONSTANTS_H_ diff --git a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler_test.cc b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler_test.cc index 7cea036fb21..1ca15685f41 100644 --- a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler_test.cc +++ b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler_test.cc @@ -73,31 +73,6 @@ bool HeaderEqual(const ServerMessageHeader& expected, // A mock of the ProtocolListener interface. class MockProtocolListener : public ProtocolListener { public: - MOCK_METHOD1(HandleIncomingHeader, void(const ServerMessageHeader&)); - - MOCK_METHOD2(HandleTokenChanged, - void(const ServerMessageHeader&, const string&)); - - MOCK_METHOD2( - HandleInvalidations, - void(const ServerMessageHeader&, const RepeatedPtrField<InvalidationP>&)); - - MOCK_METHOD2( - HandleRegistrationStatus, - void(const ServerMessageHeader&, - const RepeatedPtrField<RegistrationStatus>&)); - - MOCK_METHOD1(HandleRegistrationSyncRequest, void(const ServerMessageHeader&)); - - MOCK_METHOD2(HandleInfoMessage, - void(const ServerMessageHeader&, - const RepeatedField<InfoRequestMessage_InfoType>&)); - - MOCK_METHOD3( - HandleErrorMessage, - void(const ServerMessageHeader&, ErrorMessage::Code, - const string&)); - MOCK_METHOD0(HandleMessageSent, void()); MOCK_METHOD1(HandleNetworkStatusChange, void(bool)); // NOLINT diff --git a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/types.proto b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/types.proto index 87a08404cea..f953b790054 100644 --- a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/types.proto +++ b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/types.proto @@ -31,6 +31,8 @@ message ClientType { CHROME_SYNC = 1004; CHROME_SYNC_ANDROID = 1018; CHROME_SYNC_IOS = 1038; + CHROME_SYNC_GCM_DESKTOP = 1055; + CHROME_SYNC_GCM_IOS = 1056; } optional Type type = 1; } diff --git a/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/examples/android2/example_listener.proto b/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/examples/android2/example_listener.proto new file mode 100644 index 00000000000..e9a01ba8f2c --- /dev/null +++ b/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/examples/android2/example_listener.proto @@ -0,0 +1,31 @@ +syntax = "proto2"; +package ipc.invalidation.examples.android2; +option java_package = "com.google.ipc.invalidation.examples.android2"; +option java_outer_classname = "ExampleListenerProto"; +option optimize_for = LITE_RUNTIME; + +// Persistent state for the example listener. +message ExampleListenerStateProto { + + message ObjectIdProto { + optional int32 source = 1; + optional bytes name = 2; + } + + // State related to a particular object being tracked by the listener. See + // ExampleListenerState#ObjectState for information on fields. + message ObjectStateProto { + optional ObjectIdProto object_id = 1; + optional bool is_registered = 2; + optional bytes payload = 3; + optional int64 highest_version = 4; + optional int64 invalidation_time_millis = 5; + optional bool is_background = 6; + } + + // List of objects for which state is being tracked. + repeated ObjectStateProto object_state = 1; + + // (Optional) client id passed to the listener in ready() call. + optional bytes client_id = 2; +} diff --git a/chromium/third_party/cacheinvalidation/src/proto/android_channel.proto b/chromium/third_party/cacheinvalidation/src/proto/android_channel.proto index 9ff9f328a3c..e5d47323930 100644 --- a/chromium/third_party/cacheinvalidation/src/proto/android_channel.proto +++ b/chromium/third_party/cacheinvalidation/src/proto/android_channel.proto @@ -35,7 +35,6 @@ import "client_protocol.proto"; // channel version controls the expected envelope syntax and semantics of // http and c2dm messages sent between the client and server. enum MajorVersion { - // The initial version of the android channel protocol. Inbound and // outbound channel packets contained a single binary protocol message only. diff --git a/chromium/third_party/cacheinvalidation/src/proto/channel.proto b/chromium/third_party/cacheinvalidation/src/proto/channel.proto deleted file mode 100644 index 131faa65577..00000000000 --- a/chromium/third_party/cacheinvalidation/src/proto/channel.proto +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 Google Inc. - * - * 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. - */ -// -// Specification of the messages between registrar and gateway. -// -// TODO: Merge channel.proto and channel_server.proto -// to one file and rename it to registrar_gateway.proto - -syntax = "proto2"; - -package com.google.protos.ipc.invalidation; - -option optimize_for = LITE_RUNTIME; - -option java_outer_classname = "Channel"; - - - - - - -message NetworkEndpointId { - enum NetworkAddress { - TEST = 1; // A delivery service for testing - - // Low numbers reserved. - ANDROID = 113; // Android delivery service using c2dm / http. - LCS = 114; // Lightweight connection service (Marmoset) channel. - } - optional NetworkAddress network_address = 1; - optional bytes client_address = 2; -} diff --git a/chromium/third_party/cacheinvalidation/src/proto/channel_common.proto b/chromium/third_party/cacheinvalidation/src/proto/channel_common.proto index 9e79888201a..4623bc0859e 100644 --- a/chromium/third_party/cacheinvalidation/src/proto/channel_common.proto +++ b/chromium/third_party/cacheinvalidation/src/proto/channel_common.proto @@ -36,3 +36,20 @@ message ChannelMessageEncoding { } } + +message NetworkEndpointId { + enum NetworkAddress { + TEST = 1; // A delivery service for testing + + // Low numbers reserved. + ANDROID = 113; // Android delivery service using c2dm / http. + LCS = 114; // Lightweight connection service () channel. + } + optional NetworkAddress network_address = 1; + optional bytes client_address = 2; + + // Optional. When true, the client is considered offline but the + // client_address is maintained so that the client can potentially be reached. + // When false or undefined, the client is considered online. + optional bool is_offline = 3; +} |