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

Side by Side Diff: chrome/browser/invalidation/profile_invalidation_provider_factory.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" 5 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
6 6
7 #include <utility>
8
7 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_registry.h" 10 #include "base/prefs/pref_registry.h"
9 #include "build/build_config.h" 11 #include "build/build_config.h"
10 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 14 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
13 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 15 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
14 #include "chrome/browser/signin/signin_manager_factory.h" 16 #include "chrome/browser/signin/signin_manager_factory.h"
15 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 17 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
16 #include "chrome/common/chrome_content_client.h" 18 #include "chrome/common/chrome_content_client.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 Profile* profile = Profile::FromBrowserContext(context); 120 Profile* profile = Profile::FromBrowserContext(context);
119 121
120 if (!identity_provider) { 122 if (!identity_provider) {
121 identity_provider.reset(new ProfileIdentityProvider( 123 identity_provider.reset(new ProfileIdentityProvider(
122 SigninManagerFactory::GetForProfile(profile), 124 SigninManagerFactory::GetForProfile(profile),
123 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), 125 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
124 LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile(profile))); 126 LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile(profile)));
125 } 127 }
126 128
127 scoped_ptr<TiclInvalidationService> service(new TiclInvalidationService( 129 scoped_ptr<TiclInvalidationService> service(new TiclInvalidationService(
128 GetUserAgent(), identity_provider.Pass(), 130 GetUserAgent(), std::move(identity_provider),
129 scoped_ptr<TiclSettingsProvider>( 131 scoped_ptr<TiclSettingsProvider>(
130 new TiclProfileSettingsProvider(profile->GetPrefs())), 132 new TiclProfileSettingsProvider(profile->GetPrefs())),
131 gcm::GCMProfileServiceFactory::GetForProfile(profile)->driver(), 133 gcm::GCMProfileServiceFactory::GetForProfile(profile)->driver(),
132 profile->GetRequestContext())); 134 profile->GetRequestContext()));
133 service->Init(scoped_ptr<syncer::InvalidationStateTracker>( 135 service->Init(scoped_ptr<syncer::InvalidationStateTracker>(
134 new InvalidatorStorage(profile->GetPrefs()))); 136 new InvalidatorStorage(profile->GetPrefs())));
135 137
136 return new ProfileInvalidationProvider(service.Pass()); 138 return new ProfileInvalidationProvider(std::move(service));
137 #endif 139 #endif
138 } 140 }
139 141
140 void ProfileInvalidationProviderFactory::RegisterProfilePrefs( 142 void ProfileInvalidationProviderFactory::RegisterProfilePrefs(
141 user_prefs::PrefRegistrySyncable* registry) { 143 user_prefs::PrefRegistrySyncable* registry) {
142 ProfileInvalidationProvider::RegisterProfilePrefs(registry); 144 ProfileInvalidationProvider::RegisterProfilePrefs(registry);
143 InvalidatorStorage::RegisterProfilePrefs(registry); 145 InvalidatorStorage::RegisterProfilePrefs(registry);
144 } 146 }
145 147
146 } // namespace invalidation 148 } // namespace invalidation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698