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

Unified Diff: chrome/browser/autocomplete/shortcuts_backend_factory.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/autocomplete/shortcuts_backend_factory.cc
diff --git a/chrome/browser/autocomplete/shortcuts_backend_factory.cc b/chrome/browser/autocomplete/shortcuts_backend_factory.cc
index 6f3e42d66e93895b25ebb25586c63323f2e04943..2fb5a4ba12f935b39ed675266ac0b238c08a8133 100644
--- a/chrome/browser/autocomplete/shortcuts_backend_factory.cc
+++ b/chrome/browser/autocomplete/shortcuts_backend_factory.cc
@@ -17,9 +17,10 @@
#include "components/omnibox/browser/shortcuts_constants.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/features/features.h"
namespace {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
const char kShortcutsExtensionsManagerKey[] = "ShortcutsExtensionsManager";
#endif
}
@@ -79,7 +80,7 @@ bool ShortcutsBackendFactory::ServiceIsNULLWhileTesting() const {
void ShortcutsBackendFactory::BrowserContextShutdown(
content::BrowserContext* context) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
context->RemoveUserData(kShortcutsExtensionsManagerKey);
#endif
@@ -98,7 +99,7 @@ scoped_refptr<ShortcutsBackend> ShortcutsBackendFactory::CreateShortcutsBackend(
content::BrowserThread::GetTaskRunnerForThread(
content::BrowserThread::DB),
profile->GetPath().Append(kShortcutsDatabaseName), suppress_db));
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
ShortcutsExtensionsManager* extensions_manager =
new ShortcutsExtensionsManager(profile);
profile->SetUserData(kShortcutsExtensionsManagerKey, extensions_manager);

Powered by Google App Engine
This is Rietveld 408576698