| Index: chrome/browser/extensions/api/autotest_private/autotest_private_api.h
|
| diff --git a/chrome/browser/extensions/api/autotest_private/autotest_private_api.h b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
|
| index e0a565bac7021e65b6518a05cdbd19a1bacc7780..bab85670da30ed7f5cdbec8c79bfe8ca4d6efe2d 100644
|
| --- a/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
|
| +++ b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
|
| @@ -8,8 +8,8 @@
|
| #include <string>
|
|
|
| #include "base/compiler_specific.h"
|
| +#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
|
| #include "chrome/browser/extensions/chrome_extension_function.h"
|
| -#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
|
|
|
| namespace extensions {
|
|
|
| @@ -87,20 +87,35 @@ class AutotestPrivateSimulateAsanMemoryBugFunction
|
| void SetAutotestPrivateTest();
|
|
|
| // The profile-keyed service that manages the autotestPrivate extension API.
|
| -class AutotestPrivateAPI : public BrowserContextKeyedService {
|
| +class AutotestPrivateAPI : public ProfileKeyedAPI {
|
| public:
|
| + // TODO(yoz): privatize
|
| AutotestPrivateAPI();
|
|
|
| + static ProfileKeyedAPIFactory<AutotestPrivateAPI>* GetFactoryInstance();
|
| +
|
| // TODO(achuith): Replace these with a mock object for system calls.
|
| bool test_mode() const { return test_mode_; }
|
| void set_test_mode(bool test_mode) { test_mode_ = test_mode; }
|
|
|
| private:
|
| + friend class ProfileKeyedAPIFactory<AutotestPrivateAPI>;
|
| +
|
| virtual ~AutotestPrivateAPI();
|
|
|
| + // ProfileKeyedAPI implementation.
|
| + static const char* service_name() { return "AutotestPrivateAPI"; }
|
| + static const bool kServiceIsNULLWhileTesting = true;
|
| + static const bool kServiceRedirectedInIncognito = true;
|
| +
|
| bool test_mode_; // true for ExtensionApiTest.AutotestPrivate browser test.
|
| };
|
|
|
| +template <>
|
| +BrowserContextKeyedService*
|
| + ProfileKeyedAPIFactory<AutotestPrivateAPI>::BuildServiceInstanceFor(
|
| + content::BrowserContext* context) const;
|
| +
|
| } // namespace extensions
|
|
|
| #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_
|
|
|