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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

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: Fix leak in test. 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index a0ad854e231c6296469b8ee2a44639cf5c3b6ea8..188279cf8d24eb224f402fd73bb296b56a5f7175 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -104,6 +104,7 @@
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "components/translate/core/common/translate_switches.h"
+#include "components/url_fixer/url_fixer.h"
#include "content/public/browser/browser_child_process_host.h"
#include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/browser_ppapi_host.h"
@@ -2279,6 +2280,14 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
handler->AddHandlerPair(&HandleWebUI, &HandleWebUIReverse);
}
+GURL ChromeContentBrowserClient::FixupURL(const GURL& url) {
+ // WillHandleBrowserAboutURL calls url_fixer::FixupURL to ensure that about:
+ // URLs are rewritten to chrome:, but that call does other cleanup as well.
+ // Make sure this cleanup happens before the rewriting phase that determines
msw 2015/02/17 23:06:41 nit: it's a little presumptuous of this comment to
Charlie Reis 2015/02/17 23:31:48 I can see how it reads that way. Then again, it's
+ // the virtual URL.
+ return url_fixer::FixupURL(url.possibly_invalid_spec(), std::string());
+}
+
void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) {
Profile* profile = Profile::FromBrowserContext(
rvh->GetSiteInstance()->GetProcess()->GetBrowserContext());

Powered by Google App Engine
This is Rietveld 408576698