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

Unified Diff: chrome/browser/extensions/extension_cookies_api.cc

Issue 7243012: Change many extension event routers to not be singletons and to be more profile-aware. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bookmark remove observer Created 9 years, 6 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
Index: chrome/browser/extensions/extension_cookies_api.cc
diff --git a/chrome/browser/extensions/extension_cookies_api.cc b/chrome/browser/extensions/extension_cookies_api.cc
index 83c535db7c6e5e2f117f585fd4e0037a51475194..a7915b4ebcba47fbc4ca35b7b381164b5138c716 100644
--- a/chrome/browser/extensions/extension_cookies_api.cc
+++ b/chrome/browser/extensions/extension_cookies_api.cc
@@ -25,16 +25,18 @@
namespace keys = extension_cookies_api_constants;
-// static
-ExtensionCookiesEventRouter* ExtensionCookiesEventRouter::GetInstance() {
- return Singleton<ExtensionCookiesEventRouter>::get();
-}
+ExtensionCookiesEventRouter::ExtensionCookiesEventRouter() {}
+
+ExtensionCookiesEventRouter::~ExtensionCookiesEventRouter() {}
-void ExtensionCookiesEventRouter::Init() {
+void ExtensionCookiesEventRouter::ObserveProfile(Profile* profile) {
if (registrar_.IsEmpty()) {
registrar_.Add(this,
NotificationType::COOKIE_CHANGED,
- NotificationService::AllSources());
+ Source<Profile>(profile));
+ registrar_.Add(this,
+ NotificationType::COOKIE_CHANGED,
+ Source<Profile>(profile->GetOffTheRecordProfile()));
}
}
« no previous file with comments | « chrome/browser/extensions/extension_cookies_api.h ('k') | chrome/browser/extensions/extension_history_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698