| 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_GDATA_GDATA_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 const FileOperationCallback& callback); | 341 const FileOperationCallback& callback); |
| 342 ~CreateDirectoryParams(); | 342 ~CreateDirectoryParams(); |
| 343 | 343 |
| 344 const FilePath created_directory_path; | 344 const FilePath created_directory_path; |
| 345 const FilePath target_directory_path; | 345 const FilePath target_directory_path; |
| 346 const bool is_exclusive; | 346 const bool is_exclusive; |
| 347 const bool is_recursive; | 347 const bool is_recursive; |
| 348 FileOperationCallback callback; | 348 FileOperationCallback callback; |
| 349 }; | 349 }; |
| 350 | 350 |
| 351 explicit GDataFileSystem(Profile* profile); | 351 explicit GDataFileSystem(Profile* profile, |
| 352 DocumentsServiceInterface* documents_service); |
| 352 virtual ~GDataFileSystem(); | 353 virtual ~GDataFileSystem(); |
| 353 | 354 |
| 354 // Initiates upload operation of file defined with |file_name|, | 355 // Initiates upload operation of file defined with |file_name|, |
| 355 // |content_type| and |content_length|. The operation will place the newly | 356 // |content_type| and |content_length|. The operation will place the newly |
| 356 // created file entity into |destination_directory|. | 357 // created file entity into |destination_directory|. |
| 357 // | 358 // |
| 358 // Can be called from any thread. |callback| is run on the calling thread. | 359 // Can be called from any thread. |callback| is run on the calling thread. |
| 359 void InitiateUpload(const std::string& file_name, | 360 void InitiateUpload(const std::string& file_name, |
| 360 const std::string& content_type, | 361 const std::string& content_type, |
| 361 int64 content_length, | 362 int64 content_length, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 473 |
| 473 void NotifyDirectoryChanged(const FilePath& directory_path); | 474 void NotifyDirectoryChanged(const FilePath& directory_path); |
| 474 | 475 |
| 475 scoped_ptr<GDataDirectory> root_; | 476 scoped_ptr<GDataDirectory> root_; |
| 476 base::Lock lock_; | 477 base::Lock lock_; |
| 477 | 478 |
| 478 // The profile hosts the GDataFileSystem. | 479 // The profile hosts the GDataFileSystem. |
| 479 Profile* profile_; | 480 Profile* profile_; |
| 480 | 481 |
| 481 // The document service for the GDataFileSystem. | 482 // The document service for the GDataFileSystem. |
| 482 scoped_ptr<DocumentsService> documents_service_; | 483 scoped_ptr<DocumentsServiceInterface> documents_service_; |
| 483 | 484 |
| 484 // File content uploader. | 485 // File content uploader. |
| 485 scoped_ptr<GDataUploader> gdata_uploader_; | 486 scoped_ptr<GDataUploader> gdata_uploader_; |
| 486 // Downloads observer. | 487 // Downloads observer. |
| 487 scoped_ptr<GDataDownloadObserver> gdata_download_observer_; | 488 scoped_ptr<GDataDownloadObserver> gdata_download_observer_; |
| 488 | 489 |
| 489 base::WeakPtrFactory<GDataFileSystem> weak_ptr_factory_; | 490 base::WeakPtrFactory<GDataFileSystem> weak_ptr_factory_; |
| 490 }; | 491 }; |
| 491 | 492 |
| 492 // Singleton that owns all GDataFileSystems and associates them with | 493 // Singleton that owns all GDataFileSystems and associates them with |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 GDataDirectory*) OVERRIDE; | 563 GDataDirectory*) OVERRIDE; |
| 563 virtual void OnError(base::PlatformFileError) OVERRIDE; | 564 virtual void OnError(base::PlatformFileError) OVERRIDE; |
| 564 | 565 |
| 565 // File entry that was found. | 566 // File entry that was found. |
| 566 GDataFileBase* file_; | 567 GDataFileBase* file_; |
| 567 }; | 568 }; |
| 568 | 569 |
| 569 } // namespace gdata | 570 } // namespace gdata |
| 570 | 571 |
| 571 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 572 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |