| Index: chrome/browser/chromeos/gdata/gdata_system_service.h
|
| diff --git a/chrome/browser/chromeos/gdata/gdata_system_service.h b/chrome/browser/chromeos/gdata/gdata_system_service.h
|
| index ff4e41d8d940c1e3130ccb18dce5c16f2331e69d..e604caee67da3d801e491e91c6eae60ce5f9f925 100644
|
| --- a/chrome/browser/chromeos/gdata/gdata_system_service.h
|
| +++ b/chrome/browser/chromeos/gdata/gdata_system_service.h
|
| @@ -11,6 +11,8 @@
|
| #include "chrome/browser/profiles/profile_keyed_service.h"
|
| #include "chrome/browser/profiles/profile_keyed_service_factory.h"
|
|
|
| +class FilePath;
|
| +
|
| namespace gdata {
|
|
|
| class DocumentsServiceInterface;
|
| @@ -53,7 +55,8 @@ class GDataSystemService : public ProfileKeyedService {
|
|
|
| // Initializes the object. This function should be called before any
|
| // other functions.
|
| - void Initialize(DocumentsServiceInterface* documents_service);
|
| + void Initialize(DocumentsServiceInterface* documents_service,
|
| + const FilePath& cache_root);
|
|
|
| // Registers remote file system proxy for drive mount point.
|
| void AddDriveMountPoint();
|
| @@ -89,16 +92,20 @@ class GDataSystemServiceFactory : public ProfileKeyedServiceFactory {
|
| // Returns the GDataSystemServiceFactory instance.
|
| static GDataSystemServiceFactory* GetInstance();
|
|
|
| - // Just creates a new instance without initializing most of the fields.
|
| - // This is useful for tests such as injecting mocks.
|
| - static ProfileKeyedService* CreateInstance(Profile* profile);
|
| -
|
| - // Returns GDataSystemService for testing, with |documents_service| injected
|
| - // to GDataFileSystem.
|
| - GDataSystemService* GetWithCustomDocumentsServiceForTesting(
|
| - Profile* profile,
|
| + // Sets documents service that should be used to initialize file system in
|
| + // test. Should be called before the service is created.
|
| + // Please, make sure |documents_service| gets deleted if no system service is
|
| + // created (e.g. by calling this method with NULL).
|
| + static void set_documents_service_for_test(
|
| DocumentsServiceInterface* documents_service);
|
|
|
| + // Sets root path for the cache used in test. Should be called before the
|
| + // service is created.
|
| + // If |cache_root| is not empty, new string object will be created. Please,
|
| + // make sure it gets deleted if no system service is created (e.g. by calling
|
| + // this method with empty string).
|
| + static void set_cache_root_for_test(const std::string& cache_root);
|
| +
|
| private:
|
| friend struct DefaultSingletonTraits<GDataSystemServiceFactory>;
|
|
|
|
|