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_SYSTEM_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYSTEM_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYSTEM_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYSTEM_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/threading/sequenced_worker_pool.h" | 14 #include "base/threading/sequenced_worker_pool.h" |
15 #include "chrome/browser/chromeos/drive/drive_file_error.h" | 15 #include "chrome/browser/chromeos/drive/drive_file_error.h" |
16 #include "chrome/browser/profiles/profile_keyed_service.h" | 16 #include "chrome/browser/profiles/profile_keyed_service.h" |
17 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | 17 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
18 #include "sync/notifier/invalidation_handler.h" | 18 #include "sync/notifier/invalidation_handler.h" |
19 | 19 |
| 20 namespace base { |
20 class FilePath; | 21 class FilePath; |
| 22 } |
21 | 23 |
22 namespace google_apis { | 24 namespace google_apis { |
23 class DriveServiceInterface; | 25 class DriveServiceInterface; |
24 class DriveUploader; | 26 class DriveUploader; |
25 } | 27 } |
26 | 28 |
27 namespace drive { | 29 namespace drive { |
28 | 30 |
29 class DriveCache; | 31 class DriveCache; |
30 class DriveDownloadHandler; | 32 class DriveDownloadHandler; |
(...skipping 12 matching lines...) Expand all Loading... |
43 // that are used to run the Drive system. The DriveSystemService object is | 45 // that are used to run the Drive system. The DriveSystemService object is |
44 // created per-profile. | 46 // created per-profile. |
45 class DriveSystemService : public ProfileKeyedService, | 47 class DriveSystemService : public ProfileKeyedService, |
46 public syncer::InvalidationHandler { | 48 public syncer::InvalidationHandler { |
47 public: | 49 public: |
48 // test_drive_service, test_cache_root and test_file_system are used by tests | 50 // test_drive_service, test_cache_root and test_file_system are used by tests |
49 // to inject customized instances. | 51 // to inject customized instances. |
50 // Pass NULL or the empty value when not interested. | 52 // Pass NULL or the empty value when not interested. |
51 DriveSystemService(Profile* profile, | 53 DriveSystemService(Profile* profile, |
52 google_apis::DriveServiceInterface* test_drive_service, | 54 google_apis::DriveServiceInterface* test_drive_service, |
53 const FilePath& test_cache_root, | 55 const base::FilePath& test_cache_root, |
54 DriveFileSystemInterface* test_file_system); | 56 DriveFileSystemInterface* test_file_system); |
55 virtual ~DriveSystemService(); | 57 virtual ~DriveSystemService(); |
56 | 58 |
57 // Initializes the object. This function should be called before any | 59 // Initializes the object. This function should be called before any |
58 // other functions. | 60 // other functions. |
59 void Initialize(); | 61 void Initialize(); |
60 | 62 |
61 // ProfileKeyedService override: | 63 // ProfileKeyedService override: |
62 virtual void Shutdown() OVERRIDE; | 64 virtual void Shutdown() OVERRIDE; |
63 | 65 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // ProfileKeyedServiceFactory: | 194 // ProfileKeyedServiceFactory: |
193 virtual ProfileKeyedService* BuildServiceInstanceFor( | 195 virtual ProfileKeyedService* BuildServiceInstanceFor( |
194 Profile* profile) const OVERRIDE; | 196 Profile* profile) const OVERRIDE; |
195 | 197 |
196 FactoryCallback factory_for_test_; | 198 FactoryCallback factory_for_test_; |
197 }; | 199 }; |
198 | 200 |
199 } // namespace drive | 201 } // namespace drive |
200 | 202 |
201 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYSTEM_SERVICE_H_ | 203 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYSTEM_SERVICE_H_ |
OLD | NEW |