Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename two checkers to "sequence checkers"
It's more descriptive and more inclusive. Bug: 842296 Tbr: michaelbai@chromium.org Tbr: battre@chromium.org Change-Id: Icbc901c25c65cdfe5c1da70819d02f7b9f56e6a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2292808 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Commit-Queue: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#787367}
- Loading branch information
Avi Drissman
authored and
Commit Bot
committed
Jul 10, 2020
1 parent
99cd974
commit 81ac39b
Showing
15 changed files
with
123 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "content/test/content_browser_sequence_checker.h" | ||
|
||
#include "base/bind.h" | ||
#include "content/browser/web_contents/web_contents_impl.h" | ||
#include "content/test/web_contents_observer_sequence_checker.h" | ||
|
||
namespace content { | ||
|
||
namespace { | ||
bool g_sequence_checks_already_enabled = false; | ||
} | ||
|
||
ContentBrowserSequenceChecker::ContentBrowserSequenceChecker() { | ||
CHECK(!g_sequence_checks_already_enabled) | ||
<< "Tried to enable ContentBrowserSequenceChecker, but it's already been " | ||
<< "enabled."; | ||
g_sequence_checks_already_enabled = true; | ||
|
||
creation_hook_ = | ||
base::BindRepeating(&ContentBrowserSequenceChecker::OnWebContentsCreated, | ||
base::Unretained(this)); | ||
WebContentsImpl::FriendWrapper::AddCreatedCallbackForTesting(creation_hook_); | ||
} | ||
|
||
ContentBrowserSequenceChecker::~ContentBrowserSequenceChecker() { | ||
WebContentsImpl::FriendWrapper::RemoveCreatedCallbackForTesting( | ||
creation_hook_); | ||
g_sequence_checks_already_enabled = false; | ||
} | ||
|
||
void ContentBrowserSequenceChecker::OnWebContentsCreated( | ||
WebContents* web_contents) { | ||
WebContentsObserverSequenceChecker::Enable(web_contents); | ||
} | ||
|
||
} // namespace content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.