Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6819)

Unified Diff: chrome/renderer/safe_browsing/renderer_url_loader_throttle.h

Issue 2924723002: Network service: SafeBrowsing check for frame-resources from browser. (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/safe_browsing/renderer_url_loader_throttle.h
diff --git a/chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h b/chrome/renderer/safe_browsing/renderer_url_loader_throttle.h
similarity index 59%
rename from chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h
rename to chrome/renderer/safe_browsing/renderer_url_loader_throttle.h
index 3cd284ad0bc7000d795db07b153d9052d4592ae2..f33238147fc3fef9358cc6dbb45654120b8f8c1d 100644
--- a/chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h
+++ b/chrome/renderer/safe_browsing/renderer_url_loader_throttle.h
@@ -2,33 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_RENDERER_SAFE_BROWSING_SAFE_BROWSING_URL_LOADER_THROTTLE_H_
-#define CHROME_RENDERER_SAFE_BROWSING_SAFE_BROWSING_URL_LOADER_THROTTLE_H_
+#ifndef CHROME_RENDERER_SAFE_BROWSING_RENDERER_URL_LOADER_THROTTLE_H_
+#define CHROME_RENDERER_SAFE_BROWSING_RENDERER_URL_LOADER_THROTTLE_H_
#include "base/memory/weak_ptr.h"
#include "components/safe_browsing/common/safe_browsing.mojom.h"
#include "content/public/common/url_loader_throttle.h"
-namespace chrome {
-namespace mojom {
-class SafeBrowsing;
-}
-}
-
namespace safe_browsing {
-// SafeBrowsingURLLoaderThrottle queries SafeBrowsing to determine whether the
-// URL and also redirect URLs are safe to load. It defers response processing
-// until all URL checks are completed; cancels the load if any URLs turn out to
-// be bad.
-class SafeBrowsingURLLoaderThrottle : public content::URLLoaderThrottle {
+// RendererURLLoaderThrottle is used in renderer processes to query
+// SafeBrowsing and determine whether a URL and its redirect URLs are safe to
+// load. It defers response processing until all URL checks are completed;
+// cancels the load if any URLs turn out to be bad.
+class RendererURLLoaderThrottle : public content::URLLoaderThrottle {
public:
// |safe_browsing| must stay alive until WillStartRequest() (if it is called)
// or the end of this object.
// |render_frame_id| is used for displaying SafeBrowsing UI when necessary.
- SafeBrowsingURLLoaderThrottle(mojom::SafeBrowsing* safe_browsing,
- int render_frame_id);
- ~SafeBrowsingURLLoaderThrottle() override;
+ RendererURLLoaderThrottle(mojom::SafeBrowsing* safe_browsing,
+ int render_frame_id);
+ ~RendererURLLoaderThrottle() override;
// content::URLLoaderThrottle implementation.
void WillStartRequest(const GURL& url,
@@ -52,9 +46,9 @@ class SafeBrowsingURLLoaderThrottle : public content::URLLoaderThrottle {
size_t pending_checks_ = 0;
bool blocked_ = false;
- base::WeakPtrFactory<SafeBrowsingURLLoaderThrottle> weak_factory_;
+ base::WeakPtrFactory<RendererURLLoaderThrottle> weak_factory_;
};
} // namespace safe_browsing
-#endif // CHROME_RENDERER_SAFE_BROWSING_SAFE_BROWSING_URL_LOADER_THROTTLE_H_
+#endif // CHROME_RENDERER_SAFE_BROWSING_RENDERER_URL_LOADER_THROTTLE_H_
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/safe_browsing/renderer_url_loader_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698