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

Unified Diff: extensions/browser/api/storage/storage_api_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: Finish renaming profile -> context 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: extensions/browser/api/storage/storage_api_unittest.cc
diff --git a/extensions/browser/api/storage/storage_api_unittest.cc b/extensions/browser/api/storage/storage_api_unittest.cc
index 0d2dc4d41c02bd82ac278c0d3443ab80a55e70a7..e8d309b4e1f42cba569ad29ce8a5c1b30686b250 100644
--- a/extensions/browser/api/storage/storage_api_unittest.cc
+++ b/extensions/browser/api/storage/storage_api_unittest.cc
@@ -5,6 +5,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/stringprintf.h"
#include "content/public/test/test_browser_context.h"
#include "extensions/browser/api/extensions_api_client.h"
@@ -29,14 +30,14 @@ namespace extensions {
namespace {
// Caller owns the returned object.
-KeyedService* CreateStorageFrontendForTesting(
+scoped_ptr<KeyedService> CreateStorageFrontendForTesting(
content::BrowserContext* context) {
return StorageFrontend::CreateForTesting(new LeveldbSettingsStorageFactory(),
context);
}
-KeyedService* BuildEventRouter(content::BrowserContext* profile) {
- return new extensions::EventRouter(profile, nullptr);
+scoped_ptr<KeyedService> BuildEventRouter(content::BrowserContext* context) {
+ return make_scoped_ptr(new extensions::EventRouter(context, nullptr));
}
} // namespace
« no previous file with comments | « extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc ('k') | extensions/browser/api/storage/storage_frontend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698