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

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

Issue 640353003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 6 years, 2 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
« no previous file with comments | « chrome/browser/history/web_history_service.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_registry.h" 8 #include "base/prefs/pref_registry.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/invalidation/ticl_profile_settings_provider.h" 10 #include "chrome/browser/invalidation/ticl_profile_settings_provider.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 scoped_ptr<TiclInvalidationService> service(new TiclInvalidationService( 126 scoped_ptr<TiclInvalidationService> service(new TiclInvalidationService(
127 GetUserAgent(), 127 GetUserAgent(),
128 identity_provider.Pass(), 128 identity_provider.Pass(),
129 scoped_ptr<TiclSettingsProvider>( 129 scoped_ptr<TiclSettingsProvider>(
130 new TiclProfileSettingsProvider(profile)), 130 new TiclProfileSettingsProvider(profile)),
131 gcm::GCMProfileServiceFactory::GetForProfile(profile)->driver(), 131 gcm::GCMProfileServiceFactory::GetForProfile(profile)->driver(),
132 profile->GetRequestContext())); 132 profile->GetRequestContext()));
133 service->Init(scoped_ptr<syncer::InvalidationStateTracker>( 133 service->Init(scoped_ptr<syncer::InvalidationStateTracker>(
134 new InvalidatorStorage(profile->GetPrefs()))); 134 new InvalidatorStorage(profile->GetPrefs())));
135 135
136 return new ProfileInvalidationProvider(service.PassAs<InvalidationService>()); 136 return new ProfileInvalidationProvider(service.Pass());
137 #endif 137 #endif
138 } 138 }
139 139
140 void ProfileInvalidationProviderFactory::RegisterProfilePrefs( 140 void ProfileInvalidationProviderFactory::RegisterProfilePrefs(
141 user_prefs::PrefRegistrySyncable* registry) { 141 user_prefs::PrefRegistrySyncable* registry) {
142 registry->RegisterBooleanPref( 142 registry->RegisterBooleanPref(
143 prefs::kInvalidationServiceUseGCMChannel, 143 prefs::kInvalidationServiceUseGCMChannel,
144 true, // if no value in prefs, use GCM channel. 144 true, // if no value in prefs, use GCM channel.
145 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 145 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
146 InvalidatorStorage::RegisterProfilePrefs(registry); 146 InvalidatorStorage::RegisterProfilePrefs(registry);
147 } 147 }
148 148
149 } // namespace invalidation 149 } // namespace invalidation
OLDNEW
« no previous file with comments | « chrome/browser/history/web_history_service.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698