OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_CREDENTIAL_CACHE_SERVICE_FACTORY_WIN_H_ |
| 6 #define CHROME_BROWSER_SYNC_CREDENTIAL_CACHE_SERVICE_FACTORY_WIN_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/singleton.h" |
| 10 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
| 11 |
| 12 class Profile; |
| 13 |
| 14 namespace syncer { |
| 15 |
| 16 class CredentialCacheService; |
| 17 |
| 18 class CredentialCacheServiceFactory : public ProfileKeyedServiceFactory { |
| 19 public: |
| 20 static syncer::CredentialCacheService* GetForProfile(Profile* profile); |
| 21 |
| 22 static CredentialCacheServiceFactory* GetInstance(); |
| 23 |
| 24 private: |
| 25 friend struct DefaultSingletonTraits<CredentialCacheServiceFactory>; |
| 26 |
| 27 CredentialCacheServiceFactory(); |
| 28 |
| 29 virtual ~CredentialCacheServiceFactory(); |
| 30 |
| 31 // Returns true if |profile| uses the "Default" directory, and false if not. |
| 32 static bool IsDefaultProfile(Profile* profile); |
| 33 |
| 34 // ProfileKeyedServiceFactory implementation. |
| 35 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; |
| 36 |
| 37 // ProfileKeyedServiceFactory implementation. |
| 38 virtual ProfileKeyedService* BuildServiceInstanceFor( |
| 39 Profile* profile) const OVERRIDE; |
| 40 }; |
| 41 |
| 42 } // namespace syncer |
| 43 |
| 44 #endif // CHROME_BROWSER_SYNC_CREDENTIAL_CACHE_SERVICE_FACTORY_WIN_H_ |
OLD | NEW |