Index: chrome/browser/chromeos/drive/drive_integration_service.h |
diff --git a/chrome/browser/chromeos/drive/drive_integration_service.h b/chrome/browser/chromeos/drive/drive_integration_service.h |
index 2f6dd45c30978893135fd32ad38f00d939e039d9..dac74ff925e77684e15572e4d1cf6412be9620f2 100644 |
--- a/chrome/browser/chromeos/drive/drive_integration_service.h |
+++ b/chrome/browser/chromeos/drive/drive_integration_service.h |
@@ -185,8 +185,8 @@ class DriveIntegrationServiceFactory |
: public BrowserContextKeyedServiceFactory { |
public: |
// Factory function used by tests. |
- typedef base::Callback<DriveIntegrationService*(Profile* profile)> |
- FactoryCallback; |
+ typedef DriveIntegrationService*(FactoryFunction)(Profile* profile, |
+ void* data); |
// Returns the DriveIntegrationService for |profile|, creating it if it is |
// not yet created. |
@@ -208,7 +208,7 @@ class DriveIntegrationServiceFactory |
static DriveIntegrationServiceFactory* GetInstance(); |
// Sets a factory function for tests. |
- static void SetFactoryForTest(const FactoryCallback& factory_for_test); |
+ static void SetFactoryForTest(FactoryFunction factory_for_test, void* data); |
private: |
friend struct DefaultSingletonTraits<DriveIntegrationServiceFactory>; |
@@ -220,7 +220,10 @@ class DriveIntegrationServiceFactory |
virtual BrowserContextKeyedService* BuildServiceInstanceFor( |
content::BrowserContext* context) const OVERRIDE; |
- FactoryCallback factory_for_test_; |
+ // These are static so we can delay creating an instance of this factory |
+ // (and all its dependent factories) until the profile is created. |
tbarzic
2014/01/09 01:58:25
nit: What do you think about slightly more context
James Cook
2014/01/09 17:32:19
That's a much better comment. Done.
|
+ static FactoryFunction* factory_function_for_test_; |
+ static void* factory_data_for_test_; |
}; |
} // namespace drive |