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

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: Update special_tabs.py from Nirnimesh's codereview.chromium.org/6995057/. 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 86d008c449417a88737626e2216e15ce38c453b8..1c4437bee31240936b2de9ea5d2d4ae11d8e1e6a 100644
--- a/chrome/browser/net/view_http_cache_job_factory.cc
+++ b/chrome/browser/net/view_http_cache_job_factory.cc
@@ -128,12 +128,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(),
@@ -184,8 +185,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.
« no previous file with comments | « chrome/browser/net/view_blob_internals_job_factory.cc ('k') | chrome/browser/printing/cloud_print/cloud_print_setup_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698