OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/browser/fileapi/file_system_url_request_job.h" | 5 #include "webkit/browser/fileapi/file_system_url_request_job.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "webkit/browser/blob/file_stream_reader.h" | 28 #include "webkit/browser/blob/file_stream_reader.h" |
29 #include "webkit/browser/fileapi/file_system_context.h" | 29 #include "webkit/browser/fileapi/file_system_context.h" |
30 #include "webkit/browser/fileapi/file_system_operation_runner.h" | 30 #include "webkit/browser/fileapi/file_system_operation_runner.h" |
31 #include "webkit/common/fileapi/file_system_util.h" | 31 #include "webkit/common/fileapi/file_system_util.h" |
32 | 32 |
33 using net::NetworkDelegate; | 33 using net::NetworkDelegate; |
34 using net::URLRequest; | 34 using net::URLRequest; |
35 using net::URLRequestJob; | 35 using net::URLRequestJob; |
36 using net::URLRequestStatus; | 36 using net::URLRequestStatus; |
37 | 37 |
38 namespace fileapi { | 38 namespace storage { |
39 | 39 |
40 static net::HttpResponseHeaders* CreateHttpResponseHeaders() { | 40 static net::HttpResponseHeaders* CreateHttpResponseHeaders() { |
41 // HttpResponseHeaders expects its input string to be terminated by two NULs. | 41 // HttpResponseHeaders expects its input string to be terminated by two NULs. |
42 static const char kStatus[] = "HTTP/1.1 200 OK\0"; | 42 static const char kStatus[] = "HTTP/1.1 200 OK\0"; |
43 static const size_t kStatusLen = arraysize(kStatus); | 43 static const size_t kStatusLen = arraysize(kStatus); |
44 | 44 |
45 net::HttpResponseHeaders* headers = | 45 net::HttpResponseHeaders* headers = |
46 new net::HttpResponseHeaders(std::string(kStatus, kStatusLen)); | 46 new net::HttpResponseHeaders(std::string(kStatus, kStatusLen)); |
47 | 47 |
48 // Tell WebKit never to cache this content. | 48 // Tell WebKit never to cache this content. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 return true; | 253 return true; |
254 } | 254 } |
255 | 255 |
256 return false; | 256 return false; |
257 } | 257 } |
258 | 258 |
259 void FileSystemURLRequestJob::NotifyFailed(int rv) { | 259 void FileSystemURLRequestJob::NotifyFailed(int rv) { |
260 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); | 260 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); |
261 } | 261 } |
262 | 262 |
263 } // namespace fileapi | 263 } // namespace storage |
OLD | NEW |