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_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 const base::Time& timestamp, | 90 const base::Time& timestamp, |
91 const base::string16& test_key_root) | 91 const base::string16& test_key_root) |
92 : timestamp_(timestamp), test_key_root_(test_key_root) { | 92 : timestamp_(timestamp), test_key_root_(test_key_root) { |
93 DeleteStaleTestKeys(timestamp_, test_key_root_); | 93 DeleteStaleTestKeys(timestamp_, test_key_root_); |
94 } | 94 } |
95 | 95 |
96 RegistryOverrideManager::~RegistryOverrideManager() {} | 96 RegistryOverrideManager::~RegistryOverrideManager() {} |
97 | 97 |
98 void RegistryOverrideManager::OverrideRegistry(HKEY override) { | 98 void RegistryOverrideManager::OverrideRegistry(HKEY override) { |
99 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_); | 99 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_); |
100 overrides_.push_back(new ScopedRegistryKeyOverride(override, key_path)); | 100 overrides_.push_back( |
| 101 make_scoped_ptr(new ScopedRegistryKeyOverride(override, key_path))); |
101 } | 102 } |
102 | 103 |
103 base::string16 GenerateTempKeyPath() { | 104 base::string16 GenerateTempKeyPath() { |
104 return GenerateTempKeyPath(base::string16(kTempTestKeyPath), | 105 return GenerateTempKeyPath(base::string16(kTempTestKeyPath), |
105 base::Time::Now()); | 106 base::Time::Now()); |
106 } | 107 } |
107 | 108 |
108 } // namespace registry_util | 109 } // namespace registry_util |
OLD | NEW |