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:: ...@@ -96,7 +96,7 @@ void AwUrlCheckerDelegateImpl::
NOTREACHED() << "Delayed warnings not implemented for WebView"; NOTREACHED() << "Delayed warnings not implemented for WebView";
} }
bool AwUrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) { bool AwUrlCheckerDelegateImpl::IsUrlAllowlisted(const GURL& url) {
return allowlist_manager_->IsUrlAllowed(url); return allowlist_manager_->IsUrlAllowed(url);
} }
......
...@@ -48,7 +48,7 @@ class AwUrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate { ...@@ -48,7 +48,7 @@ class AwUrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate {
void StartObservingInteractionsForDelayedBlockingPageHelper( void StartObservingInteractionsForDelayedBlockingPageHelper(
const security_interstitials::UnsafeResource& resource, const security_interstitials::UnsafeResource& resource,
bool is_main_frame) override; bool is_main_frame) override;
bool IsUrlWhitelisted(const GURL& url) override; bool IsUrlAllowlisted(const GURL& url) override;
bool ShouldSkipRequestCheck(const GURL& original_url, bool ShouldSkipRequestCheck(const GURL& original_url,
int frame_tree_node_id, int frame_tree_node_id,
int render_process_id, int render_process_id,
......
...@@ -126,7 +126,7 @@ void UrlCheckerDelegateImpl:: ...@@ -126,7 +126,7 @@ void UrlCheckerDelegateImpl::
is_main_frame, ui_manager_)); is_main_frame, ui_manager_));
} }
bool UrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) { bool UrlCheckerDelegateImpl::IsUrlAllowlisted(const GURL& url) {
return false; return false;
} }
......
...@@ -37,7 +37,7 @@ class UrlCheckerDelegateImpl : public UrlCheckerDelegate { ...@@ -37,7 +37,7 @@ class UrlCheckerDelegateImpl : public UrlCheckerDelegate {
const security_interstitials::UnsafeResource& resource, const security_interstitials::UnsafeResource& resource,
bool is_main_frame) override; bool is_main_frame) override;
bool IsUrlWhitelisted(const GURL& url) override; bool IsUrlAllowlisted(const GURL& url) override;
bool ShouldSkipRequestCheck(const GURL& original_url, bool ShouldSkipRequestCheck(const GURL& original_url,
int frame_tree_node_id, int frame_tree_node_id,
int render_process_id, int render_process_id,
......
...@@ -321,7 +321,7 @@ void SafeBrowsingUrlCheckerImpl::ProcessUrls() { ...@@ -321,7 +321,7 @@ void SafeBrowsingUrlCheckerImpl::ProcessUrls() {
DCHECK_EQ(STATE_NONE, state_); DCHECK_EQ(STATE_NONE, state_);
const GURL& url = urls_[next_index_].url; const GURL& url = urls_[next_index_].url;
if (url_checker_delegate_->IsUrlWhitelisted(url)) { if (url_checker_delegate_->IsUrlAllowlisted(url)) {
if (!RunNextCallback(true, false)) if (!RunNextCallback(true, false))
return; return;
......
...@@ -138,7 +138,7 @@ class MockUrlCheckerDelegate : public UrlCheckerDelegate { ...@@ -138,7 +138,7 @@ class MockUrlCheckerDelegate : public UrlCheckerDelegate {
void(const base::RepeatingCallback<content::WebContents*()>&)); void(const base::RepeatingCallback<content::WebContents*()>&));
MOCK_METHOD0(GetUIManager, BaseUIManager*()); 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_; } const SBThreatTypeSet& GetThreatTypes() override { return threat_types_; }
SafeBrowsingDatabaseManager* GetDatabaseManager() override { SafeBrowsingDatabaseManager* GetDatabaseManager() override {
return database_manager_; return database_manager_;
......
...@@ -56,9 +56,9 @@ class UrlCheckerDelegate ...@@ -56,9 +56,9 @@ class UrlCheckerDelegate
const security_interstitials::UnsafeResource& resource, const security_interstitials::UnsafeResource& resource,
bool is_main_frame) = 0; 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. // 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 // If the method returns true, the entire request won't be checked, including
// the original URL and redirects. // the original URL and redirects.
......
...@@ -38,7 +38,7 @@ class UrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate { ...@@ -38,7 +38,7 @@ class UrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate {
void StartObservingInteractionsForDelayedBlockingPageHelper( void StartObservingInteractionsForDelayedBlockingPageHelper(
const security_interstitials::UnsafeResource& resource, const security_interstitials::UnsafeResource& resource,
bool is_main_frame) override; bool is_main_frame) override;
bool IsUrlWhitelisted(const GURL& url) override; bool IsUrlAllowlisted(const GURL& url) override;
bool ShouldSkipRequestCheck(const GURL& original_url, bool ShouldSkipRequestCheck(const GURL& original_url,
int frame_tree_node_id, int frame_tree_node_id,
int render_process_id, int render_process_id,
......
...@@ -115,7 +115,7 @@ void UrlCheckerDelegateImpl:: ...@@ -115,7 +115,7 @@ void UrlCheckerDelegateImpl::
const security_interstitials::UnsafeResource& resource, const security_interstitials::UnsafeResource& resource,
bool is_main_frame) {} bool is_main_frame) {}
bool UrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) { bool UrlCheckerDelegateImpl::IsUrlAllowlisted(const GURL& url) {
return false; return false;
} }
......
...@@ -85,8 +85,8 @@ void UrlCheckerDelegateImpl::StartDisplayingDefaultBlockingPage( ...@@ -85,8 +85,8 @@ void UrlCheckerDelegateImpl::StartDisplayingDefaultBlockingPage(
false /* showed_interstitial */)); false /* showed_interstitial */));
} }
bool UrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) { bool UrlCheckerDelegateImpl::IsUrlAllowlisted(const GURL& url) {
// TODO(timvolodine): false for now, we may want whitelisting support later. // TODO(timvolodine): false for now, we may want allowlisting support later.
return false; return false;
} }
......
...@@ -42,7 +42,7 @@ class UrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate { ...@@ -42,7 +42,7 @@ class UrlCheckerDelegateImpl : public safe_browsing::UrlCheckerDelegate {
void StartObservingInteractionsForDelayedBlockingPageHelper( void StartObservingInteractionsForDelayedBlockingPageHelper(
const security_interstitials::UnsafeResource& resource, const security_interstitials::UnsafeResource& resource,
bool is_main_frame) override; bool is_main_frame) override;
bool IsUrlWhitelisted(const GURL& url) override; bool IsUrlAllowlisted(const GURL& url) override;
bool ShouldSkipRequestCheck(const GURL& original_url, bool ShouldSkipRequestCheck(const GURL& original_url,
int frame_tree_node_id, int frame_tree_node_id,
int render_process_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