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

Unified Diff: chrome/browser/extensions/api/instance_id/instance_id_apitest.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/api/instance_id/instance_id_apitest.cc
diff --git a/chrome/browser/extensions/api/instance_id/instance_id_apitest.cc b/chrome/browser/extensions/api/instance_id/instance_id_apitest.cc
index 4a1b08a402ad37af051db5de8da2f42356abb930..bc32d8111bd1a547631cbdd1e9d0ab7319615462 100644
--- a/chrome/browser/extensions/api/instance_id/instance_id_apitest.cc
+++ b/chrome/browser/extensions/api/instance_id/instance_id_apitest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "chrome/browser/extensions/api/instance_id/instance_id_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
@@ -22,11 +23,12 @@ namespace extensions {
namespace {
-KeyedService* BuildFakeGCMProfileService(content::BrowserContext* context) {
- gcm::FakeGCMProfileService* service =
- new gcm::FakeGCMProfileService(Profile::FromBrowserContext(context));
+scoped_ptr<KeyedService> BuildFakeGCMProfileService(
+ content::BrowserContext* context) {
+ scoped_ptr<gcm::FakeGCMProfileService> service(
+ new gcm::FakeGCMProfileService(Profile::FromBrowserContext(context)));
service->SetDriverForTesting(new instance_id::FakeGCMDriverForInstanceID());
- return service;
+ return service.Pass();
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698