| 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..817039f799d4b11b6adfafc1b7460655e6fdb998 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,17 @@ 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)
|
| + // Configures the factory to ignore chromeos::LoginState when
|
| + // associating a new SyncableService with a Shill profile. Intended
|
| + // for use in sync integration tests, where it is not possible to
|
| + // control LoginState at the time SyncableServices are constructed.
|
| + void IgnoreLoginStateForTest();
|
| +#endif
|
| +
|
| private:
|
| friend struct DefaultSingletonTraits<WifiCredentialSyncableServiceFactory>;
|
|
|
| @@ -45,6 +54,19 @@ class WifiCredentialSyncableServiceFactory
|
| KeyedService* BuildServiceInstanceFor(
|
| content::BrowserContext* context) const override;
|
|
|
| + // Returns a scoped pointer to a WifiConfigDelegate, which can be
|
| + // used to configure the platform-specific Wi-Fi settings associated
|
| + // with |context|.
|
| + scoped_ptr<WifiConfigDelegate> BuildWifiConfigDelegate(
|
| + content::BrowserContext* context) const;
|
| + // ChromeOS-specific code used by BuildWifiConfigDelegate.
|
| + scoped_ptr<WifiConfigDelegate> BuildWifiConfigDelegateChromeOs(
|
| + content::BrowserContext* context) const;
|
| + // Returns the name of the Shill profile associated with |context|.
|
| + std::string GetShillProfile(content::BrowserContext* context) const;
|
| +
|
| + bool use_login_state_chrome_os_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory);
|
| };
|
|
|
|
|