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

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

Issue 10852002: Revert 149852 - Migrate WebRequestRedirectByRegExAction to use RE2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/declarative_webrequest/webrequest_action.h
===================================================================
--- chrome/browser/extensions/api/declarative_webrequest/webrequest_action.h (revision 149852)
+++ chrome/browser/extensions/api/declarative_webrequest/webrequest_action.h (working copy)
@@ -16,6 +16,7 @@
#include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
#include "chrome/common/extensions/api/events.h"
#include "googleurl/src/gurl.h"
+#include "unicode/regex.h"
class WebRequestPermission;
@@ -37,10 +38,6 @@
class URLRequest;
}
-namespace re2 {
-class RE2;
-}
-
namespace extensions {
typedef linked_ptr<extension_web_request_api_helpers::EventResponseDelta>
@@ -251,10 +248,11 @@
// Action that instructs to redirect a network request.
class WebRequestRedirectByRegExAction : public WebRequestAction {
public:
- // The |to_pattern| has to be passed in RE2 syntax with the exception that
- // capture groups are referenced in Perl style ($1, $2, ...).
- WebRequestRedirectByRegExAction(scoped_ptr<re2::RE2> from_pattern,
- const std::string& to_pattern);
+ // The |to_pattern| has to be passed in ICU syntax.
+ // TODO(battre): Change this to Perl style when migrated to RE2.
+ explicit WebRequestRedirectByRegExAction(
+ scoped_ptr<icu::RegexPattern> from_pattern,
+ const std::string& to_pattern);
virtual ~WebRequestRedirectByRegExAction();
// Conversion of capture group styles between Perl style ($1, $2, ...) and
@@ -272,8 +270,8 @@
const base::Time& extension_install_time) const OVERRIDE;
private:
- scoped_ptr<re2::RE2> from_pattern_;
- std::string to_pattern_;
+ scoped_ptr<icu::RegexPattern> from_pattern_;
+ icu::UnicodeString to_pattern_;
DISALLOW_COPY_AND_ASSIGN(WebRequestRedirectByRegExAction);
};
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698