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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 } | 409 } |
410 return pref_proxy_config_tracker_.get(); | 410 return pref_proxy_config_tracker_.get(); |
411 } | 411 } |
412 | 412 |
413 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { | 413 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { |
414 // We do not store information about websites visited in OTR profiles which | 414 // We do not store information about websites visited in OTR profiles which |
415 // is necessary for a Predictor, so we do not have a Predictor at all. | 415 // is necessary for a Predictor, so we do not have a Predictor at all. |
416 return NULL; | 416 return NULL; |
417 } | 417 } |
418 | 418 |
419 void OffTheRecordProfileImpl::ClearNetworkingHistorySince(base::Time time) { | 419 void OffTheRecordProfileImpl::ClearNetworkingHistorySince( |
420 // No need to do anything here, our transport security state is read-only. | 420 base::Time time, |
| 421 const base::Closure& completion) { |
| 422 // Nothing to do here, our transport security state is read-only. |
| 423 // Still, fire the callback to indicate we have finished, otherwise the |
| 424 // BrowsingDataRemover will never be destroyed and the dialog will never be |
| 425 // closed. We must do this asynchronously in order to avoid reentrancy issues. |
| 426 if (!completion.is_null()) { |
| 427 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, completion); |
| 428 } |
421 } | 429 } |
422 | 430 |
423 GURL OffTheRecordProfileImpl::GetHomePage() { | 431 GURL OffTheRecordProfileImpl::GetHomePage() { |
424 return profile_->GetHomePage(); | 432 return profile_->GetHomePage(); |
425 } | 433 } |
426 | 434 |
427 void OffTheRecordProfileImpl::Observe( | 435 void OffTheRecordProfileImpl::Observe( |
428 int type, | 436 int type, |
429 const content::NotificationSource& source, | 437 const content::NotificationSource& source, |
430 const content::NotificationDetails& details) { | 438 const content::NotificationDetails& details) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 if (!profile) | 478 if (!profile) |
471 profile = new OffTheRecordProfileImpl(this); | 479 profile = new OffTheRecordProfileImpl(this); |
472 profile->Init(); | 480 profile->Init(); |
473 return profile; | 481 return profile; |
474 } | 482 } |
475 | 483 |
476 base::Callback<ChromeURLDataManagerBackend*(void)> | 484 base::Callback<ChromeURLDataManagerBackend*(void)> |
477 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 485 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
478 return io_data_.GetChromeURLDataManagerBackendGetter(); | 486 return io_data_.GetChromeURLDataManagerBackendGetter(); |
479 } | 487 } |
OLD | NEW |