| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 void AcknowledgeBlacklistedExtension(const std::string& extension_id); | 226 void AcknowledgeBlacklistedExtension(const std::string& extension_id); |
| 227 | 227 |
| 228 // Returns true if the extension notification code has already run for the | 228 // Returns true if the extension notification code has already run for the |
| 229 // first time for this profile. Currently we use this flag to mean that any | 229 // first time for this profile. Currently we use this flag to mean that any |
| 230 // extensions that would trigger notifications should get silently | 230 // extensions that would trigger notifications should get silently |
| 231 // acknowledged. This is a fuse. Calling it the first time returns false. | 231 // acknowledged. This is a fuse. Calling it the first time returns false. |
| 232 // Subsequent calls return true. It's not possible through an API to ever | 232 // Subsequent calls return true. It's not possible through an API to ever |
| 233 // reset it. Don't call it unless you mean it! | 233 // reset it. Don't call it unless you mean it! |
| 234 bool SetAlertSystemFirstRun(); | 234 bool SetAlertSystemFirstRun(); |
| 235 | 235 |
| 236 // The oauth client id used for app notification setup, if any. | |
| 237 std::string GetAppNotificationClientId(const std::string& extension_id) const; | |
| 238 void SetAppNotificationClientId(const std::string& extension_id, | |
| 239 const std::string& oauth_client_id); | |
| 240 | |
| 241 // Whether app notifications are disabled for the given app. | |
| 242 bool IsAppNotificationDisabled(const std::string& extension_id) const; | |
| 243 void SetAppNotificationDisabled(const std::string& extension_id, bool value); | |
| 244 | |
| 245 // Checks if extensions are blacklisted by default, by policy. | 236 // Checks if extensions are blacklisted by default, by policy. |
| 246 // The ManagementPolicy::Provider methods also take this into account, and | 237 // The ManagementPolicy::Provider methods also take this into account, and |
| 247 // should be used instead when the extension ID is known. | 238 // should be used instead when the extension ID is known. |
| 248 bool ExtensionsBlacklistedByDefault() const; | 239 bool ExtensionsBlacklistedByDefault() const; |
| 249 | 240 |
| 250 // Returns the last value set via SetLastPingDay. If there isn't such a | 241 // Returns the last value set via SetLastPingDay. If there isn't such a |
| 251 // pref, the returned Time will return true for is_null(). | 242 // pref, the returned Time will return true for is_null(). |
| 252 base::Time LastPingDay(const std::string& extension_id) const; | 243 base::Time LastPingDay(const std::string& extension_id) const; |
| 253 | 244 |
| 254 // The time stored is based on the server's perspective of day start time, not | 245 // The time stored is based on the server's perspective of day start time, not |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 scoped_refptr<ContentSettingsStore> content_settings_store_; | 654 scoped_refptr<ContentSettingsStore> content_settings_store_; |
| 664 | 655 |
| 665 scoped_ptr<TimeProvider> time_provider_; | 656 scoped_ptr<TimeProvider> time_provider_; |
| 666 | 657 |
| 667 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 658 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 668 }; | 659 }; |
| 669 | 660 |
| 670 } // namespace extensions | 661 } // namespace extensions |
| 671 | 662 |
| 672 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 663 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |