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

Side by Side Diff: chrome/browser/net/view_blob_internals_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/view_blob_internals_job_factory.h" 5 #include "chrome/browser/net/view_blob_internals_job_factory.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/net/chrome_url_request_context.h" 8 #include "chrome/browser/net/chrome_url_request_context.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "content/browser/chrome_blob_storage_context.h" 10 #include "content/browser/chrome_blob_storage_context.h"
11 #include "net/url_request/url_request.h" 11 #include "net/url_request/url_request.h"
12 #include "webkit/blob/view_blob_internals_job.h" 12 #include "webkit/blob/view_blob_internals_job.h"
13 13
14 // static. 14 // static.
15 bool ViewBlobInternalsJobFactory::IsSupportedURL(const GURL& url) { 15 bool ViewBlobInternalsJobFactory::IsSupportedURL(const GURL& url) {
16 return StartsWithASCII(url.spec(), 16 return url.SchemeIs(chrome::kChromeUIScheme) &&
17 chrome::kBlobViewInternalsURL, 17 url.host() == chrome::kChromeUIBlobInternalsHost;
18 true /*case_sensitive*/);
19 } 18 }
20 19
21 // static. 20 // static.
22 net::URLRequestJob* ViewBlobInternalsJobFactory::CreateJobForRequest( 21 net::URLRequestJob* ViewBlobInternalsJobFactory::CreateJobForRequest(
23 net::URLRequest* request) { 22 net::URLRequest* request) {
24 webkit_blob::BlobStorageController* blob_storage_controller = 23 webkit_blob::BlobStorageController* blob_storage_controller =
25 static_cast<ChromeURLRequestContext*>(request->context())-> 24 static_cast<ChromeURLRequestContext*>(request->context())->
26 blob_storage_context()->controller(); 25 blob_storage_context()->controller();
27 return new webkit_blob::ViewBlobInternalsJob( 26 return new webkit_blob::ViewBlobInternalsJob(
28 request, blob_storage_controller); 27 request, blob_storage_controller);
29 } 28 }
OLDNEW
« no previous file with comments | « chrome/browser/net/url_fixer_upper_unittest.cc ('k') | chrome/browser/net/view_http_cache_job_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698