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

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

Issue 17038002: Separate the NTP app ordering from the app list app ordering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework + fix tests Created 7 years, 4 months 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 (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>
11 11
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/extensions/blacklist.h" 16 #include "chrome/browser/extensions/blacklist.h"
17 #include "chrome/browser/extensions/extension_scoped_prefs.h" 17 #include "chrome/browser/extensions/extension_scoped_prefs.h"
18 #include "chrome/browser/prefs/scoped_user_pref_update.h" 18 #include "chrome/browser/prefs/scoped_user_pref_update.h"
19 #include "chrome/browser/ui/app_list/app_list_extension_sorting.h"
19 #include "chrome/common/extensions/extension.h" 20 #include "chrome/common/extensions/extension.h"
20 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 21 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
21 #include "extensions/common/url_pattern_set.h" 22 #include "extensions/common/url_pattern_set.h"
22 #include "sync/api/string_ordinal.h" 23 #include "sync/api/string_ordinal.h"
23 24
24 class ExtensionPrefValueMap; 25 class ExtensionPrefValueMap;
25 class ExtensionSorting; 26 class ExtensionSorting;
26 class PrefService; 27 class PrefService;
27 class Profile; 28 class Profile;
28 29
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } 482 }
482 483
483 // The underlying PrefService. 484 // The underlying PrefService.
484 PrefService* pref_service() const { return prefs_; } 485 PrefService* pref_service() const { return prefs_; }
485 486
486 // The underlying ExtensionSorting. 487 // The underlying ExtensionSorting.
487 ExtensionSorting* extension_sorting() const { 488 ExtensionSorting* extension_sorting() const {
488 return extension_sorting_.get(); 489 return extension_sorting_.get();
489 } 490 }
490 491
492 // The ordering of apps in the app list.
493 AppListExtensionSorting* app_list_extension_sorting() const {
494 return app_list_extension_sorting_.get();
495 }
496
491 // Describes the URLs that are able to install extensions. See 497 // Describes the URLs that are able to install extensions. See
492 // prefs::kExtensionAllowedInstallSites for more information. 498 // prefs::kExtensionAllowedInstallSites for more information.
493 URLPatternSet GetAllowedInstallSites(); 499 URLPatternSet GetAllowedInstallSites();
494 500
495 // Schedules garbage collection of an extension's on-disk data on the next 501 // Schedules garbage collection of an extension's on-disk data on the next
496 // start of this ExtensionService. Applies only to extensions with isolated 502 // start of this ExtensionService. Applies only to extensions with isolated
497 // storage. 503 // storage.
498 void SetNeedsStorageGarbageCollection(bool value); 504 void SetNeedsStorageGarbageCollection(bool value);
499 bool NeedsStorageGarbageCollection(); 505 bool NeedsStorageGarbageCollection();
500 506
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // Base extensions install directory. 620 // Base extensions install directory.
615 base::FilePath install_directory_; 621 base::FilePath install_directory_;
616 622
617 // Weak pointer, owned by Profile. 623 // Weak pointer, owned by Profile.
618 ExtensionPrefValueMap* extension_pref_value_map_; 624 ExtensionPrefValueMap* extension_pref_value_map_;
619 625
620 // Contains all the logic for handling the order for various extension 626 // Contains all the logic for handling the order for various extension
621 // properties. 627 // properties.
622 scoped_ptr<ExtensionSorting> extension_sorting_; 628 scoped_ptr<ExtensionSorting> extension_sorting_;
623 629
630 scoped_ptr<AppListExtensionSorting> app_list_extension_sorting_;
631
624 scoped_refptr<ContentSettingsStore> content_settings_store_; 632 scoped_refptr<ContentSettingsStore> content_settings_store_;
625 633
626 scoped_ptr<TimeProvider> time_provider_; 634 scoped_ptr<TimeProvider> time_provider_;
627 635
628 bool extensions_disabled_; 636 bool extensions_disabled_;
629 637
630 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 638 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
631 }; 639 };
632 640
633 } // namespace extensions 641 } // namespace extensions
634 642
635 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 643 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698