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/dom_ui/chrome_url_data_manager.h" | 5 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // For async reads, we keep around a pointer to the buffer that | 76 // For async reads, we keep around a pointer to the buffer that |
77 // we're reading into. | 77 // we're reading into. |
78 scoped_refptr<net::IOBuffer> pending_buf_; | 78 scoped_refptr<net::IOBuffer> pending_buf_; |
79 int pending_buf_size_; | 79 int pending_buf_size_; |
80 std::string mime_type_; | 80 std::string mime_type_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(URLRequestChromeJob); | 82 DISALLOW_COPY_AND_ASSIGN(URLRequestChromeJob); |
83 }; | 83 }; |
84 | 84 |
85 // URLRequestChromeFileJob is a net::URLRequestJob that acts like a file:// URL | 85 // URLRequestChromeFileJob is a net::URLRequestJob that acts like a file:// URL |
86 class URLRequestChromeFileJob : public URLRequestFileJob { | 86 class URLRequestChromeFileJob : public net::URLRequestFileJob { |
87 public: | 87 public: |
88 URLRequestChromeFileJob(net::URLRequest* request, const FilePath& path); | 88 URLRequestChromeFileJob(net::URLRequest* request, const FilePath& path); |
89 | 89 |
90 private: | 90 private: |
91 virtual ~URLRequestChromeFileJob(); | 91 virtual ~URLRequestChromeFileJob(); |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(URLRequestChromeFileJob); | 93 DISALLOW_COPY_AND_ASSIGN(URLRequestChromeFileJob); |
94 }; | 94 }; |
95 | 95 |
96 void RegisterURLRequestChromeJob() { | 96 void RegisterURLRequestChromeJob() { |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 this)) { | 427 this)) { |
428 NotifyHeadersComplete(); | 428 NotifyHeadersComplete(); |
429 } else { | 429 } else { |
430 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, | 430 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, |
431 net::ERR_INVALID_URL)); | 431 net::ERR_INVALID_URL)); |
432 } | 432 } |
433 } | 433 } |
434 | 434 |
435 URLRequestChromeFileJob::URLRequestChromeFileJob(net::URLRequest* request, | 435 URLRequestChromeFileJob::URLRequestChromeFileJob(net::URLRequest* request, |
436 const FilePath& path) | 436 const FilePath& path) |
437 : URLRequestFileJob(request, path) { | 437 : net::URLRequestFileJob(request, path) { |
438 } | 438 } |
439 | 439 |
440 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } | 440 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } |
OLD | NEW |