| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "net/http/http_server_properties.h" | 52 #include "net/http/http_server_properties.h" |
| 53 #include "net/http/transport_security_state.h" | 53 #include "net/http/transport_security_state.h" |
| 54 #include "webkit/browser/database/database_tracker.h" | 54 #include "webkit/browser/database/database_tracker.h" |
| 55 | 55 |
| 56 #if defined(OS_ANDROID) || defined(OS_IOS) | 56 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 57 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 57 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 58 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 58 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
| 59 | 59 |
| 60 #if defined(OS_CHROMEOS) | 60 #if defined(OS_CHROMEOS) |
| 61 #include "chrome/browser/chromeos/preferences.h" | 61 #include "chrome/browser/chromeos/preferences.h" |
| 62 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 62 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | 63 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 63 #endif | 64 #endif |
| 64 | 65 |
| 65 using content::BrowserThread; | 66 using content::BrowserThread; |
| 66 using content::DownloadManagerDelegate; | 67 using content::DownloadManagerDelegate; |
| 67 using content::HostZoomMap; | 68 using content::HostZoomMap; |
| 68 | 69 |
| 69 namespace { | 70 namespace { |
| 70 | 71 |
| 71 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, | 72 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 #if defined(OS_CHROMEOS) | 391 #if defined(OS_CHROMEOS) |
| 391 void OffTheRecordProfileImpl::ChangeAppLocale(const std::string& locale, | 392 void OffTheRecordProfileImpl::ChangeAppLocale(const std::string& locale, |
| 392 AppLocaleChangedVia) { | 393 AppLocaleChangedVia) { |
| 393 } | 394 } |
| 394 | 395 |
| 395 void OffTheRecordProfileImpl::OnLogin() { | 396 void OffTheRecordProfileImpl::OnLogin() { |
| 396 } | 397 } |
| 397 #endif // defined(OS_CHROMEOS) | 398 #endif // defined(OS_CHROMEOS) |
| 398 | 399 |
| 399 PrefProxyConfigTracker* OffTheRecordProfileImpl::GetProxyConfigTracker() { | 400 PrefProxyConfigTracker* OffTheRecordProfileImpl::GetProxyConfigTracker() { |
| 400 if (!pref_proxy_config_tracker_) { | 401 if (!pref_proxy_config_tracker_) |
| 401 pref_proxy_config_tracker_.reset( | 402 pref_proxy_config_tracker_.reset(CreateProxyConfigTracker()); |
| 402 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs())); | |
| 403 } | |
| 404 return pref_proxy_config_tracker_.get(); | 403 return pref_proxy_config_tracker_.get(); |
| 405 } | 404 } |
| 406 | 405 |
| 407 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { | 406 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { |
| 408 // We do not store information about websites visited in OTR profiles which | 407 // We do not store information about websites visited in OTR profiles which |
| 409 // is necessary for a Predictor, so we do not have a Predictor at all. | 408 // is necessary for a Predictor, so we do not have a Predictor at all. |
| 410 return NULL; | 409 return NULL; |
| 411 } | 410 } |
| 412 | 411 |
| 413 void OffTheRecordProfileImpl::ClearNetworkingHistorySince( | 412 void OffTheRecordProfileImpl::ClearNetworkingHistorySince( |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: | 466 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: |
| 468 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); | 467 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); |
| 469 return; | 468 return; |
| 470 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: | 469 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: |
| 471 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, | 470 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, |
| 472 change.host, | 471 change.host, |
| 473 change.zoom_level); | 472 change.zoom_level); |
| 474 return; | 473 return; |
| 475 } | 474 } |
| 476 } | 475 } |
| 476 |
| 477 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 478 #if defined(OS_CHROMEOS) |
| 479 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 480 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 481 g_browser_process->local_state()); |
| 482 } |
| 483 #endif // defined(OS_CHROMEOS) |
| 484 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 485 GetPrefs(), g_browser_process->local_state()); |
| 486 } |
| 487 |
| OLD | NEW |