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

Unified Diff: extensions/browser/process_map.h

Issue 139943005: Convert extensions::ProcessMap to BrowserContextKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase process_map Created 6 years, 11 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 | « extensions/browser/event_router.cc ('k') | extensions/browser/process_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_map.h
diff --git a/extensions/browser/process_map.h b/extensions/browser/process_map.h
index 780b21a5875822f8b113fff664e9cc4259a2958a..0310651d09dbaeb8dc0edecec457c674e1b531b5 100644
--- a/extensions/browser/process_map.h
+++ b/extensions/browser/process_map.h
@@ -9,6 +9,11 @@
#include <string>
#include "base/basictypes.h"
+#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
+
+namespace content {
+class BrowserContext;
+}
namespace extensions {
@@ -61,10 +66,14 @@ namespace extensions {
// RenderProcessHost::FromID() and check the profile of the resulting object.
//
// TODO(aa): The above warnings suggest this class could use improvement :).
-class ProcessMap {
+class ProcessMap : public BrowserContextKeyedService {
public:
ProcessMap();
- ~ProcessMap();
+ virtual ~ProcessMap();
+
+ // Returns the instance for |browser_context|. An instance is shared between
+ // an incognito and a regular context.
+ static ProcessMap* Get(content::BrowserContext* browser_context);
size_t size() const { return items_.size(); }
@@ -89,6 +98,6 @@ class ProcessMap {
DISALLOW_COPY_AND_ASSIGN(ProcessMap);
};
-} // extensions
+} // namespace extensions
#endif // EXTENSIONS_BROWSER_PROCESS_MAP_H_
« no previous file with comments | « extensions/browser/event_router.cc ('k') | extensions/browser/process_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698