1// Copyright 2013 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_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ 6#define CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ 7 8#include "components/keyed_service/content/browser_context_keyed_service_factory.h" 9 10template <typename T> struct DefaultSingletonTraits; 11 12namespace extensions { 13 14class InstallTracker; 15 16class InstallTrackerFactory : public BrowserContextKeyedServiceFactory { 17 public: 18 static InstallTracker* GetForBrowserContext(content::BrowserContext* context); 19 static InstallTrackerFactory* GetInstance(); 20 21 private: 22 friend struct DefaultSingletonTraits<InstallTrackerFactory>; 23 24 InstallTrackerFactory(); 25 virtual ~InstallTrackerFactory(); 26 27 // BrowserContextKeyedServiceFactory overrides: 28 virtual KeyedService* BuildServiceInstanceFor( 29 content::BrowserContext* context) const OVERRIDE; 30 virtual content::BrowserContext* GetBrowserContextToUse( 31 content::BrowserContext* context) const OVERRIDE; 32 33 DISALLOW_COPY_AND_ASSIGN(InstallTrackerFactory); 34}; 35 36} // namespace extensions 37 38#endif // CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ 39