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

Side by Side Diff: extensions/browser/process_map.h

Issue 197413002: Move extensions-related files to using //components/keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_PROCESS_MAP_H_ 5 #ifndef EXTENSIONS_BROWSER_PROCESS_MAP_H_
6 #define EXTENSIONS_BROWSER_PROCESS_MAP_H_ 6 #define EXTENSIONS_BROWSER_PROCESS_MAP_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 12 #include "components/keyed_service/core/keyed_service.h"
13 13
14 namespace content { 14 namespace content {
15 class BrowserContext; 15 class BrowserContext;
16 } 16 }
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 // Contains information about which extensions are assigned to which processes. 20 // Contains information about which extensions are assigned to which processes.
21 // 21 //
22 // The relationship between extensions and processes is complex: 22 // The relationship between extensions and processes is complex:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // care about incognito version of this extension (or vice versa if you're in 59 // care about incognito version of this extension (or vice versa if you're in
60 // an incognito profile) then use 60 // an incognito profile) then use
61 // extensions::ProcessManager::GetSiteInstanceForURL()->[Has|Get]Process(). 61 // extensions::ProcessManager::GetSiteInstanceForURL()->[Has|Get]Process().
62 // 62 //
63 // 3. The process ids contained in this class are *not limited* to the Profile 63 // 3. The process ids contained in this class are *not limited* to the Profile
64 // you got this map from. They can also be associated with that profile's 64 // you got this map from. They can also be associated with that profile's
65 // incognito/normal twin. If you care about this, use 65 // incognito/normal twin. If you care about this, use
66 // RenderProcessHost::FromID() and check the profile of the resulting object. 66 // RenderProcessHost::FromID() and check the profile of the resulting object.
67 // 67 //
68 // TODO(aa): The above warnings suggest this class could use improvement :). 68 // TODO(aa): The above warnings suggest this class could use improvement :).
69 class ProcessMap : public BrowserContextKeyedService { 69 class ProcessMap : public KeyedService {
70 public: 70 public:
71 ProcessMap(); 71 ProcessMap();
72 virtual ~ProcessMap(); 72 virtual ~ProcessMap();
73 73
74 // Returns the instance for |browser_context|. An instance is shared between 74 // Returns the instance for |browser_context|. An instance is shared between
75 // an incognito and a regular context. 75 // an incognito and a regular context.
76 static ProcessMap* Get(content::BrowserContext* browser_context); 76 static ProcessMap* Get(content::BrowserContext* browser_context);
77 77
78 size_t size() const { return items_.size(); } 78 size_t size() const { return items_.size(); }
79 79
(...skipping 14 matching lines...) Expand all
94 94
95 typedef std::set<Item> ItemSet; 95 typedef std::set<Item> ItemSet;
96 ItemSet items_; 96 ItemSet items_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(ProcessMap); 98 DISALLOW_COPY_AND_ASSIGN(ProcessMap);
99 }; 99 };
100 100
101 } // namespace extensions 101 } // namespace extensions
102 102
103 #endif // EXTENSIONS_BROWSER_PROCESS_MAP_H_ 103 #endif // EXTENSIONS_BROWSER_PROCESS_MAP_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_system_provider.cc ('k') | extensions/browser/process_map_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698