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

Unified Diff: chrome/browser/net/view_http_cache_job_factory.cc

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits from codereview.chromium.org/7104022/. Created 9 years, 6 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/net/view_http_cache_job_factory.cc
diff --git a/chrome/browser/net/view_http_cache_job_factory.cc b/chrome/browser/net/view_http_cache_job_factory.cc
index cc61983651afdb9156fc63d622b16d9b11c9cf0c..06f06d178bc67eab75cd831e05365789b3fd5a16 100644
--- a/chrome/browser/net/view_http_cache_job_factory.cc
+++ b/chrome/browser/net/view_http_cache_job_factory.cc
@@ -127,12 +127,13 @@ int ViewHttpCacheJob::Core::Start(const net::URLRequest& request,
AddRef(); // Released on OnIOComplete().
std::string cache_key =
- request.url().spec().substr(strlen(chrome::kNetworkViewCacheURL));
+ request.url().spec().substr(strlen(chrome::kChromeUINetworkViewCacheURL));
int rv;
if (cache_key.empty()) {
rv = cache_helper_.GetContentsHTML(request.context(),
- chrome::kNetworkViewCacheURL, &data_,
+ chrome::kChromeUINetworkViewCacheURL,
+ &data_,
&callback_);
} else {
rv = cache_helper_.GetEntryInfoHTML(cache_key, request.context(),
@@ -183,8 +184,8 @@ void ViewHttpCacheJob::Core::OnIOComplete(int result) {
// Static.
bool ViewHttpCacheJobFactory::IsSupportedURL(const GURL& url) {
- return StartsWithASCII(url.spec(), chrome::kNetworkViewCacheURL,
- true /*case_sensitive*/);
+ return url.SchemeIs(chrome::kChromeUIScheme) &&
+ url.host() == chrome::kChromeUINetworkViewCacheHost;
}
// Static.

Powered by Google App Engine
This is Rietveld 408576698