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

Unified Diff: chrome/browser/extensions/test_extension_system.h

Issue 1254363004: Move ownership of AppSorting from ExtensionPrefs to ExtensionSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing include Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/test_extension_system.h
diff --git a/chrome/browser/extensions/test_extension_system.h b/chrome/browser/extensions/test_extension_system.h
index 3605626e6a958939b6ce7b148c7709ba279c2048..cbe45de142a969b9d2aecd9c764db2a55733f1bd 100644
--- a/chrome/browser/extensions/test_extension_system.h
+++ b/chrome/browser/extensions/test_extension_system.h
@@ -16,7 +16,6 @@ class TestingValueStore;
namespace base {
class CommandLine;
class FilePath;
-class Time;
}
namespace content {
@@ -24,11 +23,6 @@ class BrowserContext;
}
namespace extensions {
-class ExtensionPrefs;
-class InstallVerifier;
-class RuntimeData;
-class SharedUserScriptMaster;
-class StandardManagementPolicyProvider;
// Test ExtensionSystem, for use with TestingProfile.
class TestExtensionSystem : public ExtensionSystem {
@@ -39,13 +33,6 @@ class TestExtensionSystem : public ExtensionSystem {
// KeyedService implementation.
void Shutdown() override;
- // Creates an ExtensionPrefs with the testing profile and returns it.
- // Useful for tests that need to modify prefs before creating the
- // ExtensionService.
- scoped_ptr<ExtensionPrefs> CreateExtensionPrefs(
- const base::CommandLine* command_line,
- const base::FilePath& install_directory);
-
// Creates an ExtensionService initialized with the testing profile and
// returns it, and creates ExtensionPrefs if it hasn't been created yet.
ExtensionService* CreateExtensionService(
@@ -66,6 +53,7 @@ class TestExtensionSystem : public ExtensionSystem {
TestingValueStore* value_store() { return value_store_; }
InfoMap* info_map() override;
QuotaService* quota_service() override;
+ AppSorting* app_sorting() override;
const OneShotEvent& ready() const override;
ContentVerifier* content_verifier() override;
scoped_ptr<ExtensionSet> GetDependentExtensions(
@@ -78,6 +66,11 @@ class TestExtensionSystem : public ExtensionSystem {
// Factory method for tests to use with SetTestingProfile.
static scoped_ptr<KeyedService> Build(content::BrowserContext* profile);
+ // Used by ExtensionPrefsTest to re-create the AppSorting after it has
+ // re-created the ExtensionPrefs instance (this can never happen in non-test
+ // code).
+ void RecreateAppSorting();
+
protected:
Profile* profile_;
@@ -90,6 +83,7 @@ class TestExtensionSystem : public ExtensionSystem {
scoped_ptr<ExtensionService> extension_service_;
scoped_refptr<InfoMap> info_map_;
scoped_ptr<QuotaService> quota_service_;
+ scoped_ptr<AppSorting> app_sorting_;
OneShotEvent ready_;
};
« no previous file with comments | « chrome/browser/extensions/test_extension_prefs.cc ('k') | chrome/browser/extensions/test_extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698