Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / enhanced_bookmarks / bookmark_server_cluster_service_factory.h
blobe4abc4c1e332d7ceef755f9e6bd1dd332c1c6313
1 // Copyright 2014 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_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 namespace base {
12 template <typename T>
13 struct DefaultSingletonTraits;
14 } // namespace base
16 namespace enhanced_bookmarks {
18 class BookmarkServerClusterService;
20 // A factory to create one unique BookmarkServerClusterService.
21 class BookmarkServerClusterServiceFactory
22 : public BrowserContextKeyedServiceFactory {
23 public:
24 static BookmarkServerClusterServiceFactory* GetInstance();
25 static BookmarkServerClusterService* GetForBrowserContext(
26 content::BrowserContext* context);
28 private:
29 friend struct base::DefaultSingletonTraits<
30 BookmarkServerClusterServiceFactory>;
32 BookmarkServerClusterServiceFactory();
33 ~BookmarkServerClusterServiceFactory() override;
35 KeyedService* BuildServiceInstanceFor(
36 content::BrowserContext* context) const override;
38 content::BrowserContext* GetBrowserContextToUse(
39 content::BrowserContext* context) const override;
41 DISALLOW_COPY_AND_ASSIGN(BookmarkServerClusterServiceFactory);
44 } // namespace enhanced_bookmarks
46 #endif // CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_