OLD | NEW |
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Maps a |file_url| to a |file_path| on the local filesystem, including | 89 // Maps a |file_url| to a |file_path| on the local filesystem, including |
90 // resources in extensions. Returns true on success. See NaClBrowserDelegate | 90 // resources in extensions. Returns true on success. See NaClBrowserDelegate |
91 // for full details. | 91 // for full details. |
92 bool MapUrlToLocalFilePath(const GURL& file_url, | 92 bool MapUrlToLocalFilePath(const GURL& file_url, |
93 bool use_blocking_api, | 93 bool use_blocking_api, |
94 base::FilePath* file_path); | 94 base::FilePath* file_path); |
95 | 95 |
96 // Returns the IO thread QuotaService. Creates the instance on first call. | 96 // Returns the IO thread QuotaService. Creates the instance on first call. |
97 QuotaService* GetQuotaService(); | 97 QuotaService* GetQuotaService(); |
98 | 98 |
99 // Keep track of the signin process, so we can restrict extension access to | |
100 // it. | |
101 void SetSigninProcess(int process_id); | |
102 bool IsSigninProcess(int process_id) const; | |
103 | |
104 // Notifications can be enabled/disabled in real time by the user. | 99 // Notifications can be enabled/disabled in real time by the user. |
105 void SetNotificationsDisabled(const std::string& extension_id, | 100 void SetNotificationsDisabled(const std::string& extension_id, |
106 bool notifications_disabled); | 101 bool notifications_disabled); |
107 bool AreNotificationsDisabled(const std::string& extension_id) const; | 102 bool AreNotificationsDisabled(const std::string& extension_id) const; |
108 | 103 |
109 void SetContentVerifier(ContentVerifier* verifier); | 104 void SetContentVerifier(ContentVerifier* verifier); |
110 ContentVerifier* content_verifier() { return content_verifier_.get(); } | 105 ContentVerifier* content_verifier() { return content_verifier_.get(); } |
111 | 106 |
112 private: | 107 private: |
113 friend class base::RefCountedThreadSafe<InfoMap>; | 108 friend class base::RefCountedThreadSafe<InfoMap>; |
(...skipping 12 matching lines...) Expand all Loading... |
126 ExtraDataMap extra_data_; | 121 ExtraDataMap extra_data_; |
127 | 122 |
128 // Used by dispatchers to limit API quota for individual extensions. | 123 // Used by dispatchers to limit API quota for individual extensions. |
129 // The QuotaService is not thread safe. We need to create and destroy it on | 124 // The QuotaService is not thread safe. We need to create and destroy it on |
130 // the IO thread. | 125 // the IO thread. |
131 scoped_ptr<QuotaService> quota_service_; | 126 scoped_ptr<QuotaService> quota_service_; |
132 | 127 |
133 // Assignment of extensions to renderer processes. | 128 // Assignment of extensions to renderer processes. |
134 extensions::ProcessMap process_map_; | 129 extensions::ProcessMap process_map_; |
135 | 130 |
136 int signin_process_id_; | |
137 | |
138 scoped_refptr<ContentVerifier> content_verifier_; | 131 scoped_refptr<ContentVerifier> content_verifier_; |
139 }; | 132 }; |
140 | 133 |
141 } // namespace extensions | 134 } // namespace extensions |
142 | 135 |
143 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_ | 136 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_ |
OLD | NEW |