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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 if (!main_request_context_getter_) { | 107 if (!main_request_context_getter_) { |
108 main_request_context_getter_ = | 108 main_request_context_getter_ = |
109 ChromeURLRequestContextGetter::CreateOriginal( | 109 ChromeURLRequestContextGetter::CreateOriginal( |
110 profile_, io_data_); | 110 profile_, io_data_); |
111 } | 111 } |
112 io_data_->predictor_->InitNetworkPredictor(profile_->GetPrefs(), | 112 io_data_->predictor_->InitNetworkPredictor(profile_->GetPrefs(), |
113 local_state, | 113 local_state, |
114 io_thread, | 114 io_thread, |
115 main_request_context_getter_); | 115 main_request_context_getter_); |
116 | |
117 io_data_->enable_metrics()->Init(prefs::kMetricsReportingEnabled, | |
118 local_state, NULL); | |
119 io_data_->enable_metrics()->MoveToThread(BrowserThread::IO); | |
120 } | 116 } |
121 | 117 |
122 base::Callback<ChromeURLDataManagerBackend*(void)> | 118 base::Callback<ChromeURLDataManagerBackend*(void)> |
123 ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const { | 119 ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const { |
124 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 120 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
125 LazyInitialize(); | 121 LazyInitialize(); |
126 return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend, | 122 return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend, |
127 base::Unretained(io_data_)); | 123 base::Unretained(io_data_)); |
128 } | 124 } |
129 | 125 |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( | 517 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( |
522 base::Time time) { | 518 base::Time time) { |
523 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 519 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
524 LazyInitialize(); | 520 LazyInitialize(); |
525 | 521 |
526 DCHECK(transport_security_state()); | 522 DCHECK(transport_security_state()); |
527 transport_security_state()->DeleteSince(time); | 523 transport_security_state()->DeleteSince(time); |
528 DCHECK(http_server_properties_manager()); | 524 DCHECK(http_server_properties_manager()); |
529 http_server_properties_manager()->Clear(); | 525 http_server_properties_manager()->Clear(); |
530 } | 526 } |
OLD | NEW |