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

Unified Diff: chrome/browser/sessions/session_service_factory.h

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/sessions/session_service_factory.h
diff --git a/chrome/browser/sessions/session_service_factory.h b/chrome/browser/sessions/session_service_factory.h
index 2c73d5725bf074f5f24d6a992fee0079f9f10808..c0db39ca9da87cc58ab5fffd1169430b69a43364 100644
--- a/chrome/browser/sessions/session_service_factory.h
+++ b/chrome/browser/sessions/session_service_factory.h
@@ -44,10 +44,11 @@ class SessionServiceFactory : public BrowserContextKeyedServiceFactory {
#if defined(UNIT_TEST)
// For test use: force setting of the session service for a given profile.
// This will delete a previous session service for this profile if it exists.
- static void SetForTestProfile(Profile* profile, SessionService* service) {
+ static void SetForTestProfile(Profile* profile,
+ scoped_ptr<SessionService> service) {
GetInstance()->BrowserContextShutdown(profile);
GetInstance()->BrowserContextDestroyed(profile);
- GetInstance()->Associate(profile, service);
+ GetInstance()->Associate(profile, service.Pass());
}
#endif

Powered by Google App Engine
This is Rietveld 408576698