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

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

Issue 61323002: Fix broken threading model in CheckDesktopNotificationPermission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more merge conflicts.. Created 7 years, 1 month 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | extensions/browser/info_map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 const ExtensionSet& extensions() const { return extensions_; } 28 const ExtensionSet& extensions() const { return extensions_; }
29 const ExtensionSet& disabled_extensions() const { 29 const ExtensionSet& disabled_extensions() const {
30 return disabled_extensions_; 30 return disabled_extensions_;
31 } 31 }
32 32
33 const extensions::ProcessMap& process_map() const; 33 const extensions::ProcessMap& process_map() const;
34 34
35 // Callback for when new extensions are loaded. 35 // Callback for when new extensions are loaded.
36 void AddExtension(const extensions::Extension* extension, 36 void AddExtension(const extensions::Extension* extension,
37 base::Time install_time, 37 base::Time install_time,
38 bool incognito_enabled); 38 bool incognito_enabled,
39 bool notifications_disabled);
39 40
40 // Callback for when an extension is unloaded. 41 // Callback for when an extension is unloaded.
41 void RemoveExtension(const std::string& extension_id, 42 void RemoveExtension(const std::string& extension_id,
42 const extensions::UnloadedExtensionInfo::Reason reason); 43 const extensions::UnloadedExtensionInfo::Reason reason);
43 44
44 // Returns the time the extension was installed, or base::Time() if not found. 45 // Returns the time the extension was installed, or base::Time() if not found.
45 base::Time GetInstallTime(const std::string& extension_id) const; 46 base::Time GetInstallTime(const std::string& extension_id) const;
46 47
47 // Returns true if the user has allowed this extension to run in incognito 48 // Returns true if the user has allowed this extension to run in incognito
48 // mode. 49 // mode.
(...skipping 29 matching lines...) Expand all
78 extensions::APIPermission::ID permission) 79 extensions::APIPermission::ID permission)
79 const; 80 const;
80 81
81 QuotaService* GetQuotaService(); 82 QuotaService* GetQuotaService();
82 83
83 // Keep track of the signin process, so we can restrict extension access to 84 // Keep track of the signin process, so we can restrict extension access to
84 // it. 85 // it.
85 void SetSigninProcess(int process_id); 86 void SetSigninProcess(int process_id);
86 bool IsSigninProcess(int process_id) const; 87 bool IsSigninProcess(int process_id) const;
87 88
89 // Notifications can be enabled/disabled in real time by the user.
90 void SetNotificationsDisabled(const std::string& extension_id,
91 bool notifications_disabled);
92 bool AreNotificationsDisabled(const std::string& extension_id)
93 const;
94
88 private: 95 private:
89 friend class base::RefCountedThreadSafe<InfoMap>; 96 friend class base::RefCountedThreadSafe<InfoMap>;
90 97
91 // Extra dynamic data related to an extension. 98 // Extra dynamic data related to an extension.
92 struct ExtraData; 99 struct ExtraData;
93 // Map of extension_id to ExtraData. 100 // Map of extension_id to ExtraData.
94 typedef std::map<std::string, ExtraData> ExtraDataMap; 101 typedef std::map<std::string, ExtraData> ExtraDataMap;
95 102
96 ~InfoMap(); 103 ~InfoMap();
97 104
(...skipping 10 matching lines...) Expand all
108 115
109 // Assignment of extensions to processes. 116 // Assignment of extensions to processes.
110 extensions::ProcessMap process_map_; 117 extensions::ProcessMap process_map_;
111 118
112 int signin_process_id_; 119 int signin_process_id_;
113 }; 120 };
114 121
115 } // namespace extensions 122 } // namespace extensions
116 123
117 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_ 124 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | extensions/browser/info_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698