| Index: ios/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.h
|
| diff --git a/ios/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.h b/ios/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ac83c41dad1c81e77055190373925d67110bb6f1
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IOS_CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_
|
| +#define IOS_CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
|
| +
|
| +template <typename T>
|
| +struct DefaultSingletonTraits;
|
| +
|
| +namespace ios {
|
| +class ChromeBrowserState;
|
| +}
|
| +
|
| +namespace enhanced_bookmarks {
|
| +
|
| +class BookmarkServerClusterService;
|
| +
|
| +// A factory to create BookmarkServerClusterService and associate them to
|
| +// ios::ChromeBrowserState.
|
| +class BookmarkServerClusterServiceFactory
|
| + : public BrowserStateKeyedServiceFactory {
|
| + public:
|
| + static BookmarkServerClusterServiceFactory* GetInstance();
|
| + static BookmarkServerClusterService* GetForBrowserState(
|
| + ios::ChromeBrowserState* browser_state);
|
| +
|
| + private:
|
| + friend struct DefaultSingletonTraits<BookmarkServerClusterServiceFactory>;
|
| +
|
| + BookmarkServerClusterServiceFactory();
|
| + ~BookmarkServerClusterServiceFactory() override;
|
| +
|
| + KeyedService* BuildServiceInstanceFor(
|
| + web::BrowserState* context) const override;
|
| + web::BrowserState* GetBrowserStateToUse(
|
| + web::BrowserState* context) const override;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(BookmarkServerClusterServiceFactory);
|
| +};
|
| +
|
| +} // namespace enhanced_bookmarsk
|
| +
|
| +#endif // IOS_CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_
|
|
|