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

Side by Side Diff: ios/chrome/browser/application_context_impl.cc

Issue 2458613004: Record the initial state of the Physical Web at startup (Closed)
Patch Set: rebase, use local state pref Created 4 years 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 "ios/chrome/browser/application_context_impl.h" 5 #include "ios/chrome/browser/application_context_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 CRLSetFetcher* ApplicationContextImpl::GetCRLSetFetcher() { 280 CRLSetFetcher* ApplicationContextImpl::GetCRLSetFetcher() {
281 DCHECK(thread_checker_.CalledOnValidThread()); 281 DCHECK(thread_checker_.CalledOnValidThread());
282 if (!crl_set_fetcher_) { 282 if (!crl_set_fetcher_) {
283 crl_set_fetcher_ = new CRLSetFetcher; 283 crl_set_fetcher_ = new CRLSetFetcher;
284 } 284 }
285 return crl_set_fetcher_.get(); 285 return crl_set_fetcher_.get();
286 } 286 }
287 287
288 physical_web::PhysicalWebDataSource* 288 physical_web::PhysicalWebDataSource*
289 ApplicationContextImpl::GetPhysicalWebDataSource() { 289 ApplicationContextImpl::GetPhysicalWebDataSource() {
rohitrao (ping after 24h) 2016/12/12 12:54:17 When is this method called for the first time? Cr
mattreynolds 2016/12/12 21:48:46 It's first called during [MainController startUpBr
290 DCHECK(thread_checker_.CalledOnValidThread()); 290 DCHECK(thread_checker_.CalledOnValidThread());
291 if (!physical_web_data_source_) { 291 if (!physical_web_data_source_) {
292 physical_web_data_source_ = CreateIOSChromePhysicalWebDataSource(); 292 physical_web_data_source_ =
293 CreateIOSChromePhysicalWebDataSource(GetLocalState());
293 DCHECK(physical_web_data_source_); 294 DCHECK(physical_web_data_source_);
294 } 295 }
295 return physical_web_data_source_.get(); 296 return physical_web_data_source_.get();
296 } 297 }
297 298
298 void ApplicationContextImpl::SetApplicationLocale(const std::string& locale) { 299 void ApplicationContextImpl::SetApplicationLocale(const std::string& locale) {
299 DCHECK(thread_checker_.CalledOnValidThread()); 300 DCHECK(thread_checker_.CalledOnValidThread());
300 application_locale_ = locale; 301 application_locale_ = locale;
301 translate::TranslateDownloadManager::GetInstance()->set_application_locale( 302 translate::TranslateDownloadManager::GetInstance()->set_application_locale(
302 application_locale_); 303 application_locale_);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); 345 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
345 346
346 gcm_driver_ = gcm::CreateGCMDriverDesktop( 347 gcm_driver_ = gcm::CreateGCMDriverDesktop(
347 base::WrapUnique(new gcm::GCMClientFactory), GetLocalState(), store_path, 348 base::WrapUnique(new gcm::GCMClientFactory), GetLocalState(), store_path,
348 GetSystemURLRequestContext(), ::GetChannel(), 349 GetSystemURLRequestContext(), ::GetChannel(),
349 IOSChromeGCMProfileServiceFactory::GetProductCategoryForSubtypes(), 350 IOSChromeGCMProfileServiceFactory::GetProductCategoryForSubtypes(),
350 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI), 351 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI),
351 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), 352 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO),
352 blocking_task_runner); 353 blocking_task_runner);
353 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698