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

Side by Side Diff: webkit/fileapi/file_system_url_request_job.h

Issue 9372044: Refactor FileSystemOperation to take callback for each method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reflected kinuko's comments + Fixture for failing-Write -> Cancel pattern. Created 8 years, 10 months 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 | Annotate | Revision Log
OLDNEW
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 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // FilterContext methods (via URLRequestJob): 49 // FilterContext methods (via URLRequestJob):
50 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; 50 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
51 51
52 private: 52 private:
53 class CallbackDispatcher; 53 class CallbackDispatcher;
54 54
55 virtual ~FileSystemURLRequestJob(); 55 virtual ~FileSystemURLRequestJob();
56 56
57 void StartAsync(); 57 void StartAsync();
58 void DidGetMetadata(const base::PlatformFileInfo& file_info, 58 void DidGetMetadata(base::PlatformFileError error_code,
59 const base::PlatformFileInfo& file_info,
59 const FilePath& platform_path); 60 const FilePath& platform_path);
60 void DidOpen(base::PlatformFileError error_code, 61 void DidOpen(base::PlatformFileError error_code,
61 base::PassPlatformFile file, bool created); 62 base::PassPlatformFile file, bool created);
62 void DidRead(int result); 63 void DidRead(int result);
63 void NotifyFailed(int rv); 64 void NotifyFailed(int rv);
64 65
65 FileSystemContext* file_system_context_; 66 FileSystemContext* file_system_context_;
66 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; 67 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_;
67 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_; 68 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_;
68 scoped_ptr<net::FileStream> stream_; 69 scoped_ptr<net::FileStream> stream_;
69 bool is_directory_; 70 bool is_directory_;
70 scoped_ptr<net::HttpResponseInfo> response_info_; 71 scoped_ptr<net::HttpResponseInfo> response_info_;
71 int64 remaining_bytes_; 72 int64 remaining_bytes_;
72 net::HttpByteRange byte_range_; 73 net::HttpByteRange byte_range_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); 75 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob);
75 }; 76 };
76 77
77 } // namespace fileapi 78 } // namespace fileapi
78 79
79 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ 80 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_test_helper.cc ('k') | webkit/fileapi/file_system_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698