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

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

Issue 2258713003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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_mock_time_task_runner.cc ('k') | base/trace_event/memory_dump_manager.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « base/test/test_mock_time_task_runner.cc ('k') | base/trace_event/memory_dump_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698