OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSION_PREFS_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 bool value); | 340 bool value); |
341 | 341 |
342 // Returns true if the extension notification code has already run for the | 342 // Returns true if the extension notification code has already run for the |
343 // first time for this profile. Currently we use this flag to mean that any | 343 // first time for this profile. Currently we use this flag to mean that any |
344 // extensions that would trigger notifications should get silently | 344 // extensions that would trigger notifications should get silently |
345 // acknowledged. This is a fuse. Calling it the first time returns false. | 345 // acknowledged. This is a fuse. Calling it the first time returns false. |
346 // Subsequent calls return true. It's not possible through an API to ever | 346 // Subsequent calls return true. It's not possible through an API to ever |
347 // reset it. Don't call it unless you mean it! | 347 // reset it. Don't call it unless you mean it! |
348 bool SetAlertSystemFirstRun(); | 348 bool SetAlertSystemFirstRun(); |
349 | 349 |
350 // Checks if extensions are blacklisted by default, by policy. | |
351 // The ManagementPolicy::Provider methods also take this into account, and | |
352 // should be used instead when the extension ID is known. | |
353 bool ExtensionsBlacklistedByDefault() const; | |
354 | |
355 // Returns the last value set via SetLastPingDay. If there isn't such a | 350 // Returns the last value set via SetLastPingDay. If there isn't such a |
356 // pref, the returned Time will return true for is_null(). | 351 // pref, the returned Time will return true for is_null(). |
357 base::Time LastPingDay(const std::string& extension_id) const; | 352 base::Time LastPingDay(const std::string& extension_id) const; |
358 | 353 |
359 // The time stored is based on the server's perspective of day start time, not | 354 // The time stored is based on the server's perspective of day start time, not |
360 // the client's. | 355 // the client's. |
361 void SetLastPingDay(const std::string& extension_id, const base::Time& time); | 356 void SetLastPingDay(const std::string& extension_id, const base::Time& time); |
362 | 357 |
363 // Similar to the 2 above, but for the extensions blacklist. | 358 // Similar to the 2 above, but for the extensions blacklist. |
364 base::Time BlacklistLastPingDay() const; | 359 base::Time BlacklistLastPingDay() const; |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 bool extensions_disabled_; | 712 bool extensions_disabled_; |
718 | 713 |
719 ObserverList<ExtensionPrefsObserver> observer_list_; | 714 ObserverList<ExtensionPrefsObserver> observer_list_; |
720 | 715 |
721 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 716 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
722 }; | 717 }; |
723 | 718 |
724 } // namespace extensions | 719 } // namespace extensions |
725 | 720 |
726 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 721 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
OLD | NEW |