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

Unified Diff: content/browser/browser_url_handler_impl.h

Issue 923183003: Move URL fixup to a preliminary phase that doesn't affect virtual URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid duplicate code 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: content/browser/browser_url_handler_impl.h
diff --git a/content/browser/browser_url_handler_impl.h b/content/browser/browser_url_handler_impl.h
index 240554b76813a2ef7c8aa31eb045f46c2ed0ea0b..4084418abc2aa0f6f13ab2382aae556707ad4b71 100644
--- a/content/browser/browser_url_handler_impl.h
+++ b/content/browser/browser_url_handler_impl.h
@@ -26,9 +26,13 @@ class CONTENT_EXPORT BrowserURLHandlerImpl : public BrowserURLHandler {
void RewriteURLIfNecessary(GURL* url,
BrowserContext* browser_context,
bool* reverse_on_redirect) override;
+ void SetFixupHandler(URLHandler handler) override;
// Add the specified handler pair to the list of URL handlers.
void AddHandlerPair(URLHandler handler, URLHandler reverse_handler) override;
+ // Fixes up the URL before rewriting occurs.
+ void FixupURLBeforeRewrite(GURL* url, BrowserContext* browser_context);
+
// Reverses the rewriting that was done for |original| using the new |url|.
bool ReverseURLRewrite(GURL* url, const GURL& original,
BrowserContext* browser_context);
@@ -39,6 +43,9 @@ class CONTENT_EXPORT BrowserURLHandlerImpl : public BrowserURLHandler {
~BrowserURLHandlerImpl() override;
friend struct DefaultSingletonTraits<BrowserURLHandlerImpl>;
+ // A URLHandler to run in a preliminary phase, before rewriting is done.
+ URLHandler fixup_handler_;
+
// The list of known URLHandlers, optionally with reverse-rewriters.
typedef std::pair<URLHandler, URLHandler> HandlerPair;
std::vector<HandlerPair> url_handlers_;
« no previous file with comments | « chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc ('k') | content/browser/browser_url_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698