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

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

Issue 83023010: Remove ExtensionPrefs's dependency on ChromeAppSorting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change a LOG(INFO) that i know nothing about to a VLOG(1) Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_APP_SORTING_H_ 5 #ifndef EXTENSIONS_BROWSER_APP_SORTING_H_
6 #define EXTENSIONS_BROWSER_APP_SORTING_H_ 6 #define EXTENSIONS_BROWSER_APP_SORTING_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "chrome/browser/extensions/extension_prefs.h" 11 #include "chrome/browser/extensions/extension_prefs.h"
12 #include "extensions/common/extension.h" 12 #include "extensions/common/extension.h"
13 #include "sync/api/string_ordinal.h" 13 #include "sync/api/string_ordinal.h"
14 14
15 class ExtensionScopedPrefs;
15 class ExtensionSyncService; 16 class ExtensionSyncService;
16 17
17 namespace extensions { 18 namespace extensions {
18 19
19 // An interface that provides a fixed ordering for a set of apps. 20 // An interface that provides a fixed ordering for a set of apps.
20 class AppSorting { 21 class AppSorting {
21 public: 22 public:
22 AppSorting() {} 23 AppSorting() {}
23 virtual ~AppSorting() {} 24 virtual ~AppSorting() {}
24 25
25 // Set up the ExtensionSyncService to inform of changes that require syncing. 26 // Sets the object used to look up preferences. Ownership remains with the
27 // caller.
28 virtual void SetExtensionScopedPrefs(ExtensionScopedPrefs* prefs) = 0;
29
30 // Sets up the ExtensionSyncService to inform of changes that require syncing.
26 virtual void SetExtensionSyncService( 31 virtual void SetExtensionSyncService(
27 ExtensionSyncService* extension_sync_service) = 0; 32 ExtensionSyncService* extension_sync_service) = 0;
28 33
29 // Properly initialize internal values that require |extension_ids|. 34 // Properly initializes internal values that require |extension_ids|.
30 virtual void Initialize(const extensions::ExtensionIdList& extension_ids) = 0; 35 virtual void Initialize(const extensions::ExtensionIdList& extension_ids) = 0;
31 36
32 // Resolves any conflicts the might be created as a result of syncing that 37 // Resolves any conflicts the might be created as a result of syncing that
33 // results in two icons having the same page and app launch ordinal. After 38 // results in two icons having the same page and app launch ordinal. After
34 // this is called it is guaranteed that there are no collisions of NTP icons. 39 // this is called it is guaranteed that there are no collisions of NTP icons.
35 virtual void FixNTPOrdinalCollisions() = 0; 40 virtual void FixNTPOrdinalCollisions() = 0;
36 41
37 // This ensures that the extension has valid ordinals, and if it doesn't then 42 // This ensures that the extension has valid ordinals, and if it doesn't then
38 // properly initialize them. |suggested_page| will be used if it is valid and 43 // properly initialize them. |suggested_page| will be used if it is valid and
39 // the extension has no valid user-set page ordinal. 44 // the extension has no valid user-set page ordinal.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Hidden extensions don't appear in the new tab page. 112 // Hidden extensions don't appear in the new tab page.
108 virtual void MarkExtensionAsHidden(const std::string& extension_id) = 0; 113 virtual void MarkExtensionAsHidden(const std::string& extension_id) = 0;
109 114
110 private: 115 private:
111 DISALLOW_COPY_AND_ASSIGN(AppSorting); 116 DISALLOW_COPY_AND_ASSIGN(AppSorting);
112 }; 117 };
113 118
114 } // namespace extensions 119 } // namespace extensions
115 120
116 #endif // EXTENSIONS_BROWSER_APP_SORTING_H_ 121 #endif // EXTENSIONS_BROWSER_APP_SORTING_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_system.cc ('k') | extensions/browser/extensions_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698