| Index: ios/chrome/browser/signin/gaia_cookie_manager_service_factory.h
|
| diff --git a/chrome/browser/signin/gaia_cookie_manager_service_factory.h b/ios/chrome/browser/signin/gaia_cookie_manager_service_factory.h
|
| similarity index 50%
|
| copy from chrome/browser/signin/gaia_cookie_manager_service_factory.h
|
| copy to ios/chrome/browser/signin/gaia_cookie_manager_service_factory.h
|
| index 9934332e0d578dc1c319f5efefd59940a6f219eb..9733488ea59595ea79b58b8417be24e2d4b68ae8 100644
|
| --- a/chrome/browser/signin/gaia_cookie_manager_service_factory.h
|
| +++ b/ios/chrome/browser/signin/gaia_cookie_manager_service_factory.h
|
| @@ -2,24 +2,30 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_SIGNIN_GAIA_COOKIE_MANAGER_SERVICE_FACTORY_H_
|
| -#define CHROME_BROWSER_SIGNIN_GAIA_COOKIE_MANAGER_SERVICE_FACTORY_H_
|
| +#ifndef IOS_CHROME_BROWSER_SIGNIN_GAIA_COOKIE_MANAGER_SERVICE_FACTORY_H_
|
| +#define IOS_CHROME_BROWSER_SIGNIN_GAIA_COOKIE_MANAGER_SERVICE_FACTORY_H_
|
|
|
| -#include "base/memory/singleton.h"
|
| -#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
|
| +#include "base/macros.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
|
|
|
| +template <typename T>
|
| +struct DefaultSingletonTraits;
|
| class GaiaCookieManagerService;
|
| -class Profile;
|
| +
|
| +namespace ios {
|
| +
|
| +class ChromeBrowserState;
|
|
|
| // Singleton that owns the GaiaCookieManagerService(s) and associates them with
|
| // Profiles. Listens for the Profile's destruction notification and cleans up.
|
| -class GaiaCookieManagerServiceFactory :
|
| - public BrowserContextKeyedServiceFactory {
|
| +class GaiaCookieManagerServiceFactory : public BrowserStateKeyedServiceFactory {
|
| public:
|
| // Returns the instance of GaiaCookieManagerService associated with this
|
| // profile (creating one if none exists). Returns NULL if this profile cannot
|
| // have an GaiaCookieManagerService (for example, if |profile| is incognito).
|
| - static GaiaCookieManagerService* GetForProfile(Profile* profile);
|
| + static GaiaCookieManagerService* GetForBrowserState(
|
| + ios::ChromeBrowserState* browser_state);
|
|
|
| // Returns an instance of the factory singleton.
|
| static GaiaCookieManagerServiceFactory* GetInstance();
|
| @@ -30,11 +36,13 @@ class GaiaCookieManagerServiceFactory :
|
| GaiaCookieManagerServiceFactory();
|
| ~GaiaCookieManagerServiceFactory() override;
|
|
|
| - // BrowserContextKeyedServiceFactory:
|
| - KeyedService* BuildServiceInstanceFor(
|
| - content::BrowserContext* profile) const override;
|
| - void RegisterProfilePrefs(
|
| - user_prefs::PrefRegistrySyncable* registry) override;
|
| + // BrowserStateKeyedServiceFactory:
|
| + scoped_ptr<KeyedService> BuildServiceInstanceFor(
|
| + web::BrowserState* context) const override;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GaiaCookieManagerServiceFactory);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_SIGNIN_GAIA_COOKIE_MANAGER_SERVICE_FACTORY_H_
|
| +} // namespace ios
|
| +
|
| +#endif // IOS_CHROME_BROWSER_SIGNIN_GAIA_COOKIE_MANAGER_SERVICE_FACTORY_H_
|
|
|