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

Unified Diff: chrome/browser/extensions/settings/settings_test_util.cc

Issue 8539037: Extension Settings API: make it so that when changes received from Sync fail to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments, sync Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/settings/settings_test_util.cc
diff --git a/chrome/browser/extensions/settings/settings_test_util.cc b/chrome/browser/extensions/settings/settings_test_util.cc
index 11eb12f9d8e7fa230d8ee5b5f542d53cd0022d88..cc7fca12b8d02aea8a26aa4e91f57f581c364093 100644
--- a/chrome/browser/extensions/settings/settings_test_util.cc
+++ b/chrome/browser/extensions/settings/settings_test_util.cc
@@ -27,6 +27,8 @@ SettingsStorage* GetStorage(
return storage;
}
+// MockExtensionService
+
MockExtensionService::MockExtensionService() {}
MockExtensionService::~MockExtensionService() {}
@@ -73,6 +75,8 @@ void MockExtensionService::AddExtension(
DCHECK(error.empty());
}
+// MockProfile
+
MockProfile::MockProfile(const FilePath& file_path)
: TestingProfile(file_path) {
event_router_.reset(new ExtensionEventRouter(this));
@@ -94,6 +98,25 @@ ExtensionEventRouter* MockProfile::GetExtensionEventRouter() {
return event_router_.get();
}
+// ScopedSettingsFactory
+
+ScopedSettingsStorageFactory::ScopedSettingsStorageFactory(
+ SettingsStorageFactory* delegate) : delegate_(delegate) {
+ DCHECK(delegate);
+}
+
+ScopedSettingsStorageFactory::~ScopedSettingsStorageFactory() {}
+
+void ScopedSettingsStorageFactory::Reset(SettingsStorageFactory* delegate) {
+ DCHECK(delegate);
+ delegate_.reset(delegate);
+}
+
+SettingsStorage* ScopedSettingsStorageFactory::Create(
+ const FilePath& base_path, const std::string& extension_id) {
+ return delegate_->Create(base_path, extension_id);
+}
+
} // namespace settings_test_util
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698