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); |
116 } | 120 } |
117 | 121 |
118 base::Callback<ChromeURLDataManagerBackend*(void)> | 122 base::Callback<ChromeURLDataManagerBackend*(void)> |
119 ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const { | 123 ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const { |
120 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 124 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
121 LazyInitialize(); | 125 LazyInitialize(); |
122 return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend, | 126 return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend, |
123 base::Unretained(io_data_)); | 127 base::Unretained(io_data_)); |
124 } | 128 } |
125 | 129 |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( | 521 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( |
518 base::Time time) { | 522 base::Time time) { |
519 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 523 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
520 LazyInitialize(); | 524 LazyInitialize(); |
521 | 525 |
522 DCHECK(transport_security_state()); | 526 DCHECK(transport_security_state()); |
523 transport_security_state()->DeleteSince(time); | 527 transport_security_state()->DeleteSince(time); |
524 DCHECK(http_server_properties_manager()); | 528 DCHECK(http_server_properties_manager()); |
525 http_server_properties_manager()->Clear(); | 529 http_server_properties_manager()->Clear(); |
526 } | 530 } |
OLD | NEW |