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

Unified Diff: chrome/browser/extensions/api/developer_private/developer_private_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: chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc b/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc
index 97ac5c2eab3a3e9efea83f60f3922c3464b14f6e..2b1358797687d57b6134718d1a5a5e620de74e16 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/files/file_util.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/api/developer_private/developer_private_api.h"
#include "chrome/browser/extensions/error_console/error_console.h"
@@ -38,12 +39,13 @@ namespace extensions {
namespace {
-KeyedService* BuildAPI(content::BrowserContext* context) {
- return new DeveloperPrivateAPI(context);
+scoped_ptr<KeyedService> BuildAPI(content::BrowserContext* context) {
+ return make_scoped_ptr(new DeveloperPrivateAPI(context));
}
-KeyedService* BuildEventRouter(content::BrowserContext* profile) {
- return new EventRouter(profile, ExtensionPrefs::Get(profile));
+scoped_ptr<KeyedService> BuildEventRouter(content::BrowserContext* profile) {
+ return make_scoped_ptr(
+ new EventRouter(profile, ExtensionPrefs::Get(profile)));
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698