| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "content/browser/browser_thread.h" | 46 #include "content/browser/browser_thread.h" |
| 47 #include "content/browser/chrome_blob_storage_context.h" | 47 #include "content/browser/chrome_blob_storage_context.h" |
| 48 #include "content/browser/download/download_manager.h" | 48 #include "content/browser/download/download_manager.h" |
| 49 #include "content/browser/file_system/browser_file_system_helper.h" | 49 #include "content/browser/file_system/browser_file_system_helper.h" |
| 50 #include "content/browser/host_zoom_map.h" | 50 #include "content/browser/host_zoom_map.h" |
| 51 #include "content/browser/in_process_webkit/webkit_context.h" | 51 #include "content/browser/in_process_webkit/webkit_context.h" |
| 52 #include "content/browser/ssl/ssl_host_state.h" | 52 #include "content/browser/ssl/ssl_host_state.h" |
| 53 #include "content/browser/tab_contents/tab_contents.h" | 53 #include "content/browser/tab_contents/tab_contents.h" |
| 54 #include "content/common/notification_service.h" | 54 #include "content/common/notification_service.h" |
| 55 #include "net/base/transport_security_state.h" | 55 #include "net/base/transport_security_state.h" |
| 56 #include "net/http/http_server_properties.h" |
| 56 #include "webkit/database/database_tracker.h" | 57 #include "webkit/database/database_tracker.h" |
| 57 #include "webkit/quota/quota_manager.h" | 58 #include "webkit/quota/quota_manager.h" |
| 58 | 59 |
| 59 #if defined(OS_CHROMEOS) | 60 #if defined(OS_CHROMEOS) |
| 60 #include "chrome/browser/chromeos/preferences.h" | 61 #include "chrome/browser/chromeos/preferences.h" |
| 61 #endif | 62 #endif |
| 62 | 63 |
| 63 namespace { | 64 namespace { |
| 64 | 65 |
| 65 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, | 66 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 pref_proxy_config_tracker_ = new PrefProxyConfigTracker(GetPrefs()); | 578 pref_proxy_config_tracker_ = new PrefProxyConfigTracker(GetPrefs()); |
| 578 return pref_proxy_config_tracker_; | 579 return pref_proxy_config_tracker_; |
| 579 } | 580 } |
| 580 | 581 |
| 581 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { | 582 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { |
| 582 // We do not store information about websites visited in OTR profiles which | 583 // We do not store information about websites visited in OTR profiles which |
| 583 // is necessary for a Predictor, so we do not have a Predictor at all. | 584 // is necessary for a Predictor, so we do not have a Predictor at all. |
| 584 return NULL; | 585 return NULL; |
| 585 } | 586 } |
| 586 | 587 |
| 587 void OffTheRecordProfileImpl::DeleteTransportSecurityStateSince( | 588 void OffTheRecordProfileImpl::ClearNetworkingHistorySince(base::Time time) { |
| 588 base::Time time) { | |
| 589 // No need to do anything here, our transport security state is read-only. | 589 // No need to do anything here, our transport security state is read-only. |
| 590 } | 590 } |
| 591 | 591 |
| 592 void OffTheRecordProfileImpl::Observe(int type, | 592 void OffTheRecordProfileImpl::Observe(int type, |
| 593 const NotificationSource& source, | 593 const NotificationSource& source, |
| 594 const NotificationDetails& details) { | 594 const NotificationDetails& details) { |
| 595 if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) { | 595 if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) { |
| 596 const std::string& host = *(Details<const std::string>(details).ptr()); | 596 const std::string& host = *(Details<const std::string>(details).ptr()); |
| 597 if (!host.empty()) { | 597 if (!host.empty()) { |
| 598 double level = profile_->GetHostZoomMap()->GetZoomLevel(host); | 598 double level = profile_->GetHostZoomMap()->GetZoomLevel(host); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 OffTheRecordProfileImpl* profile = NULL; | 675 OffTheRecordProfileImpl* profile = NULL; |
| 676 #if defined(OS_CHROMEOS) | 676 #if defined(OS_CHROMEOS) |
| 677 if (Profile::IsGuestSession()) | 677 if (Profile::IsGuestSession()) |
| 678 profile = new GuestSessionProfile(this); | 678 profile = new GuestSessionProfile(this); |
| 679 #endif | 679 #endif |
| 680 if (!profile) | 680 if (!profile) |
| 681 profile = new OffTheRecordProfileImpl(this); | 681 profile = new OffTheRecordProfileImpl(this); |
| 682 profile->Init(); | 682 profile->Init(); |
| 683 return profile; | 683 return profile; |
| 684 } | 684 } |
| OLD | NEW |