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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 io_data_(this), | 96 io_data_(this), |
97 start_time_(Time::Now()) { | 97 start_time_(Time::Now()) { |
98 // Register on BrowserContext. | 98 // Register on BrowserContext. |
99 user_prefs::UserPrefs::Set(this, prefs_); | 99 user_prefs::UserPrefs::Set(this, prefs_); |
100 } | 100 } |
101 | 101 |
102 void OffTheRecordProfileImpl::Init() { | 102 void OffTheRecordProfileImpl::Init() { |
103 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) | 103 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
104 // Because UserCloudPolicyManager is in a component, it cannot access | 104 // Because UserCloudPolicyManager is in a component, it cannot access |
105 // GetOriginalProfile. Instead, we have to inject this relation here. | 105 // GetOriginalProfile. Instead, we have to inject this relation here. |
106 policy::UserCloudPolicyManagerFactory::RegisterForOffTheRecordProfile( | 106 policy::UserCloudPolicyManagerFactory::RegisterForOffTheRecordBrowserContext( |
107 this->GetOriginalProfile(), this); | 107 this->GetOriginalProfile(), this); |
108 #endif | 108 #endif |
109 | 109 |
110 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( | 110 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( |
111 this); | 111 this); |
112 | 112 |
113 DCHECK_NE(IncognitoModePrefs::DISABLED, | 113 DCHECK_NE(IncognitoModePrefs::DISABLED, |
114 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); | 114 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); |
115 | 115 |
116 #if defined(OS_ANDROID) || defined(OS_IOS) | 116 #if defined(OS_ANDROID) || defined(OS_IOS) |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 497 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
498 #if defined(OS_CHROMEOS) | 498 #if defined(OS_CHROMEOS) |
499 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 499 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
500 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 500 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
501 g_browser_process->local_state()); | 501 g_browser_process->local_state()); |
502 } | 502 } |
503 #endif // defined(OS_CHROMEOS) | 503 #endif // defined(OS_CHROMEOS) |
504 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 504 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
505 GetPrefs(), g_browser_process->local_state()); | 505 GetPrefs(), g_browser_process->local_state()); |
506 } | 506 } |
OLD | NEW |