| 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/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 const base::Closure& completion) { | 506 const base::Closure& completion) { |
| 507 // Nothing to do here, our transport security state is read-only. | 507 // Nothing to do here, our transport security state is read-only. |
| 508 // Still, fire the callback to indicate we have finished, otherwise the | 508 // Still, fire the callback to indicate we have finished, otherwise the |
| 509 // BrowsingDataRemover will never be destroyed and the dialog will never be | 509 // BrowsingDataRemover will never be destroyed and the dialog will never be |
| 510 // closed. We must do this asynchronously in order to avoid reentrancy issues. | 510 // closed. We must do this asynchronously in order to avoid reentrancy issues. |
| 511 if (!completion.is_null()) { | 511 if (!completion.is_null()) { |
| 512 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, completion); | 512 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, completion); |
| 513 } | 513 } |
| 514 } | 514 } |
| 515 | 515 |
| 516 void OffTheRecordProfileImpl::ClearDomainReliabilityMonitor( |
| 517 domain_reliability::DomainReliabilityClearMode mode, |
| 518 const base::Closure& completion) { |
| 519 // Incognito profiles don't have Domain Reliability Monitors, so there's |
| 520 // nothing to do here. |
| 521 if (!completion.is_null()) { |
| 522 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, completion); |
| 523 } |
| 524 } |
| 525 |
| 516 GURL OffTheRecordProfileImpl::GetHomePage() { | 526 GURL OffTheRecordProfileImpl::GetHomePage() { |
| 517 return profile_->GetHomePage(); | 527 return profile_->GetHomePage(); |
| 518 } | 528 } |
| 519 | 529 |
| 520 #if defined(OS_CHROMEOS) | 530 #if defined(OS_CHROMEOS) |
| 521 // Special case of the OffTheRecordProfileImpl which is used while Guest | 531 // Special case of the OffTheRecordProfileImpl which is used while Guest |
| 522 // session in CrOS. | 532 // session in CrOS. |
| 523 class GuestSessionProfile : public OffTheRecordProfileImpl { | 533 class GuestSessionProfile : public OffTheRecordProfileImpl { |
| 524 public: | 534 public: |
| 525 explicit GuestSessionProfile(Profile* real_profile) | 535 explicit GuestSessionProfile(Profile* real_profile) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 584 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 575 #if defined(OS_CHROMEOS) | 585 #if defined(OS_CHROMEOS) |
| 576 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 586 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 577 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 587 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 578 g_browser_process->local_state()); | 588 g_browser_process->local_state()); |
| 579 } | 589 } |
| 580 #endif // defined(OS_CHROMEOS) | 590 #endif // defined(OS_CHROMEOS) |
| 581 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 591 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 582 GetPrefs(), g_browser_process->local_state()); | 592 GetPrefs(), g_browser_process->local_state()); |
| 583 } | 593 } |
| OLD | NEW |