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

Unified Diff: chrome/browser/extensions/extension_action_test_util.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/extension_action_test_util.cc
diff --git a/chrome/browser/extensions/extension_action_test_util.cc b/chrome/browser/extensions/extension_action_test_util.cc
index da6756e2a5bf426b3a8ce48856c8499668dba5b2..6a6eddcb33d8e4718a795818b3b8e817e2b921a2 100644
--- a/chrome/browser/extensions/extension_action_test_util.cc
+++ b/chrome/browser/extensions/extension_action_test_util.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/extensions/extension_action_test_util.h"
+#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "chrome/browser/extensions/extension_action.h"
#include "chrome/browser/extensions/extension_action_manager.h"
@@ -69,10 +70,10 @@ size_t GetPageActionCount(content::WebContents* web_contents,
}
// Creates a new ExtensionToolbarModel for the given |context|.
-KeyedService* BuildToolbarModel(content::BrowserContext* context) {
- return new extensions::ExtensionToolbarModel(
+scoped_ptr<KeyedService> BuildToolbarModel(content::BrowserContext* context) {
+ return make_scoped_ptr(new extensions::ExtensionToolbarModel(
Profile::FromBrowserContext(context),
- extensions::ExtensionPrefs::Get(context));
+ extensions::ExtensionPrefs::Get(context)));
}
// Creates a new ExtensionToolbarModel for the given profile, optionally

Powered by Google App Engine
This is Rietveld 408576698