Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3417)

Unified Diff: chrome/browser/sync/chrome_sync_client.cc

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/chrome_sync_client.cc
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc
index 2aa52e98db278d8e3dc9bde8f6a0035d5e04c1ca..7551d440fb880e6b2d959b5e04333dc2ca5b0d6d 100644
--- a/chrome/browser/sync/chrome_sync_client.cc
+++ b/chrome/browser/sync/chrome_sync_client.cc
@@ -64,6 +64,7 @@
#include "components/sync_preferences/pref_service_syncable.h"
#include "components/sync_sessions/sync_sessions_client.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/features/features.h"
#include "ui/base/device_form_factor.h"
#if BUILDFLAG(ENABLE_APP_LIST)
@@ -72,7 +73,7 @@
#include "ui/app_list/app_list_switches.h"
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/api/storage/settings_sync_util.h"
#include "chrome/browser/extensions/extension_sync_service.h"
#include "chrome/browser/sync/glue/extension_data_type_controller.h"
@@ -109,7 +110,7 @@
#endif
using content::BrowserThread;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
using browser_sync::ExtensionDataTypeController;
using browser_sync::ExtensionSettingDataTypeController;
#endif
@@ -329,7 +330,7 @@ ChromeSyncClient::GetSyncableServiceForType(syncer::ModelType type) {
}
case syncer::SEARCH_ENGINES:
return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr();
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
case syncer::APPS:
case syncer::EXTENSIONS:
return ExtensionSyncService::Get(profile_)->AsWeakPtr();
@@ -514,7 +515,7 @@ void ChromeSyncClient::RegisterDesktopDataTypes(
base::Closure error_callback =
base::Bind(&syncer::ReportUnrecoverableError, chrome::GetChannel());
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// App sync is enabled by default. Register unless explicitly
// disabled.
if (!disabled_types.Has(syncer::APPS)) {
@@ -550,7 +551,7 @@ void ChromeSyncClient::RegisterDesktopDataTypes(
TemplateURLServiceFactory::GetForProfile(profile_)));
}
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// Extension setting sync is enabled by default. Register unless explicitly
// disabled.
if (!disabled_types.Has(syncer::EXTENSION_SETTINGS)) {

Powered by Google App Engine
This is Rietveld 408576698