Commit 516ffe5b authored by Sergey Poromov's avatar Sergey Poromov Committed by Commit Bot

Allow initializing system OTR profile.

The CHECK was introduced to trace all unexpected paths
to create OTR profile and launch incognito.
However, it didn't allow creation of system OTR profile,
e.g. for User Manager.
See crbug.com/794154 for the crash report.

BUG=794154
TEST=Run trybots

Change-Id: I4c1159fd5f25ea97fe5dacf9df3bdb4596418bb4
Reviewed-on: https://chromium-review.googlesource.com/822654Reviewed-by: default avatarElliot Glaysher <erg@chromium.org>
Commit-Queue: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523566}
parent 46216849
......@@ -175,7 +175,7 @@ void OffTheRecordProfileImpl::Init() {
// Always crash when incognito is not available.
// Guest profiles may always be OTR. Check IncognitoModePrefs otherwise.
CHECK(profile_->IsGuestSession() ||
CHECK(profile_->IsGuestSession() || profile_->IsSystemProfile() ||
IncognitoModePrefs::GetAvailability(profile_->GetPrefs()) !=
IncognitoModePrefs::DISABLED);
......
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