| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_BASE_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_BASE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/file_path.h" |
| 10 #include "base/message_loop_proxy.h" |
| 11 #include "net/url_request/url_request_job.h" |
| 12 #include "webkit/fileapi/file_system_callback_dispatcher.h" |
| 13 #include "webkit/fileapi/file_system_context.h" |
| 14 #include "webkit/fileapi/file_system_operation.h" |
| 15 |
| 16 namespace fileapi { |
| 17 |
| 18 // A request job that handles reading filesystem: URLs for directories. |
| 19 class FileSystemURLRequestJobBase : public net::URLRequestJob { |
| 20 public: |
| 21 FileSystemURLRequestJobBase( |
| 22 net::URLRequest* request, FileSystemContext* file_system_context, |
| 23 scoped_refptr<base::MessageLoopProxy> file_thread_proxy); |
| 24 |
| 25 void StartAsync(); |
| 26 |
| 27 protected: |
| 28 virtual void DidGetLocalPath(const FilePath& local_path) = 0 ; |
| 29 |
| 30 void NotifyFailed(int rv); |
| 31 void RespondFailedOnIOThread(int error_code); |
| 32 FileSystemOperation* GetNewOperation(); |
| 33 |
| 34 FilePath relative_file_path_; |
| 35 FilePath absolute_file_path_; |
| 36 scoped_refptr<FileSystemContext> file_system_context_; |
| 37 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; |
| 38 |
| 39 private: |
| 40 friend class LocalPathCallbackDispatcher; |
| 41 void OnGetLocalPath(const FilePath& local_path); |
| 42 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJobBase); |
| 43 }; |
| 44 |
| 45 } // namespace fileapi |
| 46 |
| 47 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_BASE_H_ |
| OLD | NEW |