| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { | 557 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { |
| 558 // We do not store information about websites visited in OTR profiles which | 558 // We do not store information about websites visited in OTR profiles which |
| 559 // is necessary for a Predictor, so we do not have a Predictor at all. | 559 // is necessary for a Predictor, so we do not have a Predictor at all. |
| 560 return NULL; | 560 return NULL; |
| 561 } | 561 } |
| 562 | 562 |
| 563 void OffTheRecordProfileImpl::ClearNetworkingHistorySince(base::Time time) { | 563 void OffTheRecordProfileImpl::ClearNetworkingHistorySince(base::Time time) { |
| 564 // No need to do anything here, our transport security state is read-only. | 564 // No need to do anything here, our transport security state is read-only. |
| 565 } | 565 } |
| 566 | 566 |
| 567 GURL OffTheRecordProfileImpl::GetHomePage() { |
| 568 return profile_->GetHomePage(); |
| 569 } |
| 570 |
| 567 void OffTheRecordProfileImpl::Observe(int type, | 571 void OffTheRecordProfileImpl::Observe(int type, |
| 568 const content::NotificationSource& source, | 572 const content::NotificationSource& source, |
| 569 const content::NotificationDetails& details) { | 573 const content::NotificationDetails& details) { |
| 570 if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) { | 574 if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) { |
| 571 const std::string& host = | 575 const std::string& host = |
| 572 *(content::Details<const std::string>(details).ptr()); | 576 *(content::Details<const std::string>(details).ptr()); |
| 573 if (!host.empty()) { | 577 if (!host.empty()) { |
| 574 double level = profile_->GetHostZoomMap()->GetZoomLevel(host); | 578 double level = profile_->GetHostZoomMap()->GetZoomLevel(host); |
| 575 GetHostZoomMap()->SetZoomLevel(host, level); | 579 GetHostZoomMap()->SetZoomLevel(host, level); |
| 576 } | 580 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 OffTheRecordProfileImpl* profile = NULL; | 650 OffTheRecordProfileImpl* profile = NULL; |
| 647 #if defined(OS_CHROMEOS) | 651 #if defined(OS_CHROMEOS) |
| 648 if (Profile::IsGuestSession()) | 652 if (Profile::IsGuestSession()) |
| 649 profile = new GuestSessionProfile(this); | 653 profile = new GuestSessionProfile(this); |
| 650 #endif | 654 #endif |
| 651 if (!profile) | 655 if (!profile) |
| 652 profile = new OffTheRecordProfileImpl(this); | 656 profile = new OffTheRecordProfileImpl(this); |
| 653 profile->Init(); | 657 profile->Init(); |
| 654 return profile; | 658 return profile; |
| 655 } | 659 } |
| OLD | NEW |