| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/net/chrome_url_request_context.h" | 7 #include "chrome/browser/net/chrome_url_request_context.h" |
| 8 #include "chrome/browser/chrome_blob_storage_context.h" | 8 #include "chrome/browser/chrome_blob_storage_context.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
| 11 #include "webkit/blob/view_blob_internals_job.h" | 11 #include "webkit/blob/view_blob_internals_job.h" |
| 12 | 12 |
| 13 // static. | 13 // static. |
| 14 bool ViewBlobInternalsJobFactory::IsSupportedURL(const GURL& url) { | 14 bool ViewBlobInternalsJobFactory::IsSupportedURL(const GURL& url) { |
| 15 return StartsWithASCII(url.spec(), | 15 return StartsWithASCII(url.spec(), |
| 16 chrome::kBlobViewInternalsURL, | 16 chrome::kBlobViewInternalsURL, |
| 17 true /*case_sensitive*/); | 17 true /*case_sensitive*/); |
| 18 } | 18 } |
| 19 | 19 |
| 20 // static. | 20 // static. |
| 21 URLRequestJob* ViewBlobInternalsJobFactory::CreateJobForRequest( | 21 URLRequestJob* ViewBlobInternalsJobFactory::CreateJobForRequest( |
| 22 URLRequest* request) { | 22 net::URLRequest* request) { |
| 23 webkit_blob::BlobStorageController* blob_storage_controller = | 23 webkit_blob::BlobStorageController* blob_storage_controller = |
| 24 static_cast<ChromeURLRequestContext*>(request->context())-> | 24 static_cast<ChromeURLRequestContext*>(request->context())-> |
| 25 blob_storage_context()->controller(); | 25 blob_storage_context()->controller(); |
| 26 return new webkit_blob::ViewBlobInternalsJob( | 26 return new webkit_blob::ViewBlobInternalsJob( |
| 27 request, blob_storage_controller); | 27 request, blob_storage_controller); |
| 28 } | 28 } |
| 29 | |
| OLD | NEW |