| OLD | NEW |
| 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 CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 14 #include "chrome/browser/chromeos/drive/change_list_loader_observer.h" | 14 #include "chrome/browser/chromeos/drive/change_list_loader_observer.h" |
| 15 #include "chrome/browser/chromeos/drive/file_system/operation_delegate.h" | 15 #include "chrome/browser/chromeos/drive/file_system/operation_delegate.h" |
| 16 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 16 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
| 17 #include "google_apis/drive/gdata_errorcode.h" | 17 #include "google_apis/drive/drive_api_error_codes.h" |
| 18 | 18 |
| 19 class PrefService; | 19 class PrefService; |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class SequencedTaskRunner; | 22 class SequencedTaskRunner; |
| 23 } // namespace base | 23 } // namespace base |
| 24 | 24 |
| 25 namespace google_apis { | 25 namespace google_apis { |
| 26 class AboutResource; | 26 class AboutResource; |
| 27 class ResourceEntry; | 27 class ResourceEntry; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 const std::string* local_id, | 191 const std::string* local_id, |
| 192 FileError error); | 192 FileError error); |
| 193 | 193 |
| 194 void FinishUnpin(const FileOperationCallback& callback, | 194 void FinishUnpin(const FileOperationCallback& callback, |
| 195 const std::string* local_id, | 195 const std::string* local_id, |
| 196 FileError error); | 196 FileError error); |
| 197 | 197 |
| 198 // Callback for handling about resource fetch. | 198 // Callback for handling about resource fetch. |
| 199 void OnGetAboutResource( | 199 void OnGetAboutResource( |
| 200 const GetAvailableSpaceCallback& callback, | 200 const GetAvailableSpaceCallback& callback, |
| 201 google_apis::GDataErrorCode status, | 201 google_apis::DriveApiErrorCode status, |
| 202 scoped_ptr<google_apis::AboutResource> about_resource); | 202 scoped_ptr<google_apis::AboutResource> about_resource); |
| 203 | 203 |
| 204 // Part of CheckForUpdates(). Called when | 204 // Part of CheckForUpdates(). Called when |
| 205 // ChangeListLoader::CheckForUpdates() is complete. | 205 // ChangeListLoader::CheckForUpdates() is complete. |
| 206 void OnUpdateChecked(FileError error); | 206 void OnUpdateChecked(FileError error); |
| 207 | 207 |
| 208 // Part of GetResourceEntry(). | 208 // Part of GetResourceEntry(). |
| 209 // Called when ReadDirectory() is complete. | 209 // Called when ReadDirectory() is complete. |
| 210 void GetResourceEntryAfterRead(const base::FilePath& file_path, | 210 void GetResourceEntryAfterRead(const base::FilePath& file_path, |
| 211 const GetResourceEntryCallback& callback, | 211 const GetResourceEntryCallback& callback, |
| 212 FileError error); | 212 FileError error); |
| 213 | 213 |
| 214 // Part of GetShareUrl. Resolves the resource entry to get the resource it, | 214 // Part of GetShareUrl. Resolves the resource entry to get the resource it, |
| 215 // and then uses it to ask for the share url. |callback| must not be null. | 215 // and then uses it to ask for the share url. |callback| must not be null. |
| 216 void GetShareUrlAfterGetResourceEntry(const base::FilePath& file_path, | 216 void GetShareUrlAfterGetResourceEntry(const base::FilePath& file_path, |
| 217 const GURL& embed_origin, | 217 const GURL& embed_origin, |
| 218 const GetShareUrlCallback& callback, | 218 const GetShareUrlCallback& callback, |
| 219 ResourceEntry* entry, | 219 ResourceEntry* entry, |
| 220 FileError error); | 220 FileError error); |
| 221 void OnGetResourceEntryForGetShareUrl(const GetShareUrlCallback& callback, | 221 void OnGetResourceEntryForGetShareUrl(const GetShareUrlCallback& callback, |
| 222 google_apis::GDataErrorCode status, | 222 google_apis::DriveApiErrorCode status, |
| 223 const GURL& share_url); | 223 const GURL& share_url); |
| 224 // Part of AddPermission. | 224 // Part of AddPermission. |
| 225 void AddPermissionAfterGetResourceEntry( | 225 void AddPermissionAfterGetResourceEntry( |
| 226 const std::string& email, | 226 const std::string& email, |
| 227 google_apis::drive::PermissionRole role, | 227 google_apis::drive::PermissionRole role, |
| 228 const FileOperationCallback& callback, | 228 const FileOperationCallback& callback, |
| 229 ResourceEntry* entry, | 229 ResourceEntry* entry, |
| 230 FileError error); | 230 FileError error); |
| 231 | 231 |
| 232 // Part of OnDriveSyncError(). | 232 // Part of OnDriveSyncError(). |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // Note: This should remain the last member so it'll be destroyed and | 286 // Note: This should remain the last member so it'll be destroyed and |
| 287 // invalidate the weak pointers before any other members are destroyed. | 287 // invalidate the weak pointers before any other members are destroyed. |
| 288 base::WeakPtrFactory<FileSystem> weak_ptr_factory_; | 288 base::WeakPtrFactory<FileSystem> weak_ptr_factory_; |
| 289 | 289 |
| 290 DISALLOW_COPY_AND_ASSIGN(FileSystem); | 290 DISALLOW_COPY_AND_ASSIGN(FileSystem); |
| 291 }; | 291 }; |
| 292 | 292 |
| 293 } // namespace drive | 293 } // namespace drive |
| 294 | 294 |
| 295 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ | 295 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
| OLD | NEW |