diff options
66 files changed, 214 insertions, 68 deletions
diff --git a/chrome/browser/chromeos/contacts/contact.proto b/chrome/browser/chromeos/contacts/contact.proto index 32d0911..2926b43 100644 --- a/chrome/browser/chromeos/contacts/contact.proto +++ b/chrome/browser/chromeos/contacts/contact.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package contacts; // A contact, roughly based on the GData Contact kind: diff --git a/chrome/browser/chromeos/drive/drive.proto b/chrome/browser/chromeos/drive/drive.proto index 336bbb7..dc1ba44 100644 --- a/chrome/browser/chromeos/drive/drive.proto +++ b/chrome/browser/chromeos/drive/drive.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package drive; // Represents base::PlatformFileInfo. diff --git a/chrome/browser/feedback/proto/annotations.proto b/chrome/browser/feedback/proto/annotations.proto index 8a3d1c4f..d14751a 100644 --- a/chrome/browser/feedback/proto/annotations.proto +++ b/chrome/browser/feedback/proto/annotations.proto @@ -7,6 +7,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package userfeedback; import "math.proto"; diff --git a/chrome/browser/feedback/proto/chrome.proto b/chrome/browser/feedback/proto/chrome.proto index 6a0658a..c721b06 100644 --- a/chrome/browser/feedback/proto/chrome.proto +++ b/chrome/browser/feedback/proto/chrome.proto @@ -4,6 +4,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package userfeedback; // Chrome Browser and Chrome OS specific data. diff --git a/chrome/browser/feedback/proto/common.proto b/chrome/browser/feedback/proto/common.proto index e5cddf8..5e028eb 100644 --- a/chrome/browser/feedback/proto/common.proto +++ b/chrome/browser/feedback/proto/common.proto @@ -7,6 +7,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package userfeedback; // Data present in all kinds of feedbacks, regardless of source (Web, Android, diff --git a/chrome/browser/feedback/proto/config.proto b/chrome/browser/feedback/proto/config.proto index 4344168..f178912 100644 --- a/chrome/browser/feedback/proto/config.proto +++ b/chrome/browser/feedback/proto/config.proto @@ -7,6 +7,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package userfeedback; // Product for which feedback can be sent: GMail, Writely etc. diff --git a/chrome/browser/feedback/proto/dom.proto b/chrome/browser/feedback/proto/dom.proto index c59b1ef..f5d1bc3 100644 --- a/chrome/browser/feedback/proto/dom.proto +++ b/chrome/browser/feedback/proto/dom.proto @@ -7,6 +7,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package userfeedback; // Data captured from HTMLDocument DOM object. diff --git a/chrome/browser/feedback/proto/extension.proto b/chrome/browser/feedback/proto/extension.proto index 72120d5..7feecc0 100644 --- a/chrome/browser/feedback/proto/extension.proto +++ b/chrome/browser/feedback/proto/extension.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package userfeedback; import "common.proto"; diff --git a/chrome/browser/feedback/proto/math.proto b/chrome/browser/feedback/proto/math.proto index 37b7321..6d8d5cb 100644 --- a/chrome/browser/feedback/proto/math.proto +++ b/chrome/browser/feedback/proto/math.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package userfeedback; // 2D Dimensions. diff --git a/chrome/browser/feedback/proto/web.proto b/chrome/browser/feedback/proto/web.proto index c631230..024ef29 100644 --- a/chrome/browser/feedback/proto/web.proto +++ b/chrome/browser/feedback/proto/web.proto @@ -6,6 +6,8 @@ syntax = "proto2"; package userfeedback; +option optimize_for = LITE_RUNTIME; + // Data present in Web related feedbacks import "annotations.proto"; diff --git a/chrome/browser/history/in_memory_url_index_cache.proto b/chrome/browser/history/in_memory_url_index_cache.proto index d357bb5..93e8692 100644 --- a/chrome/browser/history/in_memory_url_index_cache.proto +++ b/chrome/browser/history/in_memory_url_index_cache.proto @@ -10,6 +10,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package in_memory_url_index; message InMemoryURLIndexCacheItem { diff --git a/chrome/browser/metrics/proto/study.proto b/chrome/browser/metrics/proto/study.proto index a755311..4f7c6a8 100644 --- a/chrome/browser/metrics/proto/study.proto +++ b/chrome/browser/metrics/proto/study.proto @@ -4,6 +4,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package chrome_variations; // This defines the Protocol Buffer representation of a Chrome Variations study diff --git a/chrome/browser/metrics/proto/trials_seed.proto b/chrome/browser/metrics/proto/trials_seed.proto index 9486255..9e0249a 100644 --- a/chrome/browser/metrics/proto/trials_seed.proto +++ b/chrome/browser/metrics/proto/trials_seed.proto @@ -4,6 +4,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package chrome_variations; import "study.proto"; diff --git a/chrome/browser/net/cert_logger.proto b/chrome/browser/net/cert_logger.proto index 7370eca..e09ed2a 100644 --- a/chrome/browser/net/cert_logger.proto +++ b/chrome/browser/net/cert_logger.proto @@ -18,6 +18,9 @@ syntax = "proto2"; package chrome_browser_net; +// Chrome requires this. +option optimize_for = LITE_RUNTIME; + // Protocol types message CertLoggerRequest { // The hostname being accessed (required as the cert could be valid for diff --git a/chrome/browser/policy/proto/chrome_device_policy.proto b/chrome/browser/policy/proto/chrome_device_policy.proto index cb4ba04..4b3a77a 100644 --- a/chrome/browser/policy/proto/chrome_device_policy.proto +++ b/chrome/browser/policy/proto/chrome_device_policy.proto @@ -4,6 +4,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package enterprise_management; message DevicePolicyRefreshRateProto { diff --git a/chrome/browser/policy/proto/device_management_backend.proto b/chrome/browser/policy/proto/device_management_backend.proto index a43c53e..0d0cfb9 100644 --- a/chrome/browser/policy/proto/device_management_backend.proto +++ b/chrome/browser/policy/proto/device_management_backend.proto @@ -4,6 +4,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package enterprise_management; // Request from device to server to register device. diff --git a/chrome/browser/policy/proto/device_management_local.proto b/chrome/browser/policy/proto/device_management_local.proto index ac319c2..122e863 100644 --- a/chrome/browser/policy/proto/device_management_local.proto +++ b/chrome/browser/policy/proto/device_management_local.proto @@ -4,6 +4,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package enterprise_management; import "device_management_backend.proto"; diff --git a/chrome/browser/policy/proto/old_generic_format.proto b/chrome/browser/policy/proto/old_generic_format.proto index 4bf28a9..dac2850 100644 --- a/chrome/browser/policy/proto/old_generic_format.proto +++ b/chrome/browser/policy/proto/old_generic_format.proto @@ -4,6 +4,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package enterprise_management; // This file keeps the deprecated GenericNamedValue based format for policies diff --git a/chrome/browser/safe_browsing/report.proto b/chrome/browser/safe_browsing/report.proto index aab3ac6..5e203a7 100644 --- a/chrome/browser/safe_browsing/report.proto +++ b/chrome/browser/safe_browsing/report.proto @@ -16,6 +16,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package safe_browsing; message ClientMalwareReportRequest { diff --git a/chrome/browser/sync_file_system/sync_file_system.proto b/chrome/browser/sync_file_system/sync_file_system.proto index 681ead0..faa91dc 100644 --- a/chrome/browser/sync_file_system/sync_file_system.proto +++ b/chrome/browser/sync_file_system/sync_file_system.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package sync_file_system; message DriveMetadata { diff --git a/chrome/common/metrics/proto/chrome_experiments.proto b/chrome/common/metrics/proto/chrome_experiments.proto index 818df39..74d6703e 100644 --- a/chrome/common/metrics/proto/chrome_experiments.proto +++ b/chrome/common/metrics/proto/chrome_experiments.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package metrics; message ChromeVariations { diff --git a/chrome/common/metrics/proto/chrome_user_metrics_extension.proto b/chrome/common/metrics/proto/chrome_user_metrics_extension.proto index b24bb2d..2547cb5 100644 --- a/chrome/common/metrics/proto/chrome_user_metrics_extension.proto +++ b/chrome/common/metrics/proto/chrome_user_metrics_extension.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package metrics; import "histogram_event.proto"; diff --git a/chrome/common/metrics/proto/histogram_event.proto b/chrome/common/metrics/proto/histogram_event.proto index 0970e24..5da6fbd 100644 --- a/chrome/common/metrics/proto/histogram_event.proto +++ b/chrome/common/metrics/proto/histogram_event.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package metrics; // Next tag: 4 diff --git a/chrome/common/metrics/proto/omnibox_event.proto b/chrome/common/metrics/proto/omnibox_event.proto index bb12aa1..f377800 100644 --- a/chrome/common/metrics/proto/omnibox_event.proto +++ b/chrome/common/metrics/proto/omnibox_event.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package metrics; // Next tag: 13 diff --git a/chrome/common/metrics/proto/profiler_event.proto b/chrome/common/metrics/proto/profiler_event.proto index ea18a61..c42bc5a 100644 --- a/chrome/common/metrics/proto/profiler_event.proto +++ b/chrome/common/metrics/proto/profiler_event.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package metrics; diff --git a/chrome/common/metrics/proto/system_profile.proto b/chrome/common/metrics/proto/system_profile.proto index ff28edb..bf25865 100644 --- a/chrome/common/metrics/proto/system_profile.proto +++ b/chrome/common/metrics/proto/system_profile.proto @@ -7,6 +7,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package metrics; // Next tag: 13 diff --git a/chrome/common/metrics/proto/user_action_event.proto b/chrome/common/metrics/proto/user_action_event.proto index 9801a07..ff688b6 100644 --- a/chrome/common/metrics/proto/user_action_event.proto +++ b/chrome/common/metrics/proto/user_action_event.proto @@ -7,6 +7,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package metrics; // Next tag: 3 diff --git a/chrome/common/safe_browsing/client_model.proto b/chrome/common/safe_browsing/client_model.proto index 863f8eb..6a1a912 100644 --- a/chrome/common/safe_browsing/client_model.proto +++ b/chrome/common/safe_browsing/client_model.proto @@ -14,6 +14,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package safe_browsing; // This protocol buffer represents a machine learning model that is used in diff --git a/chrome/common/safe_browsing/csd.proto b/chrome/common/safe_browsing/csd.proto index 14fb1a7..e139b32 100644 --- a/chrome/common/safe_browsing/csd.proto +++ b/chrome/common/safe_browsing/csd.proto @@ -11,6 +11,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package safe_browsing; message ClientPhishingRequest { diff --git a/chrome/tools/build/generate_policy_source.py b/chrome/tools/build/generate_policy_source.py index 38333aa..6549f50 100755 --- a/chrome/tools/build/generate_policy_source.py +++ b/chrome/tools/build/generate_policy_source.py @@ -279,6 +279,8 @@ def _WritePolicyConstantSource(template_file_contents, args, opts): PROTO_HEAD = ''' syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package enterprise_management; message StringList { diff --git a/content/browser/speech/proto/google_streaming_api.proto b/content/browser/speech/proto/google_streaming_api.proto index b7985d2..314051c 100644 --- a/content/browser/speech/proto/google_streaming_api.proto +++ b/content/browser/speech/proto/google_streaming_api.proto @@ -3,6 +3,7 @@ // found in the LICENSE file. syntax = "proto2"; +option optimize_for = LITE_RUNTIME; // TODO(hans): Commented out due to compilation errors. // option cc_api_version = 2; diff --git a/dbus/test_proto.proto b/dbus/test_proto.proto index 2f5c154..0a1d06f 100644 --- a/dbus/test_proto.proto +++ b/dbus/test_proto.proto @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +option optimize_for = LITE_RUNTIME; + // This is a simple dummy protocol buffer that is used for testing handling of // protocol buffers in MessageReader and MessageWriter. message TestProto { optional string text = 1; optional int32 number = 2; -} +}
\ No newline at end of file diff --git a/remoting/proto/audio.proto b/remoting/proto/audio.proto index b6674c9..dacfb5e 100644 --- a/remoting/proto/audio.proto +++ b/remoting/proto/audio.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package remoting; message AudioPacket { diff --git a/remoting/proto/control.proto b/remoting/proto/control.proto index 951beb6..20f0b9d 100644 --- a/remoting/proto/control.proto +++ b/remoting/proto/control.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package remoting.protocol; message ClientDimensions { diff --git a/remoting/proto/event.proto b/remoting/proto/event.proto index b3769b5..f06618e 100644 --- a/remoting/proto/event.proto +++ b/remoting/proto/event.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package remoting.protocol; // Defines a keyboard event. diff --git a/remoting/proto/internal.proto b/remoting/proto/internal.proto index ed6a295..323b740 100644 --- a/remoting/proto/internal.proto +++ b/remoting/proto/internal.proto @@ -10,6 +10,8 @@ syntax = "proto2"; import "control.proto"; import "event.proto"; +option optimize_for = LITE_RUNTIME; + package remoting.protocol; // Represents a message being sent on the control channel. diff --git a/remoting/proto/mux.proto b/remoting/proto/mux.proto index 1dee362..ff0a8f6 100644 --- a/remoting/proto/mux.proto +++ b/remoting/proto/mux.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package remoting.protocol; message MultiplexPacket { diff --git a/remoting/proto/video.proto b/remoting/proto/video.proto index eff9a77..01c57d4 100644 --- a/remoting/proto/video.proto +++ b/remoting/proto/video.proto @@ -6,6 +6,8 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package remoting; message VideoPacketFormat { diff --git a/sync/protocol/app_notification_specifics.proto b/sync/protocol/app_notification_specifics.proto index 76a9ed0..58436c7 100644 --- a/sync/protocol/app_notification_specifics.proto +++ b/sync/protocol/app_notification_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of an app notification. diff --git a/sync/protocol/app_setting_specifics.proto b/sync/protocol/app_setting_specifics.proto index 03877ce..d936c66 100644 --- a/sync/protocol/app_setting_specifics.proto +++ b/sync/protocol/app_setting_specifics.proto @@ -11,6 +11,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; import "extension_setting_specifics.proto"; diff --git a/sync/protocol/app_specifics.proto b/sync/protocol/app_specifics.proto index d4b31c2..a7f09ec 100644 --- a/sync/protocol/app_specifics.proto +++ b/sync/protocol/app_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; import "extension_specifics.proto"; diff --git a/sync/protocol/autofill_specifics.proto b/sync/protocol/autofill_specifics.proto index 373beef..ac7bc51 100644 --- a/sync/protocol/autofill_specifics.proto +++ b/sync/protocol/autofill_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of autofill sync objects. diff --git a/sync/protocol/bookmark_specifics.proto b/sync/protocol/bookmark_specifics.proto index ac26e2b..31721ab 100644 --- a/sync/protocol/bookmark_specifics.proto +++ b/sync/protocol/bookmark_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of bookmark sync objects. diff --git a/sync/protocol/client_commands.proto b/sync/protocol/client_commands.proto index 845a865..e574255 100644 --- a/sync/protocol/client_commands.proto +++ b/sync/protocol/client_commands.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; message ClientCommand { diff --git a/sync/protocol/client_debug_info.proto b/sync/protocol/client_debug_info.proto index c9eea04..7be62d5 100644 --- a/sync/protocol/client_debug_info.proto +++ b/sync/protocol/client_debug_info.proto @@ -6,6 +6,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; import "get_updates_caller_info.proto"; diff --git a/sync/protocol/device_info_specifics.proto b/sync/protocol/device_info_specifics.proto index 349b8f6..67eb469 100644 --- a/sync/protocol/device_info_specifics.proto +++ b/sync/protocol/device_info_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; import "sync_enums.proto"; diff --git a/sync/protocol/encryption.proto b/sync/protocol/encryption.proto index 471cf9c..202ec33 100644 --- a/sync/protocol/encryption.proto +++ b/sync/protocol/encryption.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Encrypted sync data consists of two parts: a key name and a blob. Key name is diff --git a/sync/protocol/experiments_specifics.proto b/sync/protocol/experiments_specifics.proto index 3c38ac5..adb40a9 100644 --- a/sync/protocol/experiments_specifics.proto +++ b/sync/protocol/experiments_specifics.proto @@ -6,6 +6,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // A flag to enable support for keystore encryption. diff --git a/sync/protocol/extension_setting_specifics.proto b/sync/protocol/extension_setting_specifics.proto index 75b914f..62947c5 100644 --- a/sync/protocol/extension_setting_specifics.proto +++ b/sync/protocol/extension_setting_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of extension setting sync objects. diff --git a/sync/protocol/extension_specifics.proto b/sync/protocol/extension_specifics.proto index d947cc6..e3e1dfb 100644 --- a/sync/protocol/extension_specifics.proto +++ b/sync/protocol/extension_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of extension sync objects. diff --git a/sync/protocol/get_updates_caller_info.proto b/sync/protocol/get_updates_caller_info.proto index 5cecbf5..86fe9c8 100644 --- a/sync/protocol/get_updates_caller_info.proto +++ b/sync/protocol/get_updates_caller_info.proto @@ -4,6 +4,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; message GetUpdatesCallerInfo { diff --git a/sync/protocol/history_delete_directive_specifics.proto b/sync/protocol/history_delete_directive_specifics.proto index 5d2b59a..557de8d 100644 --- a/sync/protocol/history_delete_directive_specifics.proto +++ b/sync/protocol/history_delete_directive_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // All timestamps below are from Sane Time ( diff --git a/sync/protocol/nigori_specifics.proto b/sync/protocol/nigori_specifics.proto index cf9b9d0..c904783 100644 --- a/sync/protocol/nigori_specifics.proto +++ b/sync/protocol/nigori_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; import "encryption.proto"; diff --git a/sync/protocol/password_specifics.proto b/sync/protocol/password_specifics.proto index 064f3e9..769914433 100644 --- a/sync/protocol/password_specifics.proto +++ b/sync/protocol/password_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; import "encryption.proto"; diff --git a/sync/protocol/preference_specifics.proto b/sync/protocol/preference_specifics.proto index 433df4d..4827c5d 100644 --- a/sync/protocol/preference_specifics.proto +++ b/sync/protocol/preference_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of preference sync objects. diff --git a/sync/protocol/search_engine_specifics.proto b/sync/protocol/search_engine_specifics.proto index 7aaf50e..200255b 100644 --- a/sync/protocol/search_engine_specifics.proto +++ b/sync/protocol/search_engine_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of custom search engine sync objects. diff --git a/sync/protocol/session_specifics.proto b/sync/protocol/session_specifics.proto index 086026b..41a6d33 100644 --- a/sync/protocol/session_specifics.proto +++ b/sync/protocol/session_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; import "sync_enums.proto"; diff --git a/sync/protocol/sync.proto b/sync/protocol/sync.proto index 9f8493f..2b564e5 100644 --- a/sync/protocol/sync.proto +++ b/sync/protocol/sync.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; import "app_notification_specifics.proto"; diff --git a/sync/protocol/sync_enums.proto b/sync/protocol/sync_enums.proto index 01d117bf..30921a5 100644 --- a/sync/protocol/sync_enums.proto +++ b/sync/protocol/sync_enums.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; message SyncEnums { diff --git a/sync/protocol/test.proto b/sync/protocol/test.proto index b95dc2b..7453cee 100644 --- a/sync/protocol/test.proto +++ b/sync/protocol/test.proto @@ -6,6 +6,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; message UnknownFieldsTestA { diff --git a/sync/protocol/theme_specifics.proto b/sync/protocol/theme_specifics.proto index 1569d176..f8318e8 100644 --- a/sync/protocol/theme_specifics.proto +++ b/sync/protocol/theme_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of theme sync objects. diff --git a/sync/protocol/typed_url_specifics.proto b/sync/protocol/typed_url_specifics.proto index f1fc566..1f8a4b8 100644 --- a/sync/protocol/typed_url_specifics.proto +++ b/sync/protocol/typed_url_specifics.proto @@ -9,6 +9,9 @@ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option retain_unknown_fields = true; + package sync_pb; // Properties of typed_url sync objects - fields correspond to similarly named diff --git a/third_party/protobuf/README.chromium b/third_party/protobuf/README.chromium index 45ffa2c..3b861c8 100644 --- a/third_party/protobuf/README.chromium +++ b/third_party/protobuf/README.chromium @@ -15,9 +15,7 @@ descriptor2_pb.py A protobuf.gyp file has been added for building with Chromium. This code has been patched to support unknown field retention in protobuf-lite. -See r62331 for the patch. Defaults have been changed to allow building -with unpatched system protobuf: default for optimize_for option is now -LITE_RUNTIME, and default for retain_unknown_fields is true. +See r62331 for the patch. Revision r427 was cherry-picked from upstream. diff --git a/third_party/protobuf/src/google/protobuf/descriptor.pb.cc b/third_party/protobuf/src/google/protobuf/descriptor.pb.cc index 2b2d6b0..7d16080 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor.pb.cc +++ b/third_party/protobuf/src/google/protobuf/descriptor.pb.cc @@ -608,53 +608,53 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() { "e.protobuf.ServiceOptions\"\177\n\025MethodDescr" "iptorProto\022\014\n\004name\030\001 \001(\t\022\022\n\ninput_type\030\002" " \001(\t\022\023\n\013output_type\030\003 \001(\t\022/\n\007options\030\004 \001" - "(\0132\036.google.protobuf.MethodOptions\"\201\004\n\013F" + "(\0132\036.google.protobuf.MethodOptions\"\373\003\n\013F" "ileOptions\022\024\n\014java_package\030\001 \001(\t\022\034\n\024java" "_outer_classname\030\010 \001(\t\022\"\n\023java_multiple_" - "files\030\n \001(\010:\005false\022#\n\025retain_unknown_fie" - "lds\030\013 \001(\010:\004true\022,\n\035java_generate_equals_" - "and_hash\030\024 \001(\010:\005false\022M\n\014optimize_for\030\t " - "\001(\0162).google.protobuf.FileOptions.Optimi" - "zeMode:\014LITE_RUNTIME\022\"\n\023cc_generic_servi" - "ces\030\020 \001(\010:\005false\022$\n\025java_generic_service" - "s\030\021 \001(\010:\005false\022\"\n\023py_generic_services\030\022 " - "\001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003(" - "\0132$.google.protobuf.UninterpretedOption\"" - ":\n\014OptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE\020" - "\002\022\020\n\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\270\001\n\016Messa" - "geOptions\022&\n\027message_set_wire_format\030\001 \001" - "(\010:\005false\022.\n\037no_standard_descriptor_acce" - "ssor\030\002 \001(\010:\005false\022C\n\024uninterpreted_optio" - "n\030\347\007 \003(\0132$.google.protobuf.Uninterpreted" - "Option*\t\010\350\007\020\200\200\200\200\002\"\224\002\n\014FieldOptions\022:\n\005ct" - "ype\030\001 \001(\0162#.google.protobuf.FieldOptions" - ".CType:\006STRING\022\016\n\006packed\030\002 \001(\010\022\031\n\ndeprec" - "ated\030\003 \001(\010:\005false\022\034\n\024experimental_map_ke" - "y\030\t \001(\t\022C\n\024uninterpreted_option\030\347\007 \003(\0132$" - ".google.protobuf.UninterpretedOption\"/\n\005" - "CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PI" - "ECE\020\002*\t\010\350\007\020\200\200\200\200\002\"]\n\013EnumOptions\022C\n\024unint" - "erpreted_option\030\347\007 \003(\0132$.google.protobuf" - ".UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"b\n\020EnumV" - "alueOptions\022C\n\024uninterpreted_option\030\347\007 \003" + "files\030\n \001(\010:\005false\022$\n\025retain_unknown_fie" + "lds\030\013 \001(\010:\005false\022,\n\035java_generate_equals" + "_and_hash\030\024 \001(\010:\005false\022F\n\014optimize_for\030\t" + " \001(\0162).google.protobuf.FileOptions.Optim" + "izeMode:\005SPEED\022\"\n\023cc_generic_services\030\020 " + "\001(\010:\005false\022$\n\025java_generic_services\030\021 \001(" + "\010:\005false\022\"\n\023py_generic_services\030\022 \001(\010:\005f" + "alse\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.go" + "ogle.protobuf.UninterpretedOption\":\n\014Opt" + "imizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE\020\002\022\020\n\014L" + "ITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\270\001\n\016MessageOpti" + "ons\022&\n\027message_set_wire_format\030\001 \001(\010:\005fa" + "lse\022.\n\037no_standard_descriptor_accessor\030\002" + " \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003" "(\0132$.google.protobuf.UninterpretedOption" - "*\t\010\350\007\020\200\200\200\200\002\"`\n\016ServiceOptions\022C\n\024uninter" - "preted_option\030\347\007 \003(\0132$.google.protobuf.U" - "ninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"_\n\rMethodO" - "ptions\022C\n\024uninterpreted_option\030\347\007 \003(\0132$." - "google.protobuf.UninterpretedOption*\t\010\350\007" - "\020\200\200\200\200\002\"\236\002\n\023UninterpretedOption\022;\n\004name\030\002" - " \003(\0132-.google.protobuf.UninterpretedOpti" - "on.NamePart\022\030\n\020identifier_value\030\003 \001(\t\022\032\n" - "\022positive_int_value\030\004 \001(\004\022\032\n\022negative_in" - "t_value\030\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014s" - "tring_value\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001" - "(\t\0323\n\010NamePart\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_" - "extension\030\002 \002(\010\"|\n\016SourceCodeInfo\022:\n\010loc" - "ation\030\001 \003(\0132(.google.protobuf.SourceCode" - "Info.Location\032.\n\010Location\022\020\n\004path\030\001 \003(\005B" - "\002\020\001\022\020\n\004span\030\002 \003(\005B\002\020\001B)\n\023com.google.prot" - "obufB\020DescriptorProtosH\001", 3984); + "*\t\010\350\007\020\200\200\200\200\002\"\224\002\n\014FieldOptions\022:\n\005ctype\030\001 " + "\001(\0162#.google.protobuf.FieldOptions.CType" + ":\006STRING\022\016\n\006packed\030\002 \001(\010\022\031\n\ndeprecated\030\003" + " \001(\010:\005false\022\034\n\024experimental_map_key\030\t \001(" + "\t\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.googl" + "e.protobuf.UninterpretedOption\"/\n\005CType\022" + "\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020\002*" + "\t\010\350\007\020\200\200\200\200\002\"]\n\013EnumOptions\022C\n\024uninterpret" + "ed_option\030\347\007 \003(\0132$.google.protobuf.Unint" + "erpretedOption*\t\010\350\007\020\200\200\200\200\002\"b\n\020EnumValueOp" + "tions\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.g" + "oogle.protobuf.UninterpretedOption*\t\010\350\007\020" + "\200\200\200\200\002\"`\n\016ServiceOptions\022C\n\024uninterpreted" + "_option\030\347\007 \003(\0132$.google.protobuf.Uninter" + "pretedOption*\t\010\350\007\020\200\200\200\200\002\"_\n\rMethodOptions" + "\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.google" + ".protobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002" + "\"\236\002\n\023UninterpretedOption\022;\n\004name\030\002 \003(\0132-" + ".google.protobuf.UninterpretedOption.Nam" + "ePart\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022posit" + "ive_int_value\030\004 \001(\004\022\032\n\022negative_int_valu" + "e\030\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_" + "value\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010" + "NamePart\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extens" + "ion\030\002 \002(\010\"|\n\016SourceCodeInfo\022:\n\010location\030" + "\001 \003(\0132(.google.protobuf.SourceCodeInfo.L" + "ocation\032.\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n" + "\004span\030\002 \003(\005B\002\020\001B)\n\023com.google.protobufB\020" + "DescriptorProtosH\001", 3978); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/protobuf/descriptor.proto", &protobuf_RegisterTypes); FileDescriptorSet::default_instance_ = new FileDescriptorSet(); @@ -4279,9 +4279,9 @@ void FileOptions::SharedCtor() { java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); java_multiple_files_ = false; - retain_unknown_fields_ = true; + retain_unknown_fields_ = false; java_generate_equals_and_hash_ = false; - optimize_for_ = 3; + optimize_for_ = 1; cc_generic_services_ = false; java_generic_services_ = false; py_generic_services_ = false; @@ -4338,9 +4338,9 @@ void FileOptions::Clear() { } } java_multiple_files_ = false; - retain_unknown_fields_ = true; + retain_unknown_fields_ = false; java_generate_equals_and_hash_ = false; - optimize_for_ = 3; + optimize_for_ = 1; cc_generic_services_ = false; java_generic_services_ = false; } @@ -4391,7 +4391,7 @@ bool FileOptions::MergePartialFromCodedStream( break; } - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = LITE_RUNTIME]; + // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; case 9: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { @@ -4428,7 +4428,7 @@ bool FileOptions::MergePartialFromCodedStream( break; } - // optional bool retain_unknown_fields = 11 [default = true]; + // optional bool retain_unknown_fields = 11 [default = false]; case 11: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { @@ -4563,7 +4563,7 @@ void FileOptions::SerializeWithCachedSizes( 8, this->java_outer_classname(), output); } - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = LITE_RUNTIME]; + // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; if (has_optimize_for()) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 9, this->optimize_for(), output); @@ -4574,7 +4574,7 @@ void FileOptions::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output); } - // optional bool retain_unknown_fields = 11 [default = true]; + // optional bool retain_unknown_fields = 11 [default = false]; if (has_retain_unknown_fields()) { ::google::protobuf::internal::WireFormatLite::WriteBool(11, this->retain_unknown_fields(), output); } @@ -4637,7 +4637,7 @@ void FileOptions::SerializeWithCachedSizes( 8, this->java_outer_classname(), target); } - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = LITE_RUNTIME]; + // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; if (has_optimize_for()) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 9, this->optimize_for(), target); @@ -4648,7 +4648,7 @@ void FileOptions::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target); } - // optional bool retain_unknown_fields = 11 [default = true]; + // optional bool retain_unknown_fields = 11 [default = false]; if (has_retain_unknown_fields()) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(11, this->retain_unknown_fields(), target); } @@ -4714,7 +4714,7 @@ int FileOptions::ByteSize() const { total_size += 1 + 1; } - // optional bool retain_unknown_fields = 11 [default = true]; + // optional bool retain_unknown_fields = 11 [default = false]; if (has_retain_unknown_fields()) { total_size += 1 + 1; } @@ -4724,7 +4724,7 @@ int FileOptions::ByteSize() const { total_size += 2 + 1; } - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = LITE_RUNTIME]; + // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; if (has_optimize_for()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for()); diff --git a/third_party/protobuf/src/google/protobuf/descriptor.pb.h b/third_party/protobuf/src/google/protobuf/descriptor.pb.h index aa4dd9f..1f91d79 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor.pb.h +++ b/third_party/protobuf/src/google/protobuf/descriptor.pb.h @@ -1478,7 +1478,7 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { inline bool java_multiple_files() const; inline void set_java_multiple_files(bool value); - // optional bool retain_unknown_fields = 11 [default = true]; + // optional bool retain_unknown_fields = 11 [default = false]; inline bool has_retain_unknown_fields() const; inline void clear_retain_unknown_fields(); static const int kRetainUnknownFieldsFieldNumber = 11; @@ -1492,7 +1492,7 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { inline bool java_generate_equals_and_hash() const; inline void set_java_generate_equals_and_hash(bool value); - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = LITE_RUNTIME]; + // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; inline bool has_optimize_for() const; inline void clear_optimize_for(); static const int kOptimizeForFieldNumber = 9; @@ -4283,7 +4283,7 @@ inline void FileOptions::set_java_multiple_files(bool value) { java_multiple_files_ = value; } -// optional bool retain_unknown_fields = 11 [default = true]; +// optional bool retain_unknown_fields = 11 [default = false]; inline bool FileOptions::has_retain_unknown_fields() const { return (_has_bits_[0] & 0x00000008u) != 0; } @@ -4294,7 +4294,7 @@ inline void FileOptions::clear_has_retain_unknown_fields() { _has_bits_[0] &= ~0x00000008u; } inline void FileOptions::clear_retain_unknown_fields() { - retain_unknown_fields_ = true; + retain_unknown_fields_ = false; clear_has_retain_unknown_fields(); } inline bool FileOptions::retain_unknown_fields() const { @@ -4327,7 +4327,7 @@ inline void FileOptions::set_java_generate_equals_and_hash(bool value) { java_generate_equals_and_hash_ = value; } -// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = LITE_RUNTIME]; +// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; inline bool FileOptions::has_optimize_for() const { return (_has_bits_[0] & 0x00000020u) != 0; } @@ -4338,7 +4338,7 @@ inline void FileOptions::clear_has_optimize_for() { _has_bits_[0] &= ~0x00000020u; } inline void FileOptions::clear_optimize_for() { - optimize_for_ = 3; + optimize_for_ = 1; clear_has_optimize_for(); } inline ::google::protobuf::FileOptions_OptimizeMode FileOptions::optimize_for() const { diff --git a/third_party/protobuf/src/google/protobuf/descriptor.proto b/third_party/protobuf/src/google/protobuf/descriptor.proto index 1f956be..bd3cb96 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor.proto +++ b/third_party/protobuf/src/google/protobuf/descriptor.proto @@ -260,7 +260,7 @@ message FileOptions { // reserializing a message will retain them. This is the default behaviour // unless LITE_RUNTIME is specified. Therefore, this option only makes sense // when LITE_RUNTIME is in use. - optional bool retain_unknown_fields = 11 [default=true]; + optional bool retain_unknown_fields = 11 [default=false]; // If set true, then the Java code generator will generate equals() and // hashCode() methods for all messages defined in the .proto file. This is @@ -275,7 +275,7 @@ message FileOptions { CODE_SIZE = 2; // Use ReflectionOps to implement these methods. LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. } - optional OptimizeMode optimize_for = 9 [default=LITE_RUNTIME]; + optional OptimizeMode optimize_for = 9 [default=SPEED]; |