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

Unified Diff: chrome/browser/sync/sessions/notification_service_sessions_router.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 | « chrome/browser/sync/glue/extensions_activity_monitor.cc ('k') | chrome/browser/ui/webui/policy_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sessions/notification_service_sessions_router.cc
diff --git a/chrome/browser/sync/sessions/notification_service_sessions_router.cc b/chrome/browser/sync/sessions/notification_service_sessions_router.cc
index 9eb943fae16b01141ce7db4fbf73d5ce21a58634..574866ae338b7fef6a62cc07e3c476f01128f9df 100644
--- a/chrome/browser/sync/sessions/notification_service_sessions_router.cc
+++ b/chrome/browser/sync/sessions/notification_service_sessions_router.cc
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -26,6 +25,10 @@
#include "chrome/browser/supervised_user/supervised_user_service_factory.h"
#endif
+#if defined(ENABLE_EXTENSIONS)
+#include "chrome/browser/extensions/tab_helper.h"
+#endif
+
using content::NavigationController;
using content::WebContents;
@@ -37,7 +40,6 @@ NotificationServiceSessionsRouter::NotificationServiceSessionsRouter(
profile_(profile),
flare_(flare),
weak_ptr_factory_(this) {
-
registrar_.Add(this, chrome::NOTIFICATION_TAB_PARENTED,
content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
@@ -48,9 +50,11 @@ NotificationServiceSessionsRouter::NotificationServiceSessionsRouter(
content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::NotificationService::AllSources());
+#if defined(ENABLE_EXTENSIONS)
registrar_.Add(this,
chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED,
content::NotificationService::AllSources());
+#endif
registrar_.Add(this,
content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
content::NotificationService::AllBrowserContextsAndSources());
@@ -109,6 +113,7 @@ void NotificationServiceSessionsRouter::Observe(
return;
break;
}
+#if defined(ENABLE_EXTENSIONS)
case chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED: {
extensions::TabHelper* extension_tab_helper =
content::Source<extensions::TabHelper>(source).ptr();
@@ -127,6 +132,7 @@ void NotificationServiceSessionsRouter::Observe(
}
return;
}
+#endif
default:
LOG(ERROR) << "Received unexpected notification of type " << type;
return;
« no previous file with comments | « chrome/browser/sync/glue/extensions_activity_monitor.cc ('k') | chrome/browser/ui/webui/policy_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698