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

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

Issue 2686463003: [Extensions] Fix a data race in ChromeExtensionMessageFilter. (Closed)
Patch Set: [Extensions] Fix a data race in ChromeExtensionMessageFilter. Created 3 years, 10 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
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_INFO_MAP_H_ 5 #ifndef EXTENSIONS_BROWSER_INFO_MAP_H_
6 #define EXTENSIONS_BROWSER_INFO_MAP_H_ 6 #define EXTENSIONS_BROWSER_INFO_MAP_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 12 matching lines...) Expand all
23 class ContentVerifier; 23 class ContentVerifier;
24 class Extension; 24 class Extension;
25 25
26 // Contains extension data that needs to be accessed on the IO thread. It can 26 // Contains extension data that needs to be accessed on the IO thread. It can
27 // be created/destroyed on any thread, but all other methods must be called on 27 // be created/destroyed on any thread, but all other methods must be called on
28 // the IO thread. 28 // the IO thread.
29 class InfoMap : public base::RefCountedThreadSafe<InfoMap> { 29 class InfoMap : public base::RefCountedThreadSafe<InfoMap> {
30 public: 30 public:
31 InfoMap(); 31 InfoMap();
32 32
33 const ExtensionSet& extensions() const { return extensions_; } 33 const ExtensionSet& extensions() const;
34 const ExtensionSet& disabled_extensions() const { 34 const ExtensionSet& disabled_extensions() const;
35 return disabled_extensions_;
36 }
37 35
38 // Information about which extensions are assigned to which render processes. 36 // Information about which extensions are assigned to which render processes.
39 const ProcessMap& process_map() const { return process_map_; } 37 const ProcessMap& process_map() const { return process_map_; }
40 38
41 // Callback for when new extensions are loaded. 39 // Callback for when new extensions are loaded.
42 void AddExtension(const extensions::Extension* extension, 40 void AddExtension(const extensions::Extension* extension,
43 base::Time install_time, 41 base::Time install_time,
44 bool incognito_enabled, 42 bool incognito_enabled,
45 bool notifications_disabled); 43 bool notifications_disabled);
46 44
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 116
119 // Assignment of extensions to renderer processes. 117 // Assignment of extensions to renderer processes.
120 extensions::ProcessMap process_map_; 118 extensions::ProcessMap process_map_;
121 119
122 scoped_refptr<ContentVerifier> content_verifier_; 120 scoped_refptr<ContentVerifier> content_verifier_;
123 }; 121 };
124 122
125 } // namespace extensions 123 } // namespace extensions
126 124
127 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_ 125 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/chrome_extension_message_filter.cc ('k') | extensions/browser/info_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698