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

Unified Diff: chrome/browser/extensions/extension_gcm_app_handler_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/extension_gcm_app_handler_unittest.cc
diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
index 1daefc76a2f15d45f94757f225ddf4e408f83b36..cf3feb4dccbf5efcc81c88fdd4d7506b10373a28 100644
--- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
+++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
@@ -15,6 +15,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
@@ -187,15 +188,15 @@ class FakeExtensionGCMAppHandler : public ExtensionGCMAppHandler {
class ExtensionGCMAppHandlerTest : public testing::Test {
public:
- static KeyedService* BuildGCMProfileService(
+ static scoped_ptr<KeyedService> BuildGCMProfileService(
content::BrowserContext* context) {
- return new gcm::GCMProfileService(
+ return make_scoped_ptr(new gcm::GCMProfileService(
Profile::FromBrowserContext(context),
scoped_ptr<gcm::GCMClientFactory>(new gcm::FakeGCMClientFactory(
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::UI),
content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO))));
+ content::BrowserThread::IO)))));
}
ExtensionGCMAppHandlerTest()

Powered by Google App Engine
This is Rietveld 408576698