OLD | NEW |
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 | 88 |
89 // static | 89 // static |
90 void ApplicationContextImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 90 void ApplicationContextImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
91 registry->RegisterStringPref(ios::prefs::kApplicationLocale, std::string()); | 91 registry->RegisterStringPref(ios::prefs::kApplicationLocale, std::string()); |
92 registry->RegisterBooleanPref(prefs::kEulaAccepted, false); | 92 registry->RegisterBooleanPref(prefs::kEulaAccepted, false); |
93 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, | 93 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, |
94 false); | 94 false); |
95 registry->RegisterBooleanPref(prefs::kLastSessionExitedCleanly, true); | 95 registry->RegisterBooleanPref(prefs::kLastSessionExitedCleanly, true); |
96 registry->RegisterBooleanPref(prefs::kMetricsReportingWifiOnly, true); | 96 registry->RegisterBooleanPref(prefs::kMetricsReportingWifiOnly, true); |
| 97 registry->RegisterBooleanPref(prefs::kLastSessionUsedWKWebViewControlGroup, |
| 98 false); |
97 } | 99 } |
98 | 100 |
99 void ApplicationContextImpl::PreCreateThreads() { | 101 void ApplicationContextImpl::PreCreateThreads() { |
100 DCHECK(thread_checker_.CalledOnValidThread()); | 102 DCHECK(thread_checker_.CalledOnValidThread()); |
101 ios_chrome_io_thread_.reset( | 103 ios_chrome_io_thread_.reset( |
102 new IOSChromeIOThread(GetLocalState(), GetNetLog())); | 104 new IOSChromeIOThread(GetLocalState(), GetNetLog())); |
103 } | 105 } |
104 | 106 |
105 void ApplicationContextImpl::PreMainMessageLoopRun() { | 107 void ApplicationContextImpl::PreMainMessageLoopRun() { |
106 DCHECK(thread_checker_.CalledOnValidThread()); | 108 DCHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 worker_pool->GetSequenceToken(), | 358 worker_pool->GetSequenceToken(), |
357 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); | 359 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
358 | 360 |
359 gcm_driver_ = gcm::CreateGCMDriverDesktop( | 361 gcm_driver_ = gcm::CreateGCMDriverDesktop( |
360 make_scoped_ptr(new gcm::GCMClientFactory), GetLocalState(), store_path, | 362 make_scoped_ptr(new gcm::GCMClientFactory), GetLocalState(), store_path, |
361 GetSystemURLRequestContext(), ::GetChannel(), | 363 GetSystemURLRequestContext(), ::GetChannel(), |
362 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI), | 364 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI), |
363 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), | 365 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), |
364 blocking_task_runner); | 366 blocking_task_runner); |
365 } | 367 } |
OLD | NEW |