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

Unified Diff: chrome/browser/extensions/api/storage/settings_sync_unittest.cc

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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/api/storage/settings_sync_unittest.cc
diff --git a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
index 100303ef3043b398084a913ce19c951908010219..c0f7656d50030883222d3a7a4467cfaab9f1d217 100644
--- a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
+++ b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
@@ -195,13 +195,13 @@ class TestingValueStoreFactory : public SettingsStorageFactory {
std::map<std::string, TestingValueStore*> created_;
};
-KeyedService* MockExtensionSystemFactoryFunction(
+scoped_ptr<KeyedService> MockExtensionSystemFactoryFunction(
content::BrowserContext* context) {
- return new MockExtensionSystem(context);
+ return make_scoped_ptr(new MockExtensionSystem(context));
}
-KeyedService* BuildEventRouter(content::BrowserContext* profile) {
- return new extensions::EventRouter(profile, nullptr);
+scoped_ptr<KeyedService> BuildEventRouter(content::BrowserContext* profile) {
+ return make_scoped_ptr(new extensions::EventRouter(profile, nullptr));
}
} // namespace
@@ -220,8 +220,8 @@ class ExtensionSettingsSyncTest : public testing::Test {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
profile_.reset(new TestingProfile(temp_dir_.path()));
storage_factory_->Reset(new LeveldbSettingsStorageFactory());
- frontend_.reset(
- StorageFrontend::CreateForTesting(storage_factory_, profile_.get()));
+ frontend_ = StorageFrontend::CreateForTesting(storage_factory_,
+ profile_.get()).Pass();
ExtensionsBrowserClient::Get()
->GetExtensionSystemFactory()

Powered by Google App Engine
This is Rietveld 408576698