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

Unified Diff: chrome/browser/extensions/extension_history_api.h

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_history_api.h
diff --git a/chrome/browser/extensions/extension_history_api.h b/chrome/browser/extensions/extension_history_api.h
index f6ddcdc5de0fea4e499dc836ac859bdca6fd6e97..bb6f55a12d7749e55b6d42aa1f70326e9d5a633b 100644
--- a/chrome/browser/extensions/extension_history_api.h
+++ b/chrome/browser/extensions/extension_history_api.h
@@ -6,10 +6,8 @@
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_
#pragma once
-#include <map>
#include <string>
-#include "base/memory/singleton.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_notifications.h"
@@ -19,18 +17,12 @@
// extension system.
class ExtensionHistoryEventRouter : public NotificationObserver {
public:
- // Single instance of the event router.
- static ExtensionHistoryEventRouter* GetInstance();
+ explicit ExtensionHistoryEventRouter();
+ virtual ~ExtensionHistoryEventRouter();
- // Safe to call multiple times.
void ObserveProfile(Profile* profile);
private:
- friend struct DefaultSingletonTraits<ExtensionHistoryEventRouter>;
-
- ExtensionHistoryEventRouter();
- virtual ~ExtensionHistoryEventRouter();
-
// NotificationObserver::Observe.
virtual void Observe(NotificationType type,
const NotificationSource& source,
@@ -49,10 +41,6 @@ class ExtensionHistoryEventRouter : public NotificationObserver {
// Used for tracking registrations to history service notifications.
NotificationRegistrar registrar_;
- // Registered profiles.
- typedef std::map<uintptr_t, Profile*> ProfileMap;
- ProfileMap profiles_;
-
DISALLOW_COPY_AND_ASSIGN(ExtensionHistoryEventRouter);
};
« no previous file with comments | « chrome/browser/extensions/extension_cookies_api.cc ('k') | chrome/browser/extensions/extension_history_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698