OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void AcknowledgeOrphanedExtension(const std::string& extension_id); | 164 void AcknowledgeOrphanedExtension(const std::string& extension_id); |
165 | 165 |
166 // Returns true if the extension notification code has already run for the | 166 // Returns true if the extension notification code has already run for the |
167 // first time for this profile. Currently we use this flag to mean that any | 167 // first time for this profile. Currently we use this flag to mean that any |
168 // extensions that would trigger notifications should get silently | 168 // extensions that would trigger notifications should get silently |
169 // acknowledged. This is a fuse. Calling it the first time returns false. | 169 // acknowledged. This is a fuse. Calling it the first time returns false. |
170 // Subsequent calls return true. It's not possible through an API to ever | 170 // Subsequent calls return true. It's not possible through an API to ever |
171 // reset it. Don't call it unless you mean it! | 171 // reset it. Don't call it unless you mean it! |
172 bool SetAlertSystemFirstRun(); | 172 bool SetAlertSystemFirstRun(); |
173 | 173 |
174 // Whether app notifications setup is done for the given app. | 174 // The oauth client id used for app notification setup, if any. |
175 bool IsAppNotificationSetupDone(const std::string& extension_id) const; | 175 std::string GetAppNotificationClientId(const std::string& extension_id) const; |
176 void SetAppNotificationSetupDone(const std::string& extension_id, | 176 void SetAppNotificationClientId(const std::string& extension_id, |
177 bool value); | 177 const std::string& oauth_client_id); |
178 | 178 |
179 // Whether app notifications are disabled for the given app. | 179 // Whether app notifications are disabled for the given app. |
180 bool IsAppNotificationDisabled(const std::string& extension_id) const; | 180 bool IsAppNotificationDisabled(const std::string& extension_id) const; |
181 void SetAppNotificationDisabled(const std::string& extension_id, bool value); | 181 void SetAppNotificationDisabled(const std::string& extension_id, bool value); |
182 | 182 |
183 // Is the extension with |extension_id| allowed by policy (checking both | 183 // Is the extension with |extension_id| allowed by policy (checking both |
184 // whitelist and blacklist). | 184 // whitelist and blacklist). |
185 bool IsExtensionAllowedByPolicy(const std::string& extension_id, | 185 bool IsExtensionAllowedByPolicy(const std::string& extension_id, |
186 Extension::Location location); | 186 Extension::Location location); |
187 | 187 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 527 |
528 // Weak pointer, owned by Profile. | 528 // Weak pointer, owned by Profile. |
529 ExtensionPrefValueMap* extension_pref_value_map_; | 529 ExtensionPrefValueMap* extension_pref_value_map_; |
530 | 530 |
531 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; | 531 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; |
532 | 532 |
533 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 533 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
534 }; | 534 }; |
535 | 535 |
536 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 536 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
OLD | NEW |