 Chromium Code Reviews
 Chromium Code Reviews Issue 1419823011:
  app_sorting() calls should go via ExtensionSystem intsead of prefs.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1419823011:
  app_sorting() calls should go via ExtensionSystem intsead of prefs.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 // history is cleared. | 504 // history is cleared. | 
| 505 void ClearLastLaunchTimes(); | 505 void ClearLastLaunchTimes(); | 
| 506 | 506 | 
| 507 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 507 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 
| 508 | 508 | 
| 509 bool extensions_disabled() const { return extensions_disabled_; } | 509 bool extensions_disabled() const { return extensions_disabled_; } | 
| 510 | 510 | 
| 511 // The underlying PrefService. | 511 // The underlying PrefService. | 
| 512 PrefService* pref_service() const { return prefs_; } | 512 PrefService* pref_service() const { return prefs_; } | 
| 513 | 513 | 
| 514 // The underlying AppSorting. | |
| 515 // TODO(treib,kalman): This should be private, and all callers should go | |
| 516 // through the ExtensionSystem instead. | |
| 517 AppSorting* app_sorting() const; | |
| 518 | |
| 519 // Schedules garbage collection of an extension's on-disk data on the next | 514 // Schedules garbage collection of an extension's on-disk data on the next | 
| 520 // start of this ExtensionService. Applies only to extensions with isolated | 515 // start of this ExtensionService. Applies only to extensions with isolated | 
| 521 // storage. | 516 // storage. | 
| 522 void SetNeedsStorageGarbageCollection(bool value); | 517 void SetNeedsStorageGarbageCollection(bool value); | 
| 523 bool NeedsStorageGarbageCollection() const; | 518 bool NeedsStorageGarbageCollection() const; | 
| 524 | 519 | 
| 525 // Used by AppWindowGeometryCache to persist its cache. These methods | 520 // Used by AppWindowGeometryCache to persist its cache. These methods | 
| 526 // should not be called directly. | 521 // should not be called directly. | 
| 527 const base::DictionaryValue* GetGeometryCache( | 522 const base::DictionaryValue* GetGeometryCache( | 
| 528 const std::string& extension_id) const; | 523 const std::string& extension_id) const; | 
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 677 // Helper function to complete initialization of the values in | 672 // Helper function to complete initialization of the values in | 
| 678 // |extension_dict| for an extension install. Also see | 673 // |extension_dict| for an extension install. Also see | 
| 679 // PopulateExtensionInfoPrefs(). | 674 // PopulateExtensionInfoPrefs(). | 
| 680 void FinishExtensionInfoPrefs( | 675 void FinishExtensionInfoPrefs( | 
| 681 const std::string& extension_id, | 676 const std::string& extension_id, | 
| 682 const base::Time install_time, | 677 const base::Time install_time, | 
| 683 bool needs_sort_ordinal, | 678 bool needs_sort_ordinal, | 
| 684 const syncer::StringOrdinal& suggested_page_ordinal, | 679 const syncer::StringOrdinal& suggested_page_ordinal, | 
| 685 base::DictionaryValue* extension_dict); | 680 base::DictionaryValue* extension_dict); | 
| 686 | 681 | 
| 682 // The underlying AppSorting. | |
| 683 AppSorting* app_sorting() const; | |
| 
benwells
2015/11/06 01:04:38
Nit: should the .cc be reordered to match?
 
Deepak
2015/11/06 06:13:48
Done.
 | |
| 684 | |
| 687 content::BrowserContext* browser_context_; | 685 content::BrowserContext* browser_context_; | 
| 688 | 686 | 
| 689 // The pref service specific to this set of extension prefs. Owned by the | 687 // The pref service specific to this set of extension prefs. Owned by the | 
| 690 // BrowserContext. | 688 // BrowserContext. | 
| 691 PrefService* prefs_; | 689 PrefService* prefs_; | 
| 692 | 690 | 
| 693 // Base extensions install directory. | 691 // Base extensions install directory. | 
| 694 base::FilePath install_directory_; | 692 base::FilePath install_directory_; | 
| 695 | 693 | 
| 696 // Weak pointer, owned by BrowserContext. | 694 // Weak pointer, owned by BrowserContext. | 
| 697 ExtensionPrefValueMap* extension_pref_value_map_; | 695 ExtensionPrefValueMap* extension_pref_value_map_; | 
| 698 | 696 | 
| 699 scoped_ptr<TimeProvider> time_provider_; | 697 scoped_ptr<TimeProvider> time_provider_; | 
| 700 | 698 | 
| 701 bool extensions_disabled_; | 699 bool extensions_disabled_; | 
| 702 | 700 | 
| 703 base::ObserverList<ExtensionPrefsObserver> observer_list_; | 701 base::ObserverList<ExtensionPrefsObserver> observer_list_; | 
| 704 | 702 | 
| 705 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 703 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 
| 706 }; | 704 }; | 
| 707 | 705 | 
| 708 } // namespace extensions | 706 } // namespace extensions | 
| 709 | 707 | 
| 710 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 708 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 
| OLD | NEW |