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

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

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: Eugene's comments Created 3 years, 9 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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ios::ChromeBrowserState::FromBrowserState(context); 69 ios::ChromeBrowserState::FromBrowserState(context);
70 70
71 std::unique_ptr<IdentityProvider> identity_provider( 71 std::unique_ptr<IdentityProvider> identity_provider(
72 new ProfileIdentityProvider( 72 new ProfileIdentityProvider(
73 ios::SigninManagerFactory::GetForBrowserState(browser_state), 73 ios::SigninManagerFactory::GetForBrowserState(browser_state),
74 OAuth2TokenServiceFactory::GetForBrowserState(browser_state), 74 OAuth2TokenServiceFactory::GetForBrowserState(browser_state),
75 // LoginUIServiceFactory is not built on iOS. 75 // LoginUIServiceFactory is not built on iOS.
76 base::Closure())); 76 base::Closure()));
77 77
78 std::unique_ptr<TiclInvalidationService> service(new TiclInvalidationService( 78 std::unique_ptr<TiclInvalidationService> service(new TiclInvalidationService(
79 web::GetWebClient()->GetUserAgent(false), std::move(identity_provider), 79 web::GetWebClient()->GetUserAgent(web::UserAgentType::MOBILE),
80 std::move(identity_provider),
80 base::MakeUnique<invalidation::TiclProfileSettingsProvider>( 81 base::MakeUnique<invalidation::TiclProfileSettingsProvider>(
81 browser_state->GetPrefs()), 82 browser_state->GetPrefs()),
82 IOSChromeGCMProfileServiceFactory::GetForBrowserState(browser_state) 83 IOSChromeGCMProfileServiceFactory::GetForBrowserState(browser_state)
83 ->driver(), 84 ->driver(),
84 browser_state->GetRequestContext())); 85 browser_state->GetRequestContext()));
85 service->Init( 86 service->Init(
86 base::MakeUnique<InvalidatorStorage>(browser_state->GetPrefs())); 87 base::MakeUnique<InvalidatorStorage>(browser_state->GetPrefs()));
87 88
88 return base::MakeUnique<ProfileInvalidationProvider>(std::move(service)); 89 return base::MakeUnique<ProfileInvalidationProvider>(std::move(service));
89 } 90 }
90 91
91 void IOSChromeProfileInvalidationProviderFactory::RegisterBrowserStatePrefs( 92 void IOSChromeProfileInvalidationProviderFactory::RegisterBrowserStatePrefs(
92 user_prefs::PrefRegistrySyncable* registry) { 93 user_prefs::PrefRegistrySyncable* registry) {
93 ProfileInvalidationProvider::RegisterProfilePrefs(registry); 94 ProfileInvalidationProvider::RegisterProfilePrefs(registry);
94 InvalidatorStorage::RegisterProfilePrefs(registry); 95 InvalidatorStorage::RegisterProfilePrefs(registry);
95 } 96 }
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ios_chrome_io_thread.mm » ('j') | ios/web/navigation/navigation_manager_impl.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698