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

Unified Diff: chrome/browser/signin/fake_profile_oauth2_token_service_builder.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/signin/fake_profile_oauth2_token_service_builder.cc
diff --git a/chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc b/chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc
index 90e9fe342bacca6d400622b9e8dad99aa84ce926..1888211e1993218343bb0646af6f33d128397171 100644
--- a/chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc
+++ b/chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc
@@ -2,30 +2,33 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
+
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
-#include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
#include "chrome/browser/signin/signin_error_controller_factory.h"
// TODO(blundell): Should these be namespaced?
-KeyedService* BuildFakeProfileOAuth2TokenService(
+scoped_ptr<KeyedService> BuildFakeProfileOAuth2TokenService(
content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
- FakeProfileOAuth2TokenService* service = new FakeProfileOAuth2TokenService();
+ scoped_ptr<FakeProfileOAuth2TokenService> service(
+ new FakeProfileOAuth2TokenService());
service->Initialize(
ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
SigninErrorControllerFactory::GetInstance()->GetForProfile(profile));
- return service;
+ return service.Pass();
}
-KeyedService* BuildAutoIssuingFakeProfileOAuth2TokenService(
+scoped_ptr<KeyedService> BuildAutoIssuingFakeProfileOAuth2TokenService(
content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
- FakeProfileOAuth2TokenService* service = new FakeProfileOAuth2TokenService();
+ scoped_ptr<FakeProfileOAuth2TokenService> service(
+ new FakeProfileOAuth2TokenService());
service->set_auto_post_fetch_response_on_message_loop(true);
service->Initialize(
ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
SigninErrorControllerFactory::GetInstance()->GetForProfile(profile));
- return service;
+ return service.Pass();
}
« no previous file with comments | « chrome/browser/signin/fake_profile_oauth2_token_service_builder.h ('k') | chrome/browser/signin/fake_signin_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698