Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/browser_state/chrome_browser_state_impl_io_data.h" | 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 void ChromeBrowserStateImplIOData::Handle::LazyInitialize() const { | 151 void ChromeBrowserStateImplIOData::Handle::LazyInitialize() const { |
| 152 DCHECK_CURRENTLY_ON(web::WebThread::UI); | 152 DCHECK_CURRENTLY_ON(web::WebThread::UI); |
| 153 if (initialized_) | 153 if (initialized_) |
| 154 return; | 154 return; |
| 155 | 155 |
| 156 // Set initialized_ to true at the beginning in case any of the objects | 156 // Set initialized_ to true at the beginning in case any of the objects |
| 157 // below try to get the ResourceContext pointer. | 157 // below try to get the ResourceContext pointer. |
| 158 initialized_ = true; | 158 initialized_ = true; |
| 159 PrefService* pref_service = browser_state_->GetPrefs(); | 159 PrefService* pref_service = browser_state_->GetPrefs(); |
| 160 io_data_->http_server_properties_manager_ = | 160 io_data_->http_server_properties_manager_ = |
| 161 HttpServerPropertiesManagerFactory::CreateManager(pref_service); | 161 HttpServerPropertiesManagerFactory::CreateManager(pref_service, |
| 162 /*net_log=*/nullptr); | |
|
droger
2017/06/21 16:28:55
GetApplicationContext()->GetIOSChromeIOThread()->n
xunjieli
2017/06/21 16:38:27
Done.
| |
| 162 io_data_->set_http_server_properties( | 163 io_data_->set_http_server_properties( |
| 163 base::WrapUnique(io_data_->http_server_properties_manager_)); | 164 base::WrapUnique(io_data_->http_server_properties_manager_)); |
| 164 io_data_->InitializeOnUIThread(browser_state_); | 165 io_data_->InitializeOnUIThread(browser_state_); |
| 165 } | 166 } |
| 166 | 167 |
| 167 std::unique_ptr< | 168 std::unique_ptr< |
| 168 ChromeBrowserStateIOData::IOSChromeURLRequestContextGetterVector> | 169 ChromeBrowserStateIOData::IOSChromeURLRequestContextGetterVector> |
| 169 ChromeBrowserStateImplIOData::Handle::GetAllContextGetters() { | 170 ChromeBrowserStateImplIOData::Handle::GetAllContextGetters() { |
| 170 IOSChromeURLRequestContextGetterMap::iterator iter; | 171 IOSChromeURLRequestContextGetterMap::iterator iter; |
| 171 std::unique_ptr<IOSChromeURLRequestContextGetterVector> context_getters( | 172 std::unique_ptr<IOSChromeURLRequestContextGetterVector> context_getters( |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 const base::Closure& completion) { | 356 const base::Closure& completion) { |
| 356 DCHECK_CURRENTLY_ON(web::WebThread::IO); | 357 DCHECK_CURRENTLY_ON(web::WebThread::IO); |
| 357 DCHECK(initialized()); | 358 DCHECK(initialized()); |
| 358 | 359 |
| 359 DCHECK(transport_security_state()); | 360 DCHECK(transport_security_state()); |
| 360 // Completes synchronously. | 361 // Completes synchronously. |
| 361 transport_security_state()->DeleteAllDynamicDataSince(time); | 362 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 362 DCHECK(http_server_properties_manager_); | 363 DCHECK(http_server_properties_manager_); |
| 363 http_server_properties_manager_->Clear(completion); | 364 http_server_properties_manager_->Clear(completion); |
| 364 } | 365 } |
| OLD | NEW |