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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service_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/services/gcm/gcm_profile_service_unittest.cc
diff --git a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
index ea3ccdac2a42279d7a0cbe83ae88e641a1832b7e..8c3afb55209bb14b2e3b89faea9c741620f90cdf 100644
--- a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
@@ -35,14 +35,15 @@ namespace {
const char kTestAppID[] = "TestApp";
const char kUserID[] = "user";
-KeyedService* BuildGCMProfileService(content::BrowserContext* context) {
- return new GCMProfileService(
+scoped_ptr<KeyedService> BuildGCMProfileService(
+ content::BrowserContext* context) {
+ return make_scoped_ptr(new GCMProfileService(
Profile::FromBrowserContext(context),
scoped_ptr<GCMClientFactory>(new FakeGCMClientFactory(
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::UI),
content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO))));
+ content::BrowserThread::IO)))));
}
} // namespace
@@ -217,7 +218,7 @@ TEST_F(GCMProfileServiceTest, Send) {
GCMClient::OutgoingMessage message;
message.id = "1";
message.data["key1"] = "value1";
- SendAndWaitForCompletion( message);
+ SendAndWaitForCompletion(message);
EXPECT_EQ(message.id, send_message_id());
EXPECT_EQ(GCMClient::SUCCESS, send_result());

Powered by Google App Engine
This is Rietveld 408576698