| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 #if defined(OS_CHROMEOS) | 382 #if defined(OS_CHROMEOS) |
| 382 void OffTheRecordProfileImpl::ChangeAppLocale(const std::string& locale, | 383 void OffTheRecordProfileImpl::ChangeAppLocale(const std::string& locale, |
| 383 AppLocaleChangedVia) { | 384 AppLocaleChangedVia) { |
| 384 } | 385 } |
| 385 | 386 |
| 386 void OffTheRecordProfileImpl::OnLogin() { | 387 void OffTheRecordProfileImpl::OnLogin() { |
| 387 } | 388 } |
| 388 #endif // defined(OS_CHROMEOS) | 389 #endif // defined(OS_CHROMEOS) |
| 389 | 390 |
| 390 PrefProxyConfigTracker* OffTheRecordProfileImpl::GetProxyConfigTracker() { | 391 PrefProxyConfigTracker* OffTheRecordProfileImpl::GetProxyConfigTracker() { |
| 391 if (!pref_proxy_config_tracker_) { | 392 if (!pref_proxy_config_tracker_) |
| 392 pref_proxy_config_tracker_.reset( | 393 pref_proxy_config_tracker_.reset(CreateProxyConfigTracker()); |
| 393 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs())); | |
| 394 } | |
| 395 return pref_proxy_config_tracker_.get(); | 394 return pref_proxy_config_tracker_.get(); |
| 396 } | 395 } |
| 397 | 396 |
| 398 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { | 397 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { |
| 399 // We do not store information about websites visited in OTR profiles which | 398 // We do not store information about websites visited in OTR profiles which |
| 400 // is necessary for a Predictor, so we do not have a Predictor at all. | 399 // is necessary for a Predictor, so we do not have a Predictor at all. |
| 401 return NULL; | 400 return NULL; |
| 402 } | 401 } |
| 403 | 402 |
| 404 void OffTheRecordProfileImpl::ClearNetworkingHistorySince( | 403 void OffTheRecordProfileImpl::ClearNetworkingHistorySince( |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: | 457 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: |
| 459 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); | 458 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); |
| 460 return; | 459 return; |
| 461 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: | 460 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: |
| 462 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, | 461 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, |
| 463 change.host, | 462 change.host, |
| 464 change.zoom_level); | 463 change.zoom_level); |
| 465 return; | 464 return; |
| 466 } | 465 } |
| 467 } | 466 } |
| 467 |
| 468 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 469 #if defined(OS_CHROMEOS) |
| 470 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 471 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 472 g_browser_process->local_state()); |
| 473 } |
| 474 #endif // defined(OS_CHROMEOS) |
| 475 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 476 GetPrefs(), g_browser_process->local_state()); |
| 477 } |
| 478 |
| OLD | NEW |