Commit adc302f6 authored by Sergey Poromov's avatar Sergey Poromov Committed by Commit Bot

Crash on initializing OTR profile when incognito is disabled.

We want to turn unexpected initialization of incognito mode to prevent
incognito window creation when it's disabled by policy.
These crashes are better to be reported though the crash infrastructure,
to investigate and these fix access paths.

BUG=789642

Change-Id: I040aa5b5e286df2be491952253d415c6daf0ac79
Reviewed-on: https://chromium-review.googlesource.com/806497
Commit-Queue: Sergey Poromov <poromov@chromium.org>
Reviewed-by: default avatarDrew Wilson <atwilson@chromium.org>
Reviewed-by: default avatarElliot Glaysher <erg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521724}
parent 1702c909
...@@ -173,10 +173,11 @@ void OffTheRecordProfileImpl::Init() { ...@@ -173,10 +173,11 @@ void OffTheRecordProfileImpl::Init() {
set_is_guest_profile( set_is_guest_profile(
profile_->GetPath() == ProfileManager::GetGuestProfilePath()); profile_->GetPath() == ProfileManager::GetGuestProfilePath());
// Always crash when incognito is not available.
// Guest profiles may always be OTR. Check IncognitoModePrefs otherwise. // Guest profiles may always be OTR. Check IncognitoModePrefs otherwise.
DCHECK(profile_->IsGuestSession() || CHECK(profile_->IsGuestSession() ||
IncognitoModePrefs::GetAvailability(profile_->GetPrefs()) != IncognitoModePrefs::GetAvailability(profile_->GetPrefs()) !=
IncognitoModePrefs::DISABLED); IncognitoModePrefs::DISABLED);
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
TrackZoomLevelsFromParent(); TrackZoomLevelsFromParent();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment