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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 } // namespace | 63 } // namespace |
64 | 64 |
65 // URLRequestChromeJob is a net::URLRequestJob that manages running | 65 // URLRequestChromeJob is a net::URLRequestJob that manages running |
66 // chrome-internal resource requests asynchronously. | 66 // chrome-internal resource requests asynchronously. |
67 // It hands off URL requests to ChromeURLDataManager, which asynchronously | 67 // It hands off URL requests to ChromeURLDataManager, which asynchronously |
68 // calls back once the data is available. | 68 // calls back once the data is available. |
69 class URLRequestChromeJob : public net::URLRequestJob { | 69 class URLRequestChromeJob : public net::URLRequestJob { |
70 public: | 70 public: |
71 explicit URLRequestChromeJob(net::URLRequest* request, | 71 URLRequestChromeJob(net::URLRequest* request, |
72 ChromeURLDataManagerBackend* backend); | 72 ChromeURLDataManagerBackend* backend); |
73 | 73 |
74 // net::URLRequestJob implementation. | 74 // net::URLRequestJob implementation. |
75 virtual void Start() OVERRIDE; | 75 virtual void Start() OVERRIDE; |
76 virtual void Kill() OVERRIDE; | 76 virtual void Kill() OVERRIDE; |
77 virtual bool ReadRawData(net::IOBuffer* buf, | 77 virtual bool ReadRawData(net::IOBuffer* buf, |
78 int buf_size, | 78 int buf_size, |
79 int *bytes_read) OVERRIDE; | 79 int *bytes_read) OVERRIDE; |
80 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 80 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
81 virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE; | 81 virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE; |
82 | 82 |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 | 489 |
490 return new URLRequestChromeJob(request, backend_); | 490 return new URLRequestChromeJob(request, backend_); |
491 } | 491 } |
492 | 492 |
493 } // namespace | 493 } // namespace |
494 | 494 |
495 net::URLRequestJobFactory::ProtocolHandler* | 495 net::URLRequestJobFactory::ProtocolHandler* |
496 CreateDevToolsProtocolHandler(ChromeURLDataManagerBackend* backend) { | 496 CreateDevToolsProtocolHandler(ChromeURLDataManagerBackend* backend) { |
497 return new DevToolsJobFactory(backend); | 497 return new DevToolsJobFactory(backend); |
498 } | 498 } |
OLD | NEW |