Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: components/wifi_sync/wifi_credential_syncable_service_factory.h

Issue 876833002: wifi_sync: allow WifiCredentialSyncableServiceFactory to ignore LoginState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-4.3-syncable-service
Patch Set: remove BuildWifiConfigDelegate, restore BuildWifiConfigDelegateChromeOs Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/wifi_sync/DEPS ('k') | components/wifi_sync/wifi_credential_syncable_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a0cdc0bdc699135a5fd30ffbf16b53e7524e45bc 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,20 @@ 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;
+ // Returns the ChromeOS user-ID hash for |context|.
+ std::string GetUserHash(content::BrowserContext* context) const;
stevenjb 2015/01/28 21:12:20 This could be file local if you pass it the 'use l
mukesh agrawal 2015/01/28 22:26:27 Done.
+#endif
+
+ // Whether or not we should use LoginState to determine the user-ID
+ // hash on ChromeOS.
+ bool use_login_state_chrome_os_;
stevenjb 2015/01/28 21:12:20 This should also be #if OS_CHROMEOS. Also, slight
mukesh agrawal 2015/01/28 22:26:27 Done.
+
DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory);
};
« no previous file with comments | « components/wifi_sync/DEPS ('k') | components/wifi_sync/wifi_credential_syncable_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698