| OLD | NEW |
| 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/ui/webui/chrome_url_data_manager_backend.h" | 5 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 net::URLRequestJob* ChromeProtocolHandler::MaybeCreateJob( | 253 net::URLRequestJob* ChromeProtocolHandler::MaybeCreateJob( |
| 254 net::URLRequest* request) const { | 254 net::URLRequest* request) const { |
| 255 DCHECK(request); | 255 DCHECK(request); |
| 256 | 256 |
| 257 // Next check for chrome://view-http-cache/*, which uses its own job type. | 257 // Next check for chrome://view-http-cache/*, which uses its own job type. |
| 258 if (ViewHttpCacheJobFactory::IsSupportedURL(request->url())) | 258 if (ViewHttpCacheJobFactory::IsSupportedURL(request->url())) |
| 259 return ViewHttpCacheJobFactory::CreateJobForRequest(request); | 259 return ViewHttpCacheJobFactory::CreateJobForRequest(request); |
| 260 | 260 |
| 261 // Next check for chrome://appcache-internals/, which uses its own job type. | 261 // Next check for chrome://appcache-internals/, which uses its own job type. |
| 262 if (IsViewAppCacheInternalsURL(request->url())) | 262 if (IsViewAppCacheInternalsURL(request->url())) |
| 263 return new appcache::ViewAppCacheInternalsJob(request, appcache_service_); | 263 return appcache::ViewAppCacheInternalsJobFactory::CreateJobForRequest( |
| 264 request, appcache_service_); |
| 264 | 265 |
| 265 // Next check for chrome://blob-internals/, which uses its own job type. | 266 // Next check for chrome://blob-internals/, which uses its own job type. |
| 266 if (ViewBlobInternalsJobFactory::IsSupportedURL(request->url())) | 267 if (ViewBlobInternalsJobFactory::IsSupportedURL(request->url())) |
| 267 return ViewBlobInternalsJobFactory::CreateJobForRequest(request); | 268 return ViewBlobInternalsJobFactory::CreateJobForRequest(request); |
| 268 | 269 |
| 269 // Fall back to using a custom handler | 270 // Fall back to using a custom handler |
| 270 return new URLRequestChromeJob(request, backend_); | 271 return new URLRequestChromeJob(request, backend_); |
| 271 } | 272 } |
| 272 | 273 |
| 273 } // namespace | 274 } // namespace |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 479 |
| 479 return new URLRequestChromeJob(request, backend_); | 480 return new URLRequestChromeJob(request, backend_); |
| 480 } | 481 } |
| 481 | 482 |
| 482 } // namespace | 483 } // namespace |
| 483 | 484 |
| 484 net::URLRequestJobFactory::ProtocolHandler* | 485 net::URLRequestJobFactory::ProtocolHandler* |
| 485 CreateDevToolsProtocolHandler(ChromeURLDataManagerBackend* backend) { | 486 CreateDevToolsProtocolHandler(ChromeURLDataManagerBackend* backend) { |
| 486 return new DevToolsJobFactory(backend); | 487 return new DevToolsJobFactory(backend); |
| 487 } | 488 } |
| OLD | NEW |