Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(854)

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 496713003: Guest session operates irrespective of IncognitoModePrefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rewrite the DCHECK Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/prefs/incognito_mode_prefs.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) 117 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS)
118 // Because UserCloudPolicyManager is in a component, it cannot access 118 // Because UserCloudPolicyManager is in a component, it cannot access
119 // GetOriginalProfile. Instead, we have to inject this relation here. 119 // GetOriginalProfile. Instead, we have to inject this relation here.
120 policy::UserCloudPolicyManagerFactory::RegisterForOffTheRecordBrowserContext( 120 policy::UserCloudPolicyManagerFactory::RegisterForOffTheRecordBrowserContext(
121 this->GetOriginalProfile(), this); 121 this->GetOriginalProfile(), this);
122 #endif 122 #endif
123 123
124 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( 124 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices(
125 this); 125 this);
126 126
127 DCHECK_NE(IncognitoModePrefs::DISABLED, 127 // Guest profiles may always be OTR. Check IncognitoModePrefs otherwise.
128 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); 128 DCHECK(profile_->IsGuestSession() ||
129 IncognitoModePrefs::GetAvailability(profile_->GetPrefs()) !=
130 IncognitoModePrefs::DISABLED);
129 131
130 #if defined(OS_ANDROID) || defined(OS_IOS) 132 #if defined(OS_ANDROID) || defined(OS_IOS)
131 UseSystemProxy(); 133 UseSystemProxy();
132 #endif // defined(OS_ANDROID) || defined(OS_IOS) 134 #endif // defined(OS_ANDROID) || defined(OS_IOS)
133 135
134 // TODO(oshima): Remove the need to eagerly initialize the request context 136 // TODO(oshima): Remove the need to eagerly initialize the request context
135 // getter. chromeos::OnlineAttempt is illegally trying to access this 137 // getter. chromeos::OnlineAttempt is illegally trying to access this
136 // Profile member from a thread other than the UI thread, so we need to 138 // Profile member from a thread other than the UI thread, so we need to
137 // prevent a race. 139 // prevent a race.
138 #if defined(OS_CHROMEOS) 140 #if defined(OS_CHROMEOS)
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 533 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
532 #if defined(OS_CHROMEOS) 534 #if defined(OS_CHROMEOS)
533 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 535 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
534 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 536 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
535 g_browser_process->local_state()); 537 g_browser_process->local_state());
536 } 538 }
537 #endif // defined(OS_CHROMEOS) 539 #endif // defined(OS_CHROMEOS)
538 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 540 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
539 GetPrefs(), g_browser_process->local_state()); 541 GetPrefs(), g_browser_process->local_state());
540 } 542 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/incognito_mode_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698