Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: extensions/browser/extension_prefs.h

Issue 1419823011: app_sorting() calls should go via ExtensionSystem intsead of prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 558
564 // See the Create methods. 559 // See the Create methods.
565 ExtensionPrefs(content::BrowserContext* browser_context, 560 ExtensionPrefs(content::BrowserContext* browser_context,
566 PrefService* prefs, 561 PrefService* prefs,
567 const base::FilePath& root_dir, 562 const base::FilePath& root_dir,
568 ExtensionPrefValueMap* extension_pref_value_map, 563 ExtensionPrefValueMap* extension_pref_value_map,
569 scoped_ptr<TimeProvider> time_provider, 564 scoped_ptr<TimeProvider> time_provider,
570 bool extensions_disabled, 565 bool extensions_disabled,
571 const std::vector<ExtensionPrefsObserver*>& early_observers); 566 const std::vector<ExtensionPrefsObserver*>& early_observers);
572 567
568 // The underlying AppSorting.
569 AppSorting* app_sorting() const;
Dan Beam 2015/11/12 22:37:21 this probably shouldn't be const if AppSorting* is
benwells 2015/11/12 23:33:49 I think it is debatable and rests on whether the E
Dan Beam 2015/11/17 00:28:48 ok
570
573 // Converts absolute paths in the pref to paths relative to the 571 // Converts absolute paths in the pref to paths relative to the
574 // install_directory_. 572 // install_directory_.
575 void MakePathsRelative(); 573 void MakePathsRelative();
576 574
577 // Converts internal relative paths to be absolute. Used for export to 575 // Converts internal relative paths to be absolute. Used for export to
578 // consumers who expect full paths. 576 // consumers who expect full paths.
579 void MakePathsAbsolute(base::DictionaryValue* dict); 577 void MakePathsAbsolute(base::DictionaryValue* dict);
580 578
581 // Helper function used by GetInstalledExtensionInfo() and 579 // Helper function used by GetInstalledExtensionInfo() and
582 // GetDelayedInstallInfo() to construct an ExtensionInfo from the provided 580 // GetDelayedInstallInfo() to construct an ExtensionInfo from the provided
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698