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

Side by Side Diff: components/suggestions/suggestions_service.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers 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 "components/suggestions/suggestions_service.h" 5 #include "components/suggestions/suggestions_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 }; 166 };
167 167
168 SuggestionsService::SuggestionsService( 168 SuggestionsService::SuggestionsService(
169 const SigninManagerBase* signin_manager, 169 const SigninManagerBase* signin_manager,
170 OAuth2TokenService* token_service, 170 OAuth2TokenService* token_service,
171 net::URLRequestContextGetter* url_request_context, 171 net::URLRequestContextGetter* url_request_context,
172 scoped_ptr<SuggestionsStore> suggestions_store, 172 scoped_ptr<SuggestionsStore> suggestions_store,
173 scoped_ptr<ImageManager> thumbnail_manager, 173 scoped_ptr<ImageManager> thumbnail_manager,
174 scoped_ptr<BlacklistStore> blacklist_store) 174 scoped_ptr<BlacklistStore> blacklist_store)
175 : url_request_context_(url_request_context), 175 : url_request_context_(url_request_context),
176 suggestions_store_(suggestions_store.Pass()), 176 suggestions_store_(std::move(suggestions_store)),
177 thumbnail_manager_(thumbnail_manager.Pass()), 177 thumbnail_manager_(std::move(thumbnail_manager)),
178 blacklist_store_(blacklist_store.Pass()), 178 blacklist_store_(std::move(blacklist_store)),
179 scheduling_delay_(TimeDelta::FromSeconds(kDefaultSchedulingDelaySec)), 179 scheduling_delay_(TimeDelta::FromSeconds(kDefaultSchedulingDelaySec)),
180 token_fetcher_(new AccessTokenFetcher(signin_manager, token_service)), 180 token_fetcher_(new AccessTokenFetcher(signin_manager, token_service)),
181 weak_ptr_factory_(this) {} 181 weak_ptr_factory_(this) {}
182 182
183 SuggestionsService::~SuggestionsService() {} 183 SuggestionsService::~SuggestionsService() {}
184 184
185 void SuggestionsService::FetchSuggestionsData( 185 void SuggestionsService::FetchSuggestionsData(
186 SyncState sync_state, 186 SyncState sync_state,
187 SuggestionsService::ResponseCallback callback) { 187 SuggestionsService::ResponseCallback callback) {
188 DCHECK(thread_checker_.CalledOnValidThread()); 188 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 scheduling_delay_ = TimeDelta::FromSeconds(kDefaultSchedulingDelaySec); 534 scheduling_delay_ = TimeDelta::FromSeconds(kDefaultSchedulingDelaySec);
535 } else { 535 } else {
536 TimeDelta candidate_delay = 536 TimeDelta candidate_delay =
537 scheduling_delay_ * kSchedulingBackoffMultiplier; 537 scheduling_delay_ * kSchedulingBackoffMultiplier;
538 if (candidate_delay < TimeDelta::FromSeconds(kSchedulingMaxDelaySec)) 538 if (candidate_delay < TimeDelta::FromSeconds(kSchedulingMaxDelaySec))
539 scheduling_delay_ = candidate_delay; 539 scheduling_delay_ = candidate_delay;
540 } 540 }
541 } 541 }
542 542
543 } // namespace suggestions 543 } // namespace suggestions
OLDNEW
« no previous file with comments | « components/suggestions/image_manager.cc ('k') | components/suggestions/suggestions_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698