1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_CREDENTIAL_CACHE_SERVICE_FACTORY_WIN_H_
6 #define CHROME_BROWSER_SYNC_CREDENTIAL_CACHE_SERVICE_FACTORY_WIN_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/singleton.h"
10 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
16 class CredentialCacheService
;
18 class CredentialCacheServiceFactory
: public ProfileKeyedServiceFactory
{
20 static syncer::CredentialCacheService
* GetForProfile(Profile
* profile
);
22 static CredentialCacheServiceFactory
* GetInstance();
24 // Returns true if |profile| uses the "Default" directory, and false if not.
25 static bool IsDefaultProfile(Profile
* profile
);
27 // Returns true if |profile| uses the "Default" directory in the alternate
28 // user data directory, and false if not. Used only for testing.
29 static bool IsDefaultAlternateProfileForTest(Profile
* profile
);
32 friend struct DefaultSingletonTraits
<CredentialCacheServiceFactory
>;
34 CredentialCacheServiceFactory();
36 virtual ~CredentialCacheServiceFactory();
38 // ProfileKeyedServiceFactory implementation.
39 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE
;
41 // ProfileKeyedServiceFactory implementation.
42 virtual ProfileKeyedService
* BuildServiceInstanceFor(
43 Profile
* profile
) const OVERRIDE
;
48 #endif // CHROME_BROWSER_SYNC_CREDENTIAL_CACHE_SERVICE_FACTORY_WIN_H_