Commit 35881299 authored by Tim Volodine's avatar Tim Volodine Committed by Commit Bot

Use allowlist terminology for UrlCheckerDelegate

As per code inclusion practices (go/avoid-whitelist), replace
"IsUrlWhitelisted" with "IsUrlAllowlisted" in UrlCheckerDelegate,
its subclasses and method calls for all relevant platforms.

BUG=1124420

Change-Id: Ia0eed45e8357b10a7887ecdcb63ef2a48a687c49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404933
Commit-Queue: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarAli Juma <ajuma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808326}
parent b8452ede
......@@ -96,7 +96,7 @@ void AwUrlCheckerDelegateImpl::
NOTREACHED() << "Delayed warnings not implemented for WebView";
}
bool AwUrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) {
bool AwUrlCheckerDelegateImpl::IsUrlAllowlisted(const GURL& url) {
return allowlist_manager_->IsUrlAllowed(url);
}
......
......@@ -48,7 +48,7 @@ class AwUrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate {
void StartObservingInteractionsForDelayedBlockingPageHelper(
const security_interstitials::UnsafeResource& resource,
bool is_main_frame) override;
bool IsUrlWhitelisted(const GURL& url) override;
bool IsUrlAllowlisted(const GURL& url) override;
bool ShouldSkipRequestCheck(const GURL& original_url,
int frame_tree_node_id,
int render_process_id,
......
......@@ -126,7 +126,7 @@ void UrlCheckerDelegateImpl::
is_main_frame, ui_manager_));
}
bool UrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) {
bool UrlCheckerDelegateImpl::IsUrlAllowlisted(const GURL& url) {
return false;
}
......
......@@ -37,7 +37,7 @@ class UrlCheckerDelegateImpl : public UrlCheckerDelegate {
const security_interstitials::UnsafeResource& resource,
bool is_main_frame) override;
bool IsUrlWhitelisted(const GURL& url) override;
bool IsUrlAllowlisted(const GURL& url) override;
bool ShouldSkipRequestCheck(const GURL& original_url,
int frame_tree_node_id,
int render_process_id,
......
......@@ -321,7 +321,7 @@ void SafeBrowsingUrlCheckerImpl::ProcessUrls() {
DCHECK_EQ(STATE_NONE, state_);
const GURL& url = urls_[next_index_].url;
if (url_checker_delegate_->IsUrlWhitelisted(url)) {
if (url_checker_delegate_->IsUrlAllowlisted(url)) {
if (!RunNextCallback(true, false))
return;
......
......@@ -138,7 +138,7 @@ class MockUrlCheckerDelegate : public UrlCheckerDelegate {
void(const base::RepeatingCallback<content::WebContents*()>&));
MOCK_METHOD0(GetUIManager, BaseUIManager*());
bool IsUrlWhitelisted(const GURL& url) override { return false; }
bool IsUrlAllowlisted(const GURL& url) override { return false; }
const SBThreatTypeSet& GetThreatTypes() override { return threat_types_; }
SafeBrowsingDatabaseManager* GetDatabaseManager() override {
return database_manager_;
......
......@@ -56,9 +56,9 @@ class UrlCheckerDelegate
const security_interstitials::UnsafeResource& resource,
bool is_main_frame) = 0;
// A whitelisted URL is considered safe and therefore won't be checked with
// An allowlisted URL is considered safe and therefore won't be checked with
// the SafeBrowsing database.
virtual bool IsUrlWhitelisted(const GURL& url) = 0;
virtual bool IsUrlAllowlisted(const GURL& url) = 0;
// If the method returns true, the entire request won't be checked, including
// the original URL and redirects.
......
......@@ -38,7 +38,7 @@ class UrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate {
void StartObservingInteractionsForDelayedBlockingPageHelper(
const security_interstitials::UnsafeResource& resource,
bool is_main_frame) override;
bool IsUrlWhitelisted(const GURL& url) override;
bool IsUrlAllowlisted(const GURL& url) override;
bool ShouldSkipRequestCheck(const GURL& original_url,
int frame_tree_node_id,
int render_process_id,
......
......@@ -115,7 +115,7 @@ void UrlCheckerDelegateImpl::
const security_interstitials::UnsafeResource& resource,
bool is_main_frame) {}
bool UrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) {
bool UrlCheckerDelegateImpl::IsUrlAllowlisted(const GURL& url) {
return false;
}
......
......@@ -85,8 +85,8 @@ void UrlCheckerDelegateImpl::StartDisplayingDefaultBlockingPage(
false /* showed_interstitial */));
}
bool UrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) {
// TODO(timvolodine): false for now, we may want whitelisting support later.
bool UrlCheckerDelegateImpl::IsUrlAllowlisted(const GURL& url) {
// TODO(timvolodine): false for now, we may want allowlisting support later.
return false;
}
......
......@@ -42,7 +42,7 @@ class UrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate {
void StartObservingInteractionsForDelayedBlockingPageHelper(
const security_interstitials::UnsafeResource& resource,
bool is_main_frame) override;
bool IsUrlWhitelisted(const GURL& url) override;
bool IsUrlAllowlisted(const GURL& url) override;
bool ShouldSkipRequestCheck(const GURL& original_url,
int frame_tree_node_id,
int render_process_id,
......
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