OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/test/test_reg_util_win.h" | 5 #include "base/test/test_reg_util_win.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 RegistryOverrideManager::~RegistryOverrideManager() {} | 99 RegistryOverrideManager::~RegistryOverrideManager() {} |
100 | 100 |
101 void RegistryOverrideManager::OverrideRegistry(HKEY override) { | 101 void RegistryOverrideManager::OverrideRegistry(HKEY override) { |
102 OverrideRegistry(override, nullptr); | 102 OverrideRegistry(override, nullptr); |
103 } | 103 } |
104 | 104 |
105 void RegistryOverrideManager::OverrideRegistry(HKEY override, | 105 void RegistryOverrideManager::OverrideRegistry(HKEY override, |
106 base::string16* override_path) { | 106 base::string16* override_path) { |
107 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_); | 107 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_); |
108 overrides_.push_back( | 108 overrides_.push_back( |
109 base::WrapUnique(new ScopedRegistryKeyOverride(override, key_path))); | 109 base::MakeUnique<ScopedRegistryKeyOverride>(override, key_path)); |
110 if (override_path) | 110 if (override_path) |
111 override_path->assign(key_path); | 111 override_path->assign(key_path); |
112 } | 112 } |
113 | 113 |
114 base::string16 GenerateTempKeyPath() { | 114 base::string16 GenerateTempKeyPath() { |
115 return GenerateTempKeyPath(base::string16(kTempTestKeyPath), | 115 return GenerateTempKeyPath(base::string16(kTempTestKeyPath), |
116 base::Time::Now()); | 116 base::Time::Now()); |
117 } | 117 } |
118 | 118 |
119 } // namespace registry_util | 119 } // namespace registry_util |
OLD | NEW |