OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MESSAGING_NATIVE_MESSAGING_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_TEST_UTIL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_TEST_UTIL_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
12 | 13 |
13 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
14 #include "base/test/test_reg_util_win.h" | 15 #include "base/test/test_reg_util_win.h" |
15 #else | 16 #else |
16 #include "base/test/scoped_path_override.h" | 17 #include "base/test/scoped_path_override.h" |
17 #endif | 18 #endif |
18 | 19 |
19 namespace extensions { | 20 namespace extensions { |
20 | 21 |
(...skipping 13 matching lines...) Expand all Loading... |
34 ~ScopedTestNativeMessagingHost(); | 35 ~ScopedTestNativeMessagingHost(); |
35 | 36 |
36 void RegisterTestHost(bool user_level); | 37 void RegisterTestHost(bool user_level); |
37 | 38 |
38 private: | 39 private: |
39 base::ScopedTempDir temp_dir_; | 40 base::ScopedTempDir temp_dir_; |
40 | 41 |
41 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
42 registry_util::RegistryOverrideManager registry_override_; | 43 registry_util::RegistryOverrideManager registry_override_; |
43 #else | 44 #else |
44 scoped_ptr<base::ScopedPathOverride> path_override_; | 45 std::unique_ptr<base::ScopedPathOverride> path_override_; |
45 #endif | 46 #endif |
46 | 47 |
47 DISALLOW_COPY_AND_ASSIGN(ScopedTestNativeMessagingHost); | 48 DISALLOW_COPY_AND_ASSIGN(ScopedTestNativeMessagingHost); |
48 }; | 49 }; |
49 | 50 |
50 } // namespace extensions | 51 } // namespace extensions |
51 | 52 |
52 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_TEST_UTIL_H_ | 53 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_TEST_UTIL_H_ |
OLD | NEW |