| 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/off_the_record_profile_impl.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_impl.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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 } | 445 } |
| 446 return pref_proxy_config_tracker_.get(); | 446 return pref_proxy_config_tracker_.get(); |
| 447 } | 447 } |
| 448 | 448 |
| 449 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { | 449 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { |
| 450 // We do not store information about websites visited in OTR profiles which | 450 // We do not store information about websites visited in OTR profiles which |
| 451 // is necessary for a Predictor, so we do not have a Predictor at all. | 451 // is necessary for a Predictor, so we do not have a Predictor at all. |
| 452 return NULL; | 452 return NULL; |
| 453 } | 453 } |
| 454 | 454 |
| 455 void OffTheRecordProfileImpl::ClearNetworkingHistorySince(base::Time time) { | 455 void OffTheRecordProfileImpl::ClearNetworkingHistorySince( |
| 456 // No need to do anything here, our transport security state is read-only. | 456 base::Time time, |
| 457 const base::Closure& completion) { |
| 458 // Nothing to do here, our transport security state is read-only. |
| 459 // Still, fire the callback to indicate we have finished, otherwise the |
| 460 // BrowsingDataRemover will never be destroyed and the dialog will never be |
| 461 // closed. We must do this asynchronously in order to avoid reentrancy issues. |
| 462 if (!completion.is_null()) { |
| 463 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, completion); |
| 464 } |
| 457 } | 465 } |
| 458 | 466 |
| 459 GURL OffTheRecordProfileImpl::GetHomePage() { | 467 GURL OffTheRecordProfileImpl::GetHomePage() { |
| 460 return profile_->GetHomePage(); | 468 return profile_->GetHomePage(); |
| 461 } | 469 } |
| 462 | 470 |
| 463 void OffTheRecordProfileImpl::Observe( | 471 void OffTheRecordProfileImpl::Observe( |
| 464 int type, | 472 int type, |
| 465 const content::NotificationSource& source, | 473 const content::NotificationSource& source, |
| 466 const content::NotificationDetails& details) { | 474 const content::NotificationDetails& details) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 if (!profile) | 514 if (!profile) |
| 507 profile = new OffTheRecordProfileImpl(this); | 515 profile = new OffTheRecordProfileImpl(this); |
| 508 profile->Init(); | 516 profile->Init(); |
| 509 return profile; | 517 return profile; |
| 510 } | 518 } |
| 511 | 519 |
| 512 base::Callback<ChromeURLDataManagerBackend*(void)> | 520 base::Callback<ChromeURLDataManagerBackend*(void)> |
| 513 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 521 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
| 514 return io_data_.GetChromeURLDataManagerBackendGetter(); | 522 return io_data_.GetChromeURLDataManagerBackendGetter(); |
| 515 } | 523 } |
| OLD | NEW |