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.cc

Issue 645043003: Cleanup: Prevent usage of various extension headers when extensions support is not compiled in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 months 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
« no previous file with comments | « no previous file | chrome/browser/chrome_notification_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/shortcuts_backend.cc
diff --git a/chrome/browser/autocomplete/shortcuts_backend.cc b/chrome/browser/autocomplete/shortcuts_backend.cc
index dda7c5b9a0ee3cd0ddeb77a72d0f508955abd85c..62ebaf53b15312c841f7830ff14f102245a261dd 100644
--- a/chrome/browser/autocomplete/shortcuts_backend.cc
+++ b/chrome/browser/autocomplete/shortcuts_backend.cc
@@ -30,8 +30,11 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+
+#if defined(ENABLE_EXTENSIONS)
#include "extensions/browser/notification_types.h"
#include "extensions/common/extension.h"
+#endif
using content::BrowserThread;
@@ -83,10 +86,12 @@ ShortcutsBackend::ShortcutsBackend(Profile* profile, bool suppress_db)
}
// |profile| can be NULL in tests.
if (profile) {
+#if defined(ENABLE_EXTENSIONS)
notification_registrar_.Add(
this,
extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
content::Source<Profile>(profile));
+#endif
notification_registrar_.Add(
this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
content::Source<Profile>(profile));
@@ -177,6 +182,7 @@ void ShortcutsBackend::Observe(int type,
if (!initialized())
return;
+#if defined(ENABLE_EXTENSIONS)
if (type == extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED) {
// When an extension is unloaded, we want to remove any Shortcuts associated
// with it.
@@ -184,6 +190,7 @@ void ShortcutsBackend::Observe(int type,
details)->extension->url(), false);
return;
}
+#endif
DCHECK_EQ(chrome::NOTIFICATION_HISTORY_URLS_DELETED, type);
const history::URLsDeletedDetails* deleted_details =
« no previous file with comments | « no previous file | chrome/browser/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698