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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 io_data_(this), | 92 io_data_(this), |
93 start_time_(Time::Now()), | 93 start_time_(Time::Now()), |
94 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, | 94 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, |
95 base::Unretained(this))) { | 95 base::Unretained(this))) { |
96 // Register on BrowserContext. | 96 // Register on BrowserContext. |
97 user_prefs::UserPrefs::Set(this, prefs_); | 97 user_prefs::UserPrefs::Set(this, prefs_); |
98 } | 98 } |
99 | 99 |
100 void OffTheRecordProfileImpl::Init() { | 100 void OffTheRecordProfileImpl::Init() { |
101 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( | 101 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( |
102 this, false); | 102 this); |
103 | 103 |
104 DCHECK_NE(IncognitoModePrefs::DISABLED, | 104 DCHECK_NE(IncognitoModePrefs::DISABLED, |
105 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); | 105 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); |
106 | 106 |
107 #if defined(OS_ANDROID) || defined(OS_IOS) | 107 #if defined(OS_ANDROID) || defined(OS_IOS) |
108 UseSystemProxy(); | 108 UseSystemProxy(); |
109 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 109 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
110 | 110 |
111 // TODO(oshima): Remove the need to eagerly initialize the request context | 111 // TODO(oshima): Remove the need to eagerly initialize the request context |
112 // getter. chromeos::OnlineAttempt is illegally trying to access this | 112 // getter. chromeos::OnlineAttempt is illegally trying to access this |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 489 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
490 #if defined(OS_CHROMEOS) | 490 #if defined(OS_CHROMEOS) |
491 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 491 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
492 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 492 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
493 g_browser_process->local_state()); | 493 g_browser_process->local_state()); |
494 } | 494 } |
495 #endif // defined(OS_CHROMEOS) | 495 #endif // defined(OS_CHROMEOS) |
496 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 496 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
497 GetPrefs(), g_browser_process->local_state()); | 497 GetPrefs(), g_browser_process->local_state()); |
498 } | 498 } |
499 | |
OLD | NEW |