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

Side by Side Diff: ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provider_factory.cc

Issue 1586833002: Convert Pass()→std::move() for iOS build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental //base change 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provid er_factory.h" 5 #include "ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provid er_factory.h"
6 6
7 #include <utility>
8
7 #include "base/callback.h" 9 #include "base/callback.h"
8 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
10 #include "base/prefs/pref_registry.h" 12 #include "base/prefs/pref_registry.h"
11 #include "components/gcm_driver/gcm_profile_service.h" 13 #include "components/gcm_driver/gcm_profile_service.h"
12 #include "components/invalidation/impl/invalidator_storage.h" 14 #include "components/invalidation/impl/invalidator_storage.h"
13 #include "components/invalidation/impl/profile_invalidation_provider.h" 15 #include "components/invalidation/impl/profile_invalidation_provider.h"
14 #include "components/invalidation/impl/ticl_invalidation_service.h" 16 #include "components/invalidation/impl/ticl_invalidation_service.h"
15 #include "components/invalidation/impl/ticl_profile_settings_provider.h" 17 #include "components/invalidation/impl/ticl_profile_settings_provider.h"
16 #include "components/keyed_service/ios/browser_state_dependency_manager.h" 18 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ios::ChromeBrowserState* browser_state = 63 ios::ChromeBrowserState* browser_state =
62 ios::ChromeBrowserState::FromBrowserState(context); 64 ios::ChromeBrowserState::FromBrowserState(context);
63 65
64 scoped_ptr<IdentityProvider> identity_provider(new ProfileIdentityProvider( 66 scoped_ptr<IdentityProvider> identity_provider(new ProfileIdentityProvider(
65 ios::SigninManagerFactory::GetForBrowserState(browser_state), 67 ios::SigninManagerFactory::GetForBrowserState(browser_state),
66 OAuth2TokenServiceFactory::GetForBrowserState(browser_state), 68 OAuth2TokenServiceFactory::GetForBrowserState(browser_state),
67 // LoginUIServiceFactory is not built on iOS. 69 // LoginUIServiceFactory is not built on iOS.
68 base::Closure())); 70 base::Closure()));
69 71
70 scoped_ptr<TiclInvalidationService> service(new TiclInvalidationService( 72 scoped_ptr<TiclInvalidationService> service(new TiclInvalidationService(
71 web::GetWebClient()->GetUserAgent(false), identity_provider.Pass(), 73 web::GetWebClient()->GetUserAgent(false), std::move(identity_provider),
72 make_scoped_ptr(new invalidation::TiclProfileSettingsProvider( 74 make_scoped_ptr(new invalidation::TiclProfileSettingsProvider(
73 browser_state->GetPrefs())), 75 browser_state->GetPrefs())),
74 IOSChromeGCMProfileServiceFactory::GetForBrowserState(browser_state) 76 IOSChromeGCMProfileServiceFactory::GetForBrowserState(browser_state)
75 ->driver(), 77 ->driver(),
76 browser_state->GetRequestContext())); 78 browser_state->GetRequestContext()));
77 service->Init( 79 service->Init(
78 make_scoped_ptr(new InvalidatorStorage(browser_state->GetPrefs()))); 80 make_scoped_ptr(new InvalidatorStorage(browser_state->GetPrefs())));
79 81
80 return make_scoped_ptr(new ProfileInvalidationProvider(service.Pass())); 82 return make_scoped_ptr(new ProfileInvalidationProvider(std::move(service)));
81 } 83 }
82 84
83 void IOSChromeProfileInvalidationProviderFactory::RegisterBrowserStatePrefs( 85 void IOSChromeProfileInvalidationProviderFactory::RegisterBrowserStatePrefs(
84 user_prefs::PrefRegistrySyncable* registry) { 86 user_prefs::PrefRegistrySyncable* registry) {
85 ProfileInvalidationProvider::RegisterProfilePrefs(registry); 87 ProfileInvalidationProvider::RegisterProfilePrefs(registry);
86 InvalidatorStorage::RegisterProfilePrefs(registry); 88 InvalidatorStorage::RegisterProfilePrefs(registry);
87 } 89 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/infobars/infobar_utils.mm ('k') | ios/chrome/browser/ios_chrome_io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698