OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 private: | 49 private: |
50 virtual ~AutotestPrivateLoginStatusFunction() {} | 50 virtual ~AutotestPrivateLoginStatusFunction() {} |
51 virtual bool RunImpl() OVERRIDE; | 51 virtual bool RunImpl() OVERRIDE; |
52 }; | 52 }; |
53 | 53 |
54 // Don't kill the browser when we're in a browser test. | 54 // Don't kill the browser when we're in a browser test. |
55 void SetAutotestPrivateTest(); | 55 void SetAutotestPrivateTest(); |
56 | 56 |
57 // The profile-keyed service that manages the autotestPrivate extension API. | 57 // The profile-keyed service that manages the autotestPrivate extension API. |
58 class AutotestPrivateAPI : public ProfileKeyedService { | 58 class AutotestPrivateAPI : public BrowserContextKeyedService { |
59 public: | 59 public: |
60 AutotestPrivateAPI(); | 60 AutotestPrivateAPI(); |
61 | 61 |
62 // TODO(achuith): Replace these with a mock object for system calls. | 62 // TODO(achuith): Replace these with a mock object for system calls. |
63 bool test_mode() const { return test_mode_; } | 63 bool test_mode() const { return test_mode_; } |
64 void set_test_mode(bool test_mode) { test_mode_ = test_mode; } | 64 void set_test_mode(bool test_mode) { test_mode_ = test_mode; } |
65 | 65 |
66 private: | 66 private: |
67 virtual ~AutotestPrivateAPI(); | 67 virtual ~AutotestPrivateAPI(); |
68 | 68 |
69 bool test_mode_; // true for ExtensionApiTest.AutotestPrivate browser test. | 69 bool test_mode_; // true for ExtensionApiTest.AutotestPrivate browser test. |
70 }; | 70 }; |
71 | 71 |
72 } // namespace extensions | 72 } // namespace extensions |
73 | 73 |
74 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H
_ | 74 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H
_ |
OLD | NEW |