11e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
21e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
31e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// found in the LICENSE file.
41e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
51e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_FACTORY_H_
61e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_FACTORY_H_
71e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
81e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "base/memory/scoped_ptr.h"
91e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "base/memory/singleton.h"
10a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
111e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
121e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class ExtensionSyncService;
131e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class Profile;
141e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
151e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class ExtensionSyncServiceFactory : public BrowserContextKeyedServiceFactory {
161e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) public:
171e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  static ExtensionSyncService* GetForProfile(Profile* profile);
181e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
191e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  static ExtensionSyncServiceFactory* GetInstance();
201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
211e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) private:
221e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  friend struct DefaultSingletonTraits<ExtensionSyncServiceFactory>;
231e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
241e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  ExtensionSyncServiceFactory();
251e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  virtual ~ExtensionSyncServiceFactory();
261e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
27a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  virtual KeyedService* BuildServiceInstanceFor(
281e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)      content::BrowserContext* profile) const OVERRIDE;
291e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  virtual content::BrowserContext* GetBrowserContextToUse(
301e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)      content::BrowserContext* context) const OVERRIDE;
311e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)};
321e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
331e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#endif  // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_FACTORY_H_
34