| 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_INTEGRATION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 class DriveAppRegistry; | 29 class DriveAppRegistry; |
| 30 class DriveServiceInterface; | 30 class DriveServiceInterface; |
| 31 class FileSystemInterface; | 31 class FileSystemInterface; |
| 32 class FileSystemProxy; | 32 class FileSystemProxy; |
| 33 class FileWriteHelper; | 33 class FileWriteHelper; |
| 34 class JobListInterface; | 34 class JobListInterface; |
| 35 | 35 |
| 36 namespace internal { | 36 namespace internal { |
| 37 class FileCache; | 37 class FileCache; |
| 38 class ResourceMetadata; | 38 class ResourceMetadata; |
| 39 class ResourceMetadataStorage; |
| 39 } // namespace internal | 40 } // namespace internal |
| 40 | 41 |
| 41 // Interface for classes that need to observe events from | 42 // Interface for classes that need to observe events from |
| 42 // DriveIntegrationService. All events are notified on UI thread. | 43 // DriveIntegrationService. All events are notified on UI thread. |
| 43 class DriveIntegrationServiceObserver { | 44 class DriveIntegrationServiceObserver { |
| 44 public: | 45 public: |
| 45 // Triggered when the file system is mounted. | 46 // Triggered when the file system is mounted. |
| 46 virtual void OnFileSystemMounted() { | 47 virtual void OnFileSystemMounted() { |
| 47 } | 48 } |
| 48 | 49 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void DisableDrive(); | 140 void DisableDrive(); |
| 140 | 141 |
| 141 friend class DriveIntegrationServiceFactory; | 142 friend class DriveIntegrationServiceFactory; |
| 142 | 143 |
| 143 Profile* profile_; | 144 Profile* profile_; |
| 144 // True if Drive is disabled due to initialization errors. | 145 // True if Drive is disabled due to initialization errors. |
| 145 bool drive_disabled_; | 146 bool drive_disabled_; |
| 146 | 147 |
| 147 base::FilePath cache_root_directory_; | 148 base::FilePath cache_root_directory_; |
| 148 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 149 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 150 scoped_ptr<internal::ResourceMetadataStorage, |
| 151 util::DestroyHelper> metadata_storage_; |
| 149 scoped_ptr<internal::FileCache, util::DestroyHelper> cache_; | 152 scoped_ptr<internal::FileCache, util::DestroyHelper> cache_; |
| 150 scoped_ptr<DriveServiceInterface> drive_service_; | 153 scoped_ptr<DriveServiceInterface> drive_service_; |
| 151 scoped_ptr<JobScheduler> scheduler_; | 154 scoped_ptr<JobScheduler> scheduler_; |
| 152 scoped_ptr<DriveAppRegistry> drive_app_registry_; | 155 scoped_ptr<DriveAppRegistry> drive_app_registry_; |
| 153 scoped_ptr<internal::ResourceMetadata, | 156 scoped_ptr<internal::ResourceMetadata, |
| 154 util::DestroyHelper> resource_metadata_; | 157 util::DestroyHelper> resource_metadata_; |
| 155 scoped_ptr<FileSystemInterface> file_system_; | 158 scoped_ptr<FileSystemInterface> file_system_; |
| 156 scoped_ptr<FileWriteHelper> file_write_helper_; | 159 scoped_ptr<FileWriteHelper> file_write_helper_; |
| 157 scoped_ptr<DownloadHandler> download_handler_; | 160 scoped_ptr<DownloadHandler> download_handler_; |
| 158 scoped_refptr<FileSystemProxy> file_system_proxy_; | 161 scoped_refptr<FileSystemProxy> file_system_proxy_; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // BrowserContextKeyedServiceFactory: | 219 // BrowserContextKeyedServiceFactory: |
| 217 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | 220 virtual BrowserContextKeyedService* BuildServiceInstanceFor( |
| 218 content::BrowserContext* context) const OVERRIDE; | 221 content::BrowserContext* context) const OVERRIDE; |
| 219 | 222 |
| 220 FactoryCallback factory_for_test_; | 223 FactoryCallback factory_for_test_; |
| 221 }; | 224 }; |
| 222 | 225 |
| 223 } // namespace drive | 226 } // namespace drive |
| 224 | 227 |
| 225 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ | 228 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ |
| OLD | NEW |