| Index: chrome/browser/history/history_client_factory.h
|
| diff --git a/chrome/browser/history/history_client_factory.h b/chrome/browser/history/history_client_factory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..992d8c22b80aaa06f6a6eb49424adf97937e8067
|
| --- /dev/null
|
| +++ b/chrome/browser/history/history_client_factory.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2014 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 CHROME_BROWSER_HISTORY_HISTORY_CLIENT_FACTORY_H_
|
| +#define CHROME_BROWSER_HISTORY_HISTORY_CLIENT_FACTORY_H_
|
| +
|
| +#include "base/memory/singleton.h"
|
| +#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
|
| +
|
| +class Profile;
|
| +
|
| +namespace history {
|
| +class HistoryClient;
|
| +}
|
| +
|
| +// Singleton that owns all HistoryClient and associates them with Profiles.
|
| +class HistoryClientFactory : public BrowserContextKeyedServiceFactory {
|
| + public:
|
| + static history::HistoryClient* GetForProfile(Profile* profile);
|
| +
|
| + static history::HistoryClient* GetForProfileIfExists(Profile* profile);
|
| +
|
| + static HistoryClientFactory* GetInstance();
|
| +
|
| + private:
|
| + friend struct DefaultSingletonTraits<HistoryClientFactory>;
|
| +
|
| + HistoryClientFactory();
|
| + virtual ~HistoryClientFactory();
|
| +
|
| + // BrowserContextKeyedServiceFactory:
|
| + virtual KeyedService* BuildServiceInstanceFor(
|
| + content::BrowserContext* context) const OVERRIDE;
|
| + virtual content::BrowserContext* GetBrowserContextToUse(
|
| + content::BrowserContext* context) const OVERRIDE;
|
| + virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_HISTORY_HISTORY_CLIENT_FACTORY_H_
|
|
|