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 "base/guid.h" | 7 #include "base/guid.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 RegistryOverrideManager::RegistryOverrideManager( | 86 RegistryOverrideManager::RegistryOverrideManager( |
87 const base::Time& timestamp, | 87 const base::Time& timestamp, |
88 const base::string16& test_key_root) | 88 const base::string16& test_key_root) |
89 : timestamp_(timestamp), test_key_root_(test_key_root) { | 89 : timestamp_(timestamp), test_key_root_(test_key_root) { |
90 DeleteStaleTestKeys(timestamp_, test_key_root_); | 90 DeleteStaleTestKeys(timestamp_, test_key_root_); |
91 } | 91 } |
92 | 92 |
93 RegistryOverrideManager::~RegistryOverrideManager() {} | 93 RegistryOverrideManager::~RegistryOverrideManager() {} |
94 | 94 |
95 void RegistryOverrideManager::OverrideRegistry( | 95 void RegistryOverrideManager::OverrideRegistry(HKEY override) { |
96 HKEY override, | |
97 const base::string16& /*override_name*/) { | |
98 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_); | 96 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_); |
99 overrides_.push_back(new ScopedRegistryKeyOverride(override, key_path)); | 97 overrides_.push_back(new ScopedRegistryKeyOverride(override, key_path)); |
100 } | 98 } |
101 | 99 |
102 base::string16 GenerateTempKeyPath() { | 100 base::string16 GenerateTempKeyPath() { |
103 return GenerateTempKeyPath(base::string16(kTempTestKeyPath), | 101 return GenerateTempKeyPath(base::string16(kTempTestKeyPath), |
104 base::Time::Now()); | 102 base::Time::Now()); |
105 } | 103 } |
106 | 104 |
107 } // namespace registry_util | 105 } // namespace registry_util |
OLD | NEW |