Chromium Code Reviews| Index: components/wifi_sync/wifi_credential_syncable_service_factory.h |
| diff --git a/components/wifi_sync/wifi_credential_syncable_service_factory.h b/components/wifi_sync/wifi_credential_syncable_service_factory.h |
| index be1dae524010da6fe08414e688fb662a6810c264..141d5573a03a1d176204dd6146526a510080410a 100644 |
| --- a/components/wifi_sync/wifi_credential_syncable_service_factory.h |
| +++ b/components/wifi_sync/wifi_credential_syncable_service_factory.h |
| @@ -5,7 +5,10 @@ |
| #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |
| #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |
| +#include <string> |
| + |
| #include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "base/memory/singleton.h" |
| #include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
| @@ -15,6 +18,7 @@ class BrowserContext; |
| namespace wifi_sync { |
| +class WifiConfigDelegate; |
| class WifiCredentialSyncableService; |
| // Singleton that owns all WifiCredentialSyncableServices and |
| @@ -29,12 +33,15 @@ class WifiCredentialSyncableServiceFactory |
| static WifiCredentialSyncableService* GetForBrowserContext( |
| content::BrowserContext* browser_context); |
| - // Returns the singleton instance. As this class has no public |
| - // instance methods, this function is not generally useful for |
| - // external callers. This function is public only so that the |
| - // Singleton template can reference it. |
| + // Returns the singleton instance. |
| static WifiCredentialSyncableServiceFactory* GetInstance(); |
| +#if defined(OS_CHROMEOS) |
| + void set_ignore_login_state_for_test(bool new_value) { |
|
mukesh agrawal
2015/01/28 22:26:27
- After renaming the member variable, the previous
|
| + ignore_login_state_for_test_ = new_value; |
| + } |
| +#endif |
| + |
| private: |
| friend struct DefaultSingletonTraits<WifiCredentialSyncableServiceFactory>; |
| @@ -45,6 +52,22 @@ class WifiCredentialSyncableServiceFactory |
| KeyedService* BuildServiceInstanceFor( |
| content::BrowserContext* context) const override; |
| +#if defined(OS_CHROMEOS) |
| + // Returns a scoped pointer to a WifiConfigDelegate, which can be |
| + // used to configure the ChromeOS Wi-Fi settings associated with |
| + // |context|. |
| + scoped_ptr<WifiConfigDelegate> BuildWifiConfigDelegateChromeOs( |
| + content::BrowserContext* context) const; |
| +#endif |
| + |
| +#if defined(OS_CHROMEOS) |
|
mukesh agrawal
2015/01/28 22:26:27
While this #if block could be collapsed into the p
|
| + // Whether or not we should use LoginState to associate a new |
| + // SyncableService with a Shill profile. Should be set to true in |
| + // sync integration tests, where it is not possible to control |
| + // LoginState at the time SyncableServices are constructed. |
| + bool ignore_login_state_for_test_ = false; |
|
mukesh agrawal
2015/01/28 22:26:27
Since this field is only present on ChromeOS, I'm
|
| +#endif |
| + |
| DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory); |
| }; |