Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: storage/browser/fileapi/file_system_url_request_job.h

Issue 1410643007: URLRequestJob: change ReadRawData contract (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Randy's comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ 5 #ifndef STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_
6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ 6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 FileSystemURLRequestJob( 36 FileSystemURLRequestJob(
37 net::URLRequest* request, 37 net::URLRequest* request,
38 net::NetworkDelegate* network_delegate, 38 net::NetworkDelegate* network_delegate,
39 const std::string& storage_domain, 39 const std::string& storage_domain,
40 FileSystemContext* file_system_context); 40 FileSystemContext* file_system_context);
41 41
42 // URLRequestJob methods: 42 // URLRequestJob methods:
43 void Start() override; 43 void Start() override;
44 void Kill() override; 44 void Kill() override;
45 bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override; 45 int ReadRawData(net::IOBuffer* buf, int buf_size) override;
46 bool IsRedirectResponse(GURL* location, int* http_status_code) override; 46 bool IsRedirectResponse(GURL* location, int* http_status_code) override;
47 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; 47 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override;
48 void GetResponseInfo(net::HttpResponseInfo* info) override; 48 void GetResponseInfo(net::HttpResponseInfo* info) override;
49 int GetResponseCode() const override; 49 int GetResponseCode() const override;
50 50
51 // FilterContext methods (via URLRequestJob): 51 // FilterContext methods (via URLRequestJob):
52 bool GetMimeType(std::string* mime_type) const override; 52 bool GetMimeType(std::string* mime_type) const override;
53 53
54 private: 54 private:
55 class CallbackDispatcher; 55 class CallbackDispatcher;
56 56
57 ~FileSystemURLRequestJob() override; 57 ~FileSystemURLRequestJob() override;
58 58
59 void StartAsync(); 59 void StartAsync();
60 void DidAttemptAutoMount(base::File::Error result); 60 void DidAttemptAutoMount(base::File::Error result);
61 void DidGetMetadata(base::File::Error error_code, 61 void DidGetMetadata(base::File::Error error_code,
62 const base::File::Info& file_info); 62 const base::File::Info& file_info);
63 void DidRead(int result); 63 void DidRead(int result);
64 void NotifyFailed(int rv);
65 64
66 const std::string storage_domain_; 65 const std::string storage_domain_;
67 FileSystemContext* file_system_context_; 66 FileSystemContext* file_system_context_;
68 scoped_ptr<storage::FileStreamReader> reader_; 67 scoped_ptr<storage::FileStreamReader> reader_;
69 FileSystemURL url_; 68 FileSystemURL url_;
70 bool is_directory_; 69 bool is_directory_;
71 scoped_ptr<net::HttpResponseInfo> response_info_; 70 scoped_ptr<net::HttpResponseInfo> response_info_;
72 int64 remaining_bytes_; 71 int64 remaining_bytes_;
72 net::Error range_parse_result_;
mmenke 2015/10/27 19:41:08 include net/base/net_errors.h
xunjieli 2015/10/27 21:24:07 Done.
73 std::vector<net::HttpByteRange> byte_ranges_;
73 net::HttpByteRange byte_range_; 74 net::HttpByteRange byte_range_;
74 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_; 75 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); 77 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob);
77 }; 78 };
78 79
79 } // namespace storage 80 } // namespace storage
80 81
81 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ 82 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698