Commit 1be5bea4 authored by Shao-Chuan Lee's avatar Shao-Chuan Lee Committed by Commit Bot

arc: Check non-null profile in ArcSessionManager::SetProfile()

Currently we only call SetProfile once during initialization with
non-null |profile|. Remove preconditions that allow null |profile| if
|profile_| is already set.

This simplifies metrics recording logic in upcoming change as we no
longer consider null |profile|.

Bug: 929583
Change-Id: I68b4ac064ec07984844dc04f92ea46cf36613a21
Reviewed-on: https://chromium-review.googlesource.com/c/1493632Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shao-Chuan Lee <shaochuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636816}
parent aca70106
......@@ -435,8 +435,8 @@ bool ArcSessionManager::IsAllowed() const {
void ArcSessionManager::SetProfile(Profile* profile) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(!profile || !profile_);
DCHECK(!profile || IsArcAllowedForProfile(profile));
DCHECK(!profile_);
DCHECK(IsArcAllowedForProfile(profile));
profile_ = profile;
UpdatePersistentUMAState();
}
......
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