OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/profiles/profile_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
| 8 #include <string> |
8 #include <utility> | 9 #include <utility> |
9 | 10 |
10 #include "base/bind.h" | 11 #include "base/bind.h" |
11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/metrics/field_trial.h" | 16 #include "base/metrics/field_trial.h" |
16 #include "base/prefs/json_pref_store.h" | 17 #include "base/prefs/json_pref_store.h" |
17 #include "base/prefs/pref_filter.h" | 18 #include "base/prefs/pref_filter.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // Don't call LazyInitialize here, since the resource context is created at | 217 // Don't call LazyInitialize here, since the resource context is created at |
217 // the beginning of initalization and is used by some members while they're | 218 // the beginning of initalization and is used by some members while they're |
218 // being initialized (i.e. AppCacheService). | 219 // being initialized (i.e. AppCacheService). |
219 return io_data_->GetResourceContext(); | 220 return io_data_->GetResourceContext(); |
220 } | 221 } |
221 | 222 |
222 scoped_refptr<ChromeURLRequestContextGetter> | 223 scoped_refptr<ChromeURLRequestContextGetter> |
223 ProfileImplIOData::Handle::CreateMainRequestContextGetter( | 224 ProfileImplIOData::Handle::CreateMainRequestContextGetter( |
224 content::ProtocolHandlerMap* protocol_handlers, | 225 content::ProtocolHandlerMap* protocol_handlers, |
225 content::URLRequestInterceptorScopedVector request_interceptors, | 226 content::URLRequestInterceptorScopedVector request_interceptors, |
226 PrefService* local_state, | |
227 IOThread* io_thread) const { | 227 IOThread* io_thread) const { |
228 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 228 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
229 LazyInitialize(); | 229 LazyInitialize(); |
230 DCHECK(!main_request_context_getter_.get()); | 230 DCHECK(!main_request_context_getter_.get()); |
231 main_request_context_getter_ = ChromeURLRequestContextGetter::Create( | 231 main_request_context_getter_ = ChromeURLRequestContextGetter::Create( |
232 profile_, io_data_, protocol_handlers, std::move(request_interceptors)); | 232 profile_, io_data_, protocol_handlers, std::move(request_interceptors)); |
233 | 233 |
234 io_data_->predictor_ | 234 io_data_->predictor_ |
235 ->InitNetworkPredictor(profile_->GetPrefs(), | 235 ->InitNetworkPredictor(profile_->GetPrefs(), |
236 local_state, | |
237 io_thread, | 236 io_thread, |
238 main_request_context_getter_.get(), | 237 main_request_context_getter_.get(), |
239 io_data_); | 238 io_data_); |
240 | 239 |
241 content::NotificationService::current()->Notify( | 240 content::NotificationService::current()->Notify( |
242 chrome::NOTIFICATION_PROFILE_URL_REQUEST_CONTEXT_GETTER_INITIALIZED, | 241 chrome::NOTIFICATION_PROFILE_URL_REQUEST_CONTEXT_GETTER_INITIALIZED, |
243 content::Source<Profile>(profile_), | 242 content::Source<Profile>(profile_), |
244 content::NotificationService::NoDetails()); | 243 content::NotificationService::NoDetails()); |
245 return main_request_context_getter_; | 244 return main_request_context_getter_; |
246 } | 245 } |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 const base::Closure& completion) { | 774 const base::Closure& completion) { |
776 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 775 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
777 DCHECK(initialized()); | 776 DCHECK(initialized()); |
778 | 777 |
779 DCHECK(transport_security_state()); | 778 DCHECK(transport_security_state()); |
780 // Completes synchronously. | 779 // Completes synchronously. |
781 transport_security_state()->DeleteAllDynamicDataSince(time); | 780 transport_security_state()->DeleteAllDynamicDataSince(time); |
782 DCHECK(http_server_properties_manager_); | 781 DCHECK(http_server_properties_manager_); |
783 http_server_properties_manager_->Clear(completion); | 782 http_server_properties_manager_->Clear(completion); |
784 } | 783 } |
OLD | NEW |