| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( | 515 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( |
| 512 base::Time time) { | 516 base::Time time) { |
| 513 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 517 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 514 LazyInitialize(); | 518 LazyInitialize(); |
| 515 | 519 |
| 516 DCHECK(transport_security_state()); | 520 DCHECK(transport_security_state()); |
| 517 transport_security_state()->DeleteSince(time); | 521 transport_security_state()->DeleteSince(time); |
| 518 DCHECK(http_server_properties_manager()); | 522 DCHECK(http_server_properties_manager()); |
| 519 http_server_properties_manager()->Clear(); | 523 http_server_properties_manager()->Clear(); |
| 520 } | 524 } |
| OLD | NEW |