| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2016 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_PROFILES_PROFILE_STATISTICS_FACTORY_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 10 |
| 11 namespace base { |
| 12 template <typename T> struct DefaultSingletonTraits; |
| 13 } |
| 14 |
| 15 class Profile; |
| 16 class ProfileStatistics; |
| 17 |
| 18 // Singleton that owns all ProfileStatistics and associates them with Profiles. |
| 19 class ProfileStatisticsFactory : public BrowserContextKeyedServiceFactory { |
| 20 public: |
| 21 static ProfileStatistics* GetForProfile(Profile* profile); |
| 22 |
| 23 static ProfileStatisticsFactory* GetInstance(); |
| 24 |
| 25 private: |
| 26 friend struct base::DefaultSingletonTraits<ProfileStatisticsFactory>; |
| 27 |
| 28 ProfileStatisticsFactory(); |
| 29 |
| 30 // BrowserContextKeyedServiceFactory: |
| 31 KeyedService* BuildServiceInstanceFor( |
| 32 content::BrowserContext* context) const override; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(ProfileStatisticsFactory); |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_FACTORY_H_ |
| OLD | NEW |