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

Unified Diff: chrome/browser/renderer_host/safe_browsing_resource_throttle.cc

Issue 893843003: Add RedirectInfo as a redirect parameter to ResourceThrottles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document ResourceThrottle Created 5 years, 10 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/browser/renderer_host/safe_browsing_resource_throttle.cc
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc b/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
index 935338405a26b25558b01b940f304b1ef97f048c..5eb2f6a577a23d59706cf1e7d63c9266fb739c83 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
+++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
@@ -14,6 +14,7 @@
#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/web_contents.h"
#include "net/base/load_flags.h"
+#include "net/url_request/redirect_info.h"
#include "net/url_request/url_request.h"
// Maximum time in milliseconds to wait for the safe browsing service to
@@ -54,16 +55,17 @@ void SafeBrowsingResourceThrottle::WillStartRequest(bool* defer) {
*defer = true;
}
-void SafeBrowsingResourceThrottle::WillRedirectRequest(const GURL& new_url,
- bool* defer) {
+void SafeBrowsingResourceThrottle::WillRedirectRequest(
+ const net::RedirectInfo& redirect_info,
+ bool* defer) {
CHECK(state_ == STATE_NONE);
CHECK(defer_state_ == DEFERRED_NONE);
// Save the redirect urls for possible malware detail reporting later.
- redirect_urls_.push_back(new_url);
+ redirect_urls_.push_back(redirect_info.new_url);
// We need to check the new URL before following the redirect.
- if (CheckUrl(new_url))
+ if (CheckUrl(redirect_info.new_url))
return;
// If the URL couldn't be verified synchronously, defer following the

Powered by Google App Engine
This is Rietveld 408576698