| 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_DRIVE_SYSTEM_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SYSTEM_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SYSTEM_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SYSTEM_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 DriveWebAppsRegistry* webapps_registry() { return webapps_registry_.get(); } | 45 DriveWebAppsRegistry* webapps_registry() { return webapps_registry_.get(); } |
| 46 | 46 |
| 47 // Clears all the local cache files and in-memory data, and remounts the file | 47 // Clears all the local cache files and in-memory data, and remounts the file |
| 48 // system. | 48 // system. |
| 49 void ClearCacheAndRemountFileSystem( | 49 void ClearCacheAndRemountFileSystem( |
| 50 const base::Callback<void(bool)>& callback); | 50 const base::Callback<void(bool)>& callback); |
| 51 | 51 |
| 52 // ProfileKeyedService override: | 52 // ProfileKeyedService override: |
| 53 virtual void Shutdown() OVERRIDE; | 53 virtual void Shutdown() OVERRIDE; |
| 54 | 54 |
| 55 // Returns true if Drive is enabled for the specified profile. |
| 56 // Must be called on UI thread. |
| 57 static bool IsDriveEnabled(Profile* profile); |
| 58 |
| 55 private: | 59 private: |
| 56 explicit DriveSystemService(Profile* profile); | 60 explicit DriveSystemService(Profile* profile); |
| 57 virtual ~DriveSystemService(); | 61 virtual ~DriveSystemService(); |
| 58 | 62 |
| 59 // Initializes the object. This function should be called before any | 63 // Initializes the object. This function should be called before any |
| 60 // other functions. | 64 // other functions. |
| 61 void Initialize(DriveServiceInterface* drive_service, | 65 void Initialize(DriveServiceInterface* drive_service, |
| 62 const FilePath& cache_root); | 66 const FilePath& cache_root); |
| 63 | 67 |
| 64 // Registers remote file system proxy for drive mount point. | 68 // Registers remote file system proxy for drive mount point. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 virtual ~DriveSystemServiceFactory(); | 131 virtual ~DriveSystemServiceFactory(); |
| 128 | 132 |
| 129 // ProfileKeyedServiceFactory: | 133 // ProfileKeyedServiceFactory: |
| 130 virtual ProfileKeyedService* BuildServiceInstanceFor( | 134 virtual ProfileKeyedService* BuildServiceInstanceFor( |
| 131 Profile* profile) const OVERRIDE; | 135 Profile* profile) const OVERRIDE; |
| 132 }; | 136 }; |
| 133 | 137 |
| 134 } // namespace gdata | 138 } // namespace gdata |
| 135 | 139 |
| 136 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SYSTEM_SERVICE_H_ | 140 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SYSTEM_SERVICE_H_ |
| OLD | NEW |