Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: base/test/test_reg_util_win.cc

Issue 1841573002: [Chrome ELF] New NT registry API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PRESUBMIT to allow chrome_elf directory files to use wstring. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/test/test_reg_util_win.h ('k') | chrome/browser/win/chrome_elf_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 RegistryOverrideManager::RegistryOverrideManager( 92 RegistryOverrideManager::RegistryOverrideManager(
93 const base::Time& timestamp, 93 const base::Time& timestamp,
94 const base::string16& test_key_root) 94 const base::string16& test_key_root)
95 : timestamp_(timestamp), test_key_root_(test_key_root) { 95 : timestamp_(timestamp), test_key_root_(test_key_root) {
96 DeleteStaleTestKeys(timestamp_, test_key_root_); 96 DeleteStaleTestKeys(timestamp_, test_key_root_);
97 } 97 }
98 98
99 RegistryOverrideManager::~RegistryOverrideManager() {} 99 RegistryOverrideManager::~RegistryOverrideManager() {}
100 100
101 void RegistryOverrideManager::OverrideRegistry(HKEY override) { 101 void RegistryOverrideManager::OverrideRegistry(HKEY override) {
102 OverrideRegistry(override, nullptr);
103 }
104
105 void RegistryOverrideManager::OverrideRegistry(HKEY override,
106 base::string16* override_path) {
102 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_); 107 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_);
103 overrides_.push_back( 108 overrides_.push_back(
104 base::WrapUnique(new ScopedRegistryKeyOverride(override, key_path))); 109 base::WrapUnique(new ScopedRegistryKeyOverride(override, key_path)));
110 if (override_path)
111 override_path->assign(key_path);
105 } 112 }
106 113
107 base::string16 GenerateTempKeyPath() { 114 base::string16 GenerateTempKeyPath() {
108 return GenerateTempKeyPath(base::string16(kTempTestKeyPath), 115 return GenerateTempKeyPath(base::string16(kTempTestKeyPath),
109 base::Time::Now()); 116 base::Time::Now());
110 } 117 }
111 118
112 } // namespace registry_util 119 } // namespace registry_util
OLDNEW
« no previous file with comments | « base/test/test_reg_util_win.h ('k') | chrome/browser/win/chrome_elf_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698