OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DRIVE_DRIVE_URL_REQUEST_JOB_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Helper callback for handling async responses from | 83 // Helper callback for handling async responses from |
84 // DriveFileSystem::GetFileByResourceId(). | 84 // DriveFileSystem::GetFileByResourceId(). |
85 void OnGetFileByResourceId(DriveFileError error, | 85 void OnGetFileByResourceId(DriveFileError error, |
86 const base::FilePath& local_file_path, | 86 const base::FilePath& local_file_path, |
87 const std::string& mime_type, | 87 const std::string& mime_type, |
88 DriveFileType file_type); | 88 DriveFileType file_type); |
89 | 89 |
90 // Helper callback for handling result of file_util::GetFileSize(). | 90 // Helper callback for handling result of file_util::GetFileSize(). |
91 void OnGetFileSize(int64 *file_size, bool success); | 91 void OnGetFileSize(int64 *file_size, bool success); |
92 | 92 |
93 // Helper callback for GetEntryInfoByResourceId invoked by Start(). | 93 // Helper callback for GetEntryInfoByPath invoked by Start(). |
94 void OnGetEntryInfoByResourceId(const std::string& resource_id, | 94 void OnGetEntryInfoByPath(DriveFileError error, |
95 DriveFileError error, | 95 scoped_ptr<DriveEntryProto> entry_proto); |
96 const base::FilePath& drive_file_path, | |
97 scoped_ptr<DriveEntryProto> entry_proto); | |
98 | 96 |
99 // Helper methods for ReadRawData to open file and read from its corresponding | 97 // Helper methods for ReadRawData to open file and read from its corresponding |
100 // stream in a streaming fashion. | 98 // stream in a streaming fashion. |
101 bool ContinueReadFromFile(int* bytes_read); | 99 bool ContinueReadFromFile(int* bytes_read); |
102 void ReadFromFile(); | 100 void ReadFromFile(); |
103 void ReadFileStream(); | 101 void ReadFileStream(); |
104 | 102 |
105 // Helper callback for handling async responses from FileStream::Open(). | 103 // Helper callback for handling async responses from FileStream::Open(). |
106 void OnFileOpen(int open_result); | 104 void OnFileOpen(int open_result); |
107 | 105 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 138 |
141 // This should remain the last member so it'll be destroyed first and | 139 // This should remain the last member so it'll be destroyed first and |
142 // invalidate its weak pointers before other members are destroyed. | 140 // invalidate its weak pointers before other members are destroyed. |
143 base::WeakPtrFactory<DriveURLRequestJob> weak_ptr_factory_; | 141 base::WeakPtrFactory<DriveURLRequestJob> weak_ptr_factory_; |
144 DISALLOW_COPY_AND_ASSIGN(DriveURLRequestJob); | 142 DISALLOW_COPY_AND_ASSIGN(DriveURLRequestJob); |
145 }; | 143 }; |
146 | 144 |
147 } // namespace drive | 145 } // namespace drive |
148 | 146 |
149 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ | 147 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ |
OLD | NEW |