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_DRIVE_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 class Profile; | 24 class Profile; |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 struct PlatformFileInfo; | 27 struct PlatformFileInfo; |
28 class SequencedTaskRunner; | 28 class SequencedTaskRunner; |
29 } | 29 } |
30 | 30 |
31 namespace google_apis { | 31 namespace google_apis { |
32 class AboutResource; | 32 class AboutResource; |
33 class DriveServiceInterface; | 33 class DriveServiceInterface; |
34 class DriveUploaderInterface; | |
35 class ResourceEntry; | 34 class ResourceEntry; |
36 } | 35 } |
37 | 36 |
38 namespace drive { | 37 namespace drive { |
39 | 38 |
40 class DriveCacheEntry; | 39 class DriveCacheEntry; |
41 class DriveFileSystemObserver; | 40 class DriveFileSystemObserver; |
42 class DriveFunctionRemove; | 41 class DriveFunctionRemove; |
43 class DriveResourceMetadata; | 42 class DriveResourceMetadata; |
44 class DriveScheduler; | 43 class DriveScheduler; |
45 class DriveWebAppsRegistry; | 44 class DriveWebAppsRegistry; |
46 class ChangeListLoader; | 45 class ChangeListLoader; |
47 | 46 |
48 namespace file_system { | 47 namespace file_system { |
49 class CopyOperation; | 48 class CopyOperation; |
50 class MoveOperation; | 49 class MoveOperation; |
51 class RemoveOperation; | 50 class RemoveOperation; |
52 } | 51 } |
53 | 52 |
54 // The production implementation of DriveFileSystemInterface. | 53 // The production implementation of DriveFileSystemInterface. |
55 class DriveFileSystem : public DriveFileSystemInterface, | 54 class DriveFileSystem : public DriveFileSystemInterface, |
56 public ChangeListLoaderObserver, | 55 public ChangeListLoaderObserver, |
57 public file_system::OperationObserver { | 56 public file_system::OperationObserver { |
58 public: | 57 public: |
59 DriveFileSystem(Profile* profile, | 58 DriveFileSystem(Profile* profile, |
60 DriveCache* cache, | 59 DriveCache* cache, |
61 google_apis::DriveServiceInterface* drive_service, | 60 google_apis::DriveServiceInterface* drive_service, |
62 google_apis::DriveUploaderInterface* uploader, | |
63 DriveWebAppsRegistry* webapps_registry, | 61 DriveWebAppsRegistry* webapps_registry, |
64 DriveResourceMetadata* resource_metadata, | 62 DriveResourceMetadata* resource_metadata, |
65 base::SequencedTaskRunner* blocking_task_runner); | 63 base::SequencedTaskRunner* blocking_task_runner); |
66 virtual ~DriveFileSystem(); | 64 virtual ~DriveFileSystem(); |
67 | 65 |
68 // DriveFileSystem overrides. | 66 // DriveFileSystem overrides. |
69 virtual void Initialize() OVERRIDE; | 67 virtual void Initialize() OVERRIDE; |
70 virtual void AddObserver(DriveFileSystemObserver* observer) OVERRIDE; | 68 virtual void AddObserver(DriveFileSystemObserver* observer) OVERRIDE; |
71 virtual void RemoveObserver(DriveFileSystemObserver* observer) OVERRIDE; | 69 virtual void RemoveObserver(DriveFileSystemObserver* observer) OVERRIDE; |
72 virtual void StartInitialFeedFetch() OVERRIDE; | 70 virtual void StartInitialFeedFetch() OVERRIDE; |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 const GetEntryInfoCallback& callback, | 428 const GetEntryInfoCallback& callback, |
431 base::PlatformFileInfo* file_info, | 429 base::PlatformFileInfo* file_info, |
432 bool get_file_info_result); | 430 bool get_file_info_result); |
433 | 431 |
434 // The profile hosts the DriveFileSystem via DriveSystemService. | 432 // The profile hosts the DriveFileSystem via DriveSystemService. |
435 Profile* profile_; | 433 Profile* profile_; |
436 | 434 |
437 // The cache owned by DriveSystemService. | 435 // The cache owned by DriveSystemService. |
438 DriveCache* cache_; | 436 DriveCache* cache_; |
439 | 437 |
440 // The uploader owned by DriveSystemService. | |
441 google_apis::DriveUploaderInterface* uploader_; | |
442 | |
443 // The document service owned by DriveSystemService. | 438 // The document service owned by DriveSystemService. |
444 google_apis::DriveServiceInterface* drive_service_; | 439 google_apis::DriveServiceInterface* drive_service_; |
445 | 440 |
446 // The webapps registry owned by DriveSystemService. | 441 // The webapps registry owned by DriveSystemService. |
447 DriveWebAppsRegistry* webapps_registry_; | 442 DriveWebAppsRegistry* webapps_registry_; |
448 | 443 |
449 DriveResourceMetadata* resource_metadata_; | 444 DriveResourceMetadata* resource_metadata_; |
450 | 445 |
451 // Periodic timer for checking updates. | 446 // Periodic timer for checking updates. |
452 base::Timer update_timer_; | 447 base::Timer update_timer_; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 // Note: This should remain the last member so it'll be destroyed and | 480 // Note: This should remain the last member so it'll be destroyed and |
486 // invalidate the weak pointers before any other members are destroyed. | 481 // invalidate the weak pointers before any other members are destroyed. |
487 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_; | 482 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_; |
488 | 483 |
489 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem); | 484 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem); |
490 }; | 485 }; |
491 | 486 |
492 } // namespace drive | 487 } // namespace drive |
493 | 488 |
494 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 489 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
OLD | NEW |