diff options
author | maniscalco@chromium.org <maniscalco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 17:08:36 +0000 |
---|---|---|
committer | maniscalco@chromium.org <maniscalco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 17:08:36 +0000 |
commit | 0229235e3f8734f9cae48748529f68ccbf1d289c (patch) | |
tree | d892127fcd0b23243237cb26bde3f37454921ccc | |
parent | e9da2b7913d6af558ecfe79e769c3db966f548e8 (diff) | |
download | chromium_src-0229235e3f8734f9cae48748529f68ccbf1d289c.zip chromium_src-0229235e3f8734f9cae48748529f68ccbf1d289c.tar.gz chromium_src-0229235e3f8734f9cae48748529f68ccbf1d289c.tar.bz2 |
Include sync.pb.h in sync_data.h.
This change has two parts, including sync.pb.h in sync_data.h, and fixing
gyp dependencies and header includes so that everything still builds.
Include sync.pb.h in sync_data.h in preparation for using AttachmentId
(a protobuf in sync.pb.h) in sync_data.h. A forward declaration is
insufficient because sync_data.h will be getting a typedef for vector<>
of AttachmentId.
Several targets (transitively) depend on sync, however, their dependence
is not properly modeled in gyp. Update dependencies and header includes
so they can "see" sync.pb.h (a generated header) and any headers it
includes.
Without these changes, four targets fail to build:
1. extensions_browser - See extensions/extensions.gyp for the fix. Here's
the compiler error:
In file included from ../../extensions/browser/extension_function.cc:10:
In file included from ../../chrome/browser/extensions/extension_service.h:23:
In file included from ../../chrome/browser/extensions/extension_sync_service.h:12:
In file included from ../../chrome/browser/extensions/app_sync_bundle.h:15:
In file included from ../../chrome/browser/extensions/app_sync_data.h:8:
In file included from ../../chrome/browser/extensions/extension_sync_data.h:11:
In file included from ../../sync/api/sync_change.h:13:
../../sync/api/sync_data.h:17:10: fatal error: 'sync/protocol/sync.pb.h' file not found
2. debugger - See chrome/chrome.gyp for the fix. Here's the compiler
error:
In file included from ../../chrome/browser/devtools/browser_list_tabcontents_provider.cc:10:
In file included from ../../chrome/browser/history/top_sites.h:13:
In file included from ../../chrome/browser/history/history_service.h:26:
In file included from ../../chrome/browser/history/delete_directive_handler.h:12:
In file included from ../../sync/api/sync_change_processor.h:10:
../../sync/api/sync_data.h:17:10: fatal error: 'sync/protocol/sync.pb.h' file not found
3. apps - See chrome/chrome_browser_extensions.gypi for the fix. Here's
the compiler error:
In file included from ../../apps/app_load_service.cc:12:
In file included from ../../chrome/browser/extensions/extension_service.h:23:
In file included from ../../chrome/browser/extensions/extension_sync_service.h:12:
In file included from ../../chrome/browser/extensions/app_sync_bundle.h:15:
In file included from ../../chrome/browser/extensions/app_sync_data.h:8:
In file included from ../../chrome/browser/extensions/extension_sync_data.h:11:
In file included from ../../sync/api/sync_change.h:13:
../../sync/api/sync_data.h:17:10: fatal error: 'sync/protocol/sync.pb.h' file not found
4. performance_ui_tests - See chrome/chrome_tests.gypi for the fix.
Here's the compiler error:
In file included from ../../chrome/test/perf/generate_profile.cc:19:
In file included from ../../chrome/browser/history/history_service.h:26:
In file included from ../../chrome/browser/history/delete_directive_handler.h:12:
In file included from ../../sync/api/sync_change_processor.h:10:
In file included from ../../sync/api/sync_data.h:17:
gen/protoc_out/sync/protocol/sync.pb.h:9:10: fatal error: 'google/protobuf/stubs/common.h' file not found
BUG=
Review URL: https://codereview.chromium.org/182313002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257666 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/devtools/adb/android_rsa.cc | 2 | ||||
-rw-r--r-- | chrome/browser/devtools/devtools_window.cc | 1 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_disabled_ui.cc | 1 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_service.h | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_service_unittest.cc | 1 | ||||
-rw-r--r-- | chrome/browser/extensions/launch_util.cc | 1 | ||||
-rw-r--r-- | chrome/browser/history/top_sites.h | 2 | ||||
-rw-r--r-- | chrome/browser/sync/test/integration/two_client_apps_sync_test.cc | 1 | ||||
-rw-r--r-- | chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc | 1 | ||||
-rw-r--r-- | chrome/chrome.gyp | 1 | ||||
-rw-r--r-- | chrome/chrome_browser_extensions.gypi | 3 | ||||
-rw-r--r-- | chrome/chrome_tests_unit.gypi | 1 | ||||
-rw-r--r-- | components/password_manager.gypi | 4 | ||||
-rw-r--r-- | sync/api/sync_data.h | 1 |
14 files changed, 18 insertions, 4 deletions
diff --git a/chrome/browser/devtools/adb/android_rsa.cc b/chrome/browser/devtools/adb/android_rsa.cc index 27a52b4..43d308a 100644 --- a/chrome/browser/devtools/adb/android_rsa.cc +++ b/chrome/browser/devtools/adb/android_rsa.cc @@ -6,7 +6,7 @@ #include "base/base64.h" #include "base/memory/scoped_ptr.h" -#include "chrome/browser/prefs/pref_service_syncable.h" +#include "base/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" #include "crypto/rsa_private_key.h" diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc index b07386c..30c3261 100644 --- a/chrome/browser/devtools/devtools_window.cc +++ b/chrome/browser/devtools/devtools_window.cc @@ -26,7 +26,6 @@ #include "chrome/browser/file_select_helper.h" #include "chrome/browser/infobars/confirm_infobar_delegate.h" #include "chrome/browser/infobars/infobar.h" -#include "chrome/browser/prefs/pref_service_syncable.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_tab_helper.h" #include "chrome/browser/themes/theme_properties.h" diff --git a/chrome/browser/extensions/extension_disabled_ui.cc b/chrome/browser/extensions/extension_disabled_ui.cc index 605a012..54446c3 100644 --- a/chrome/browser/extensions/extension_disabled_ui.cc +++ b/chrome/browser/extensions/extension_disabled_ui.cc @@ -4,6 +4,7 @@ #include "chrome/browser/extensions/extension_disabled_ui.h" +#include <bitset> #include <string> #include "base/bind.h" diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h index 5956f48..b832e86 100644 --- a/chrome/browser/extensions/extension_service.h +++ b/chrome/browser/extensions/extension_service.h @@ -19,7 +19,6 @@ #include "base/prefs/pref_change_registrar.h" #include "base/strings/string16.h" #include "chrome/browser/extensions/blacklist.h" -#include "chrome/browser/extensions/extension_sync_service.h" #include "chrome/browser/extensions/pending_extension_manager.h" #include "chrome/common/extensions/extension_constants.h" #include "content/public/browser/devtools_agent_host.h" @@ -63,6 +62,7 @@ class UpdateObserver; using extensions::ExtensionIdSet; namespace syncer { +class ExtensionSyncService; class SyncErrorFactory; } diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index 29da632..4d27e7a 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc @@ -44,6 +44,7 @@ #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_special_storage_policy.h" #include "chrome/browser/extensions/extension_sync_data.h" +#include "chrome/browser/extensions/extension_sync_service.h" #include "chrome/browser/extensions/extension_util.h" #include "chrome/browser/extensions/external_install_ui.h" #include "chrome/browser/extensions/external_policy_loader.h" diff --git a/chrome/browser/extensions/launch_util.cc b/chrome/browser/extensions/launch_util.cc index d24f40e..60b81d18 100644 --- a/chrome/browser/extensions/launch_util.cc +++ b/chrome/browser/extensions/launch_util.cc @@ -7,6 +7,7 @@ #include "base/command_line.h" #include "base/values.h" #include "chrome/browser/extensions/extension_service.h" +#include "chrome/browser/extensions/extension_sync_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/host_desktop.h" #include "chrome/common/chrome_switches.h" diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h index d01af3c..39843f3 100644 --- a/chrome/browser/history/top_sites.h +++ b/chrome/browser/history/top_sites.h @@ -10,9 +10,9 @@ #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "chrome/browser/common/cancelable_request.h" -#include "chrome/browser/history/history_service.h" #include "chrome/browser/history/history_types.h" #include "chrome/common/thumbnail_score.h" +#include "content/public/browser/notification_observer.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/image/image.h" diff --git a/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc b/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc index b99a9a9..31c3251 100644 --- a/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc @@ -4,6 +4,7 @@ #include "base/basictypes.h" #include "chrome/browser/extensions/extension_service.h" +#include "chrome/browser/extensions/extension_sync_service.h" #include "chrome/browser/extensions/launch_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/test/integration/apps_helper.h" diff --git a/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc b/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc index 717add4..6b410e1 100644 --- a/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc +++ b/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc @@ -10,6 +10,7 @@ #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/values.h" +#include "chrome/browser/history/history_service.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/history/top_sites.h" #include "chrome/browser/history/visit_filter.h" diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 602e752..2ac60a5 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -139,6 +139,7 @@ 'chrome_resources.gyp:theme_resources', 'common/extensions/api/api.gyp:chrome_api', '../base/base.gyp:base', + '../base/base.gyp:base_prefs', '../content/content.gyp:content_browser', '../net/net.gyp:http_server', '../net/net.gyp:net', diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi index 7eeaaf8..e4face6 100644 --- a/chrome/chrome_browser_extensions.gypi +++ b/chrome/chrome_browser_extensions.gypi @@ -64,8 +64,11 @@ '..', '<(INTERMEDIATE_DIR)', ], + # This target has header files that include generated header files from + # sync. Give our dependents access to those headers. 'export_dependent_settings': [ '../content/content.gyp:content_browser', + '../sync/sync.gyp:sync', ], 'sources': [ # All .cc, .h, .m, and .mm files under browser/extensions except for diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi index 70259a6d..072ff19 100644 --- a/chrome/chrome_tests_unit.gypi +++ b/chrome/chrome_tests_unit.gypi @@ -34,6 +34,7 @@ '../ui/message_center/message_center.gyp:message_center_test_support', ], 'export_dependent_settings': [ + 'browser', '../base/base.gyp:test_support_base', '../content/content_shell_and_tests.gyp:test_support_content', ], diff --git a/components/password_manager.gypi b/components/password_manager.gypi index cb1c04b..b248d89 100644 --- a/components/password_manager.gypi +++ b/components/password_manager.gypi @@ -78,6 +78,9 @@ 'PASSWORD_MANAGER_ENABLE_SYNC', ], }, + 'export_dependent_settings': [ + '../sync/sync.gyp:sync', + ], 'sources': [ 'password_manager/core/browser/password_syncable_service.cc', 'password_manager/core/browser/password_syncable_service.h', @@ -92,6 +95,7 @@ 'type': 'static_library', 'dependencies': [ 'autofill_core_common', + 'password_manager_core_browser', '../base/base.gyp:base', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', diff --git a/sync/api/sync_data.h b/sync/api/sync_data.h index 43f64f9..92b7c178 100644 --- a/sync/api/sync_data.h +++ b/sync/api/sync_data.h @@ -14,6 +14,7 @@ #include "sync/base/sync_export.h" #include "sync/internal_api/public/base/model_type.h" #include "sync/internal_api/public/util/immutable.h" +#include "sync/protocol/sync.pb.h" namespace sync_pb { class EntitySpecifics; |