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( |
| 162 pref_service, |
| 163 GetApplicationContext()->GetIOSChromeIOThread()->net_log()); |
162 io_data_->set_http_server_properties( | 164 io_data_->set_http_server_properties( |
163 base::WrapUnique(io_data_->http_server_properties_manager_)); | 165 base::WrapUnique(io_data_->http_server_properties_manager_)); |
164 io_data_->InitializeOnUIThread(browser_state_); | 166 io_data_->InitializeOnUIThread(browser_state_); |
165 } | 167 } |
166 | 168 |
167 std::unique_ptr< | 169 std::unique_ptr< |
168 ChromeBrowserStateIOData::IOSChromeURLRequestContextGetterVector> | 170 ChromeBrowserStateIOData::IOSChromeURLRequestContextGetterVector> |
169 ChromeBrowserStateImplIOData::Handle::GetAllContextGetters() { | 171 ChromeBrowserStateImplIOData::Handle::GetAllContextGetters() { |
170 IOSChromeURLRequestContextGetterMap::iterator iter; | 172 IOSChromeURLRequestContextGetterMap::iterator iter; |
171 std::unique_ptr<IOSChromeURLRequestContextGetterVector> context_getters( | 173 std::unique_ptr<IOSChromeURLRequestContextGetterVector> context_getters( |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 const base::Closure& completion) { | 357 const base::Closure& completion) { |
356 DCHECK_CURRENTLY_ON(web::WebThread::IO); | 358 DCHECK_CURRENTLY_ON(web::WebThread::IO); |
357 DCHECK(initialized()); | 359 DCHECK(initialized()); |
358 | 360 |
359 DCHECK(transport_security_state()); | 361 DCHECK(transport_security_state()); |
360 // Completes synchronously. | 362 // Completes synchronously. |
361 transport_security_state()->DeleteAllDynamicDataSince(time); | 363 transport_security_state()->DeleteAllDynamicDataSince(time); |
362 DCHECK(http_server_properties_manager_); | 364 DCHECK(http_server_properties_manager_); |
363 http_server_properties_manager_->Clear(completion); | 365 http_server_properties_manager_->Clear(completion); |
364 } | 366 } |
OLD | NEW |