Index: chrome/renderer/safe_browsing/safe_browsing_renderer_throttle.cc |
diff --git a/chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.cc b/chrome/renderer/safe_browsing/safe_browsing_renderer_throttle.cc |
similarity index 76% |
rename from chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.cc |
rename to chrome/renderer/safe_browsing/safe_browsing_renderer_throttle.cc |
index 514acc9198f45cfeeb0716b0dfeeaeee7f07e9b8..520dba697b4c519f1614bd436edf7b955e055c0d 100644 |
--- a/chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.cc |
+++ b/chrome/renderer/safe_browsing/safe_browsing_renderer_throttle.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h" |
+#include "chrome/renderer/safe_browsing/safe_browsing_renderer_throttle.h" |
#include "base/logging.h" |
#include "mojo/public/cpp/bindings/interface_request.h" |
@@ -10,16 +10,16 @@ |
namespace safe_browsing { |
-SafeBrowsingURLLoaderThrottle::SafeBrowsingURLLoaderThrottle( |
+SafeBrowsingRendererThrottle::SafeBrowsingRendererThrottle( |
chrome::mojom::SafeBrowsing* safe_browsing, |
int render_frame_id) |
: safe_browsing_(safe_browsing), |
render_frame_id_(render_frame_id), |
weak_factory_(this) {} |
-SafeBrowsingURLLoaderThrottle::~SafeBrowsingURLLoaderThrottle() = default; |
+SafeBrowsingRendererThrottle::~SafeBrowsingRendererThrottle() = default; |
-void SafeBrowsingURLLoaderThrottle::WillStartRequest( |
+void SafeBrowsingRendererThrottle::WillStartRequest( |
const GURL& url, |
int load_flags, |
content::ResourceType resource_type, |
@@ -34,16 +34,16 @@ void SafeBrowsingURLLoaderThrottle::WillStartRequest( |
safe_browsing_->CreateCheckerAndCheck( |
render_frame_id_, mojo::MakeRequest(&url_checker_), url, load_flags, |
resource_type, |
- base::BindOnce(&SafeBrowsingURLLoaderThrottle::OnCheckUrlResult, |
+ base::BindOnce(&SafeBrowsingRendererThrottle::OnCheckUrlResult, |
weak_factory_.GetWeakPtr())); |
safe_browsing_ = nullptr; |
url_checker_.set_connection_error_handler( |
- base::Bind(&SafeBrowsingURLLoaderThrottle::OnConnectionError, |
+ base::Bind(&SafeBrowsingRendererThrottle::OnConnectionError, |
base::Unretained(this))); |
} |
-void SafeBrowsingURLLoaderThrottle::WillRedirectRequest( |
+void SafeBrowsingRendererThrottle::WillRedirectRequest( |
const net::RedirectInfo& redirect_info, |
bool* defer) { |
// If |blocked_| is true, the resource load has been canceled and there |
@@ -58,11 +58,11 @@ void SafeBrowsingURLLoaderThrottle::WillRedirectRequest( |
pending_checks_++; |
url_checker_->CheckUrl( |
redirect_info.new_url, |
- base::BindOnce(&SafeBrowsingURLLoaderThrottle::OnCheckUrlResult, |
+ base::BindOnce(&SafeBrowsingRendererThrottle::OnCheckUrlResult, |
base::Unretained(this))); |
} |
-void SafeBrowsingURLLoaderThrottle::WillProcessResponse(bool* defer) { |
+void SafeBrowsingRendererThrottle::WillProcessResponse(bool* defer) { |
// If |blocked_| is true, the resource load has been canceled and there |
// shouldn't be such a notification. |
DCHECK(!blocked_); |
@@ -71,7 +71,7 @@ void SafeBrowsingURLLoaderThrottle::WillProcessResponse(bool* defer) { |
*defer = true; |
} |
-void SafeBrowsingURLLoaderThrottle::OnCheckUrlResult(bool safe) { |
+void SafeBrowsingRendererThrottle::OnCheckUrlResult(bool safe) { |
if (blocked_ || !url_checker_) |
return; |
@@ -92,7 +92,7 @@ void SafeBrowsingURLLoaderThrottle::OnCheckUrlResult(bool safe) { |
} |
} |
-void SafeBrowsingURLLoaderThrottle::OnConnectionError() { |
+void SafeBrowsingRendererThrottle::OnConnectionError() { |
DCHECK(!blocked_); |
// If a service-side disconnect happens, treat all URLs as if they are safe. |