| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 scoped_ptr<IsolatedFileSystemScope> isolated_file_system_scope, | 52 scoped_ptr<IsolatedFileSystemScope> isolated_file_system_scope, |
| 53 const storage::FileSystemURL& file_system_url, | 53 const storage::FileSystemURL& file_system_url, |
| 54 const std::string& mime_type)> HelperCallback; | 54 const std::string& mime_type)> HelperCallback; |
| 55 | 55 |
| 56 ExternalFileURLRequestJob(void* profile_id, | 56 ExternalFileURLRequestJob(void* profile_id, |
| 57 net::URLRequest* request, | 57 net::URLRequest* request, |
| 58 net::NetworkDelegate* network_delegate); | 58 net::NetworkDelegate* network_delegate); |
| 59 | 59 |
| 60 // net::URLRequestJob overrides: | 60 // net::URLRequestJob overrides: |
| 61 virtual void SetExtraRequestHeaders( | 61 virtual void SetExtraRequestHeaders( |
| 62 const net::HttpRequestHeaders& headers) OVERRIDE; | 62 const net::HttpRequestHeaders& headers) override; |
| 63 virtual void Start() OVERRIDE; | 63 virtual void Start() override; |
| 64 virtual void Kill() OVERRIDE; | 64 virtual void Kill() override; |
| 65 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 65 virtual bool GetMimeType(std::string* mime_type) const override; |
| 66 virtual bool IsRedirectResponse(GURL* location, | 66 virtual bool IsRedirectResponse(GURL* location, |
| 67 int* http_status_code) OVERRIDE; | 67 int* http_status_code) override; |
| 68 virtual bool ReadRawData(net::IOBuffer* buf, | 68 virtual bool ReadRawData(net::IOBuffer* buf, |
| 69 int buf_size, | 69 int buf_size, |
| 70 int* bytes_read) OVERRIDE; | 70 int* bytes_read) override; |
| 71 | 71 |
| 72 protected: | 72 protected: |
| 73 virtual ~ExternalFileURLRequestJob(); | 73 virtual ~ExternalFileURLRequestJob(); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 // Called from an internal helper class defined in drive_url_request_job.cc, | 76 // Called from an internal helper class defined in drive_url_request_job.cc, |
| 77 // which is running on the UI thread. | 77 // which is running on the UI thread. |
| 78 void OnHelperResultObtained( | 78 void OnHelperResultObtained( |
| 79 net::Error error, | 79 net::Error error, |
| 80 const scoped_refptr<storage::FileSystemContext>& file_system_context, | 80 const scoped_refptr<storage::FileSystemContext>& file_system_context, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 107 | 107 |
| 108 // This should remain the last member so it'll be destroyed first and | 108 // This should remain the last member so it'll be destroyed first and |
| 109 // invalidate its weak pointers before other members are destroyed. | 109 // invalidate its weak pointers before other members are destroyed. |
| 110 base::WeakPtrFactory<ExternalFileURLRequestJob> weak_ptr_factory_; | 110 base::WeakPtrFactory<ExternalFileURLRequestJob> weak_ptr_factory_; |
| 111 DISALLOW_COPY_AND_ASSIGN(ExternalFileURLRequestJob); | 111 DISALLOW_COPY_AND_ASSIGN(ExternalFileURLRequestJob); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace chromeos | 114 } // namespace chromeos |
| 115 | 115 |
| 116 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ | 116 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_REQUEST_JOB_H_ |
| OLD | NEW |