Skip to content

Commit

Permalink
Linux: change protobuf default option to allow building
Browse files Browse the repository at this point in the history
with unpatched system protobuf.

This is a preparation for landing https://codereview.chromium.org/11231046/
and a solution chosen because our custom protobuf changes will not
be accepted upstream.

Setting defaults to optimize for lite runtime and retain unknown fields
makes it possible to use the same .proto files with system protobuf.

BUG=157155
TEST=none

Review URL: https://codereview.chromium.org/11228038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166534 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
phajdan.jr@chromium.org committed Nov 7, 2012
1 parent 5a24699 commit baefae9
Show file tree
Hide file tree
Showing 66 changed files with 68 additions and 214 deletions.
2 changes: 0 additions & 2 deletions chrome/browser/chromeos/contacts/contact.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package contacts;

// A contact, roughly based on the GData Contact kind:
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/chromeos/drive/drive.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package drive;

// Represents base::PlatformFileInfo.
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/feedback/proto/annotations.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package userfeedback;

import "math.proto";
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/feedback/proto/chrome.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package userfeedback;

// Chrome Browser and Chrome OS specific data.
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/feedback/proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package userfeedback;

// Data present in all kinds of feedbacks, regardless of source (Web, Android,
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/feedback/proto/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package userfeedback;

// Product for which feedback can be sent: GMail, Writely etc.
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/feedback/proto/dom.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package userfeedback;

// Data captured from HTMLDocument DOM object.
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/feedback/proto/extension.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package userfeedback;

import "common.proto";
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/feedback/proto/math.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package userfeedback;

// 2D Dimensions.
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/feedback/proto/web.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ syntax = "proto2";

package userfeedback;

option optimize_for = LITE_RUNTIME;

// Data present in Web related feedbacks

import "annotations.proto";
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/history/in_memory_url_index_cache.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package in_memory_url_index;

message InMemoryURLIndexCacheItem {
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/metrics/proto/study.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package chrome_variations;

// This defines the Protocol Buffer representation of a Chrome Variations study
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/metrics/proto/trials_seed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package chrome_variations;

import "study.proto";
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/net/cert_logger.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ 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
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/policy/proto/chrome_device_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package enterprise_management;

message DevicePolicyRefreshRateProto {
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/policy/proto/device_management_backend.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package enterprise_management;

// Request from device to server to register device.
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/policy/proto/device_management_local.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package enterprise_management;

import "device_management_backend.proto";
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/policy/proto/old_generic_format.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package enterprise_management;

// This file keeps the deprecated GenericNamedValue based format for policies
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/safe_browsing/report.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package safe_browsing;

message ClientMalwareReportRequest {
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/sync_file_system/sync_file_system.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package sync_file_system;

message DriveMetadata {
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/metrics/proto/chrome_experiments.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package metrics;

message ChromeVariations {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package metrics;

import "histogram_event.proto";
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/metrics/proto/histogram_event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package metrics;

// Next tag: 4
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/metrics/proto/omnibox_event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package metrics;

// Next tag: 13
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/metrics/proto/profiler_event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package metrics;


Expand Down
2 changes: 0 additions & 2 deletions chrome/common/metrics/proto/system_profile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package metrics;

// Next tag: 13
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/metrics/proto/user_action_event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package metrics;

// Next tag: 3
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/safe_browsing/client_model.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package safe_browsing;

// This protocol buffer represents a machine learning model that is used in
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/safe_browsing/csd.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package safe_browsing;

message ClientPhishingRequest {
Expand Down
2 changes: 0 additions & 2 deletions chrome/tools/build/generate_policy_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,6 @@ def _WritePolicyConstantSource(template_file_contents, args, opts):
PROTO_HEAD = '''
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package enterprise_management;
message StringList {
Expand Down
1 change: 0 additions & 1 deletion content/browser/speech/proto/google_streaming_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// 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;
Expand Down
4 changes: 1 addition & 3 deletions dbus/test_proto.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
// 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;
}
}
2 changes: 0 additions & 2 deletions remoting/proto/audio.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package remoting;

message AudioPacket {
Expand Down
2 changes: 0 additions & 2 deletions remoting/proto/control.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package remoting.protocol;

message ClientDimensions {
Expand Down
2 changes: 0 additions & 2 deletions remoting/proto/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package remoting.protocol;

// Defines a keyboard event.
Expand Down
2 changes: 0 additions & 2 deletions remoting/proto/internal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ 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.
Expand Down
2 changes: 0 additions & 2 deletions remoting/proto/mux.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package remoting.protocol;

message MultiplexPacket {
Expand Down
2 changes: 0 additions & 2 deletions remoting/proto/video.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package remoting;

message VideoPacketFormat {
Expand Down
3 changes: 0 additions & 3 deletions sync/protocol/app_notification_specifics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;
option retain_unknown_fields = true;

package sync_pb;

// Properties of an app notification.
Expand Down
3 changes: 0 additions & 3 deletions sync/protocol/app_setting_specifics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;
option retain_unknown_fields = true;

package sync_pb;

import "extension_setting_specifics.proto";
Expand Down
3 changes: 0 additions & 3 deletions sync/protocol/app_specifics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;
option retain_unknown_fields = true;

package sync_pb;

import "extension_specifics.proto";
Expand Down
3 changes: 0 additions & 3 deletions sync/protocol/autofill_specifics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;
option retain_unknown_fields = true;

package sync_pb;

// Properties of autofill sync objects.
Expand Down
3 changes: 0 additions & 3 deletions sync/protocol/bookmark_specifics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

syntax = "proto2";

option optimize_for = LITE_RUNTIME;
option retain_unknown_fields = true;

package sync_pb;

// Properties of bookmark sync objects.
Expand Down
Loading

0 comments on commit baefae9

Please sign in to comment.