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

Unified Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc

Issue 154473002: Support redirectUrl at onHeadersReceived in WebRequest / DWR API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix WebRequestRulesRegistrySimpleTest.StageChecker test Created 6 years, 9 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/extensions/api/declarative_webrequest/webrequest_action.cc
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc
index 8731d288dabb9008adb679e9a4255481cccf65a3..739d0744b955c08569db4a8f5bf9f501b75c6541 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc
@@ -582,7 +582,7 @@ LinkedPtrEventResponseDelta WebRequestCancelAction::CreateDelta(
//
WebRequestRedirectAction::WebRequestRedirectAction(const GURL& redirect_url)
- : WebRequestAction(ON_BEFORE_REQUEST,
+ : WebRequestAction(ON_BEFORE_REQUEST | ON_HEADERS_RECEIVED,
ACTION_REDIRECT_REQUEST,
std::numeric_limits<int>::min(),
STRATEGY_DEFAULT),
@@ -619,7 +619,7 @@ LinkedPtrEventResponseDelta WebRequestRedirectAction::CreateDelta(
WebRequestRedirectToTransparentImageAction::
WebRequestRedirectToTransparentImageAction()
- : WebRequestAction(ON_BEFORE_REQUEST,
+ : WebRequestAction(ON_BEFORE_REQUEST | ON_HEADERS_RECEIVED,
ACTION_REDIRECT_TO_TRANSPARENT_IMAGE,
std::numeric_limits<int>::min(),
STRATEGY_NONE) {}
@@ -649,7 +649,7 @@ WebRequestRedirectToTransparentImageAction::CreateDelta(
WebRequestRedirectToEmptyDocumentAction::
WebRequestRedirectToEmptyDocumentAction()
- : WebRequestAction(ON_BEFORE_REQUEST,
+ : WebRequestAction(ON_BEFORE_REQUEST | ON_HEADERS_RECEIVED,
ACTION_REDIRECT_TO_EMPTY_DOCUMENT,
std::numeric_limits<int>::min(),
STRATEGY_NONE) {}
@@ -680,7 +680,7 @@ WebRequestRedirectToEmptyDocumentAction::CreateDelta(
WebRequestRedirectByRegExAction::WebRequestRedirectByRegExAction(
scoped_ptr<RE2> from_pattern,
const std::string& to_pattern)
- : WebRequestAction(ON_BEFORE_REQUEST,
+ : WebRequestAction(ON_BEFORE_REQUEST | ON_HEADERS_RECEIVED,
ACTION_REDIRECT_BY_REGEX_DOCUMENT,
std::numeric_limits<int>::min(),
STRATEGY_DEFAULT),

Powered by Google App Engine
This is Rietveld 408576698