Chromium Code Reviews| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 | 279 |
| 280 BrowserThread::PostTask( | 280 BrowserThread::PostTask( |
| 281 BrowserThread::IO, FROM_HERE, | 281 BrowserThread::IO, FROM_HERE, |
| 282 base::Bind( | 282 base::Bind( |
| 283 &ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread, | 283 &ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread, |
| 284 base::Unretained(io_data_), | 284 base::Unretained(io_data_), |
| 285 time, | 285 time, |
| 286 completion)); | 286 completion)); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void ProfileImplIOData::Handle::ReleaseFromBrowserContextServices( | |
| 290 Profile* profile) const { | |
| 291 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 292 LOG(ERROR) << "ProfileImplIOData::Handle::ReleaseFromBrowserContextServices " | |
| 293 << initialized_; | |
|
Joao da Silva
2013/10/25 11:57:10
Remove this
pneubeck (no reviews)
2013/10/25 12:17:00
Done.
| |
| 294 if (!initialized_) | |
| 295 return; | |
| 296 | |
| 297 io_data_->ReleaseFromBrowserContextServices(profile); | |
| 298 } | |
| 299 | |
| 289 void ProfileImplIOData::Handle::LazyInitialize() const { | 300 void ProfileImplIOData::Handle::LazyInitialize() const { |
| 290 if (initialized_) | 301 if (initialized_) |
| 291 return; | 302 return; |
| 292 | 303 |
| 293 // Set initialized_ to true at the beginning in case any of the objects | 304 // Set initialized_ to true at the beginning in case any of the objects |
| 294 // below try to get the ResourceContext pointer. | 305 // below try to get the ResourceContext pointer. |
| 295 initialized_ = true; | 306 initialized_ = true; |
| 296 PrefService* pref_service = profile_->GetPrefs(); | 307 PrefService* pref_service = profile_->GetPrefs(); |
| 297 io_data_->http_server_properties_manager_ = | 308 io_data_->http_server_properties_manager_ = |
| 298 new chrome_browser_net::HttpServerPropertiesManager(pref_service); | 309 new chrome_browser_net::HttpServerPropertiesManager(pref_service); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 695 const base::Closure& completion) { | 706 const base::Closure& completion) { |
| 696 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 707 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 697 DCHECK(initialized()); | 708 DCHECK(initialized()); |
| 698 | 709 |
| 699 DCHECK(transport_security_state()); | 710 DCHECK(transport_security_state()); |
| 700 // Completes synchronously. | 711 // Completes synchronously. |
| 701 transport_security_state()->DeleteAllDynamicDataSince(time); | 712 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 702 DCHECK(http_server_properties_manager_); | 713 DCHECK(http_server_properties_manager_); |
| 703 http_server_properties_manager_->Clear(completion); | 714 http_server_properties_manager_->Clear(completion); |
| 704 } | 715 } |
| OLD | NEW |