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

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

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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') | base/test/test_reg_util_win_unittest.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"
11 #include "base/memory/ptr_util.h"
11 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
13 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 17
17 namespace registry_util { 18 namespace registry_util {
18 19
19 namespace { 20 namespace {
20 21
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 const base::string16& test_key_root) 94 const base::string16& test_key_root)
94 : timestamp_(timestamp), test_key_root_(test_key_root) { 95 : timestamp_(timestamp), test_key_root_(test_key_root) {
95 DeleteStaleTestKeys(timestamp_, test_key_root_); 96 DeleteStaleTestKeys(timestamp_, test_key_root_);
96 } 97 }
97 98
98 RegistryOverrideManager::~RegistryOverrideManager() {} 99 RegistryOverrideManager::~RegistryOverrideManager() {}
99 100
100 void RegistryOverrideManager::OverrideRegistry(HKEY override) { 101 void RegistryOverrideManager::OverrideRegistry(HKEY override) {
101 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_); 102 base::string16 key_path = GenerateTempKeyPath(test_key_root_, timestamp_);
102 overrides_.push_back( 103 overrides_.push_back(
103 make_scoped_ptr(new ScopedRegistryKeyOverride(override, key_path))); 104 base::WrapUnique(new ScopedRegistryKeyOverride(override, key_path)));
104 } 105 }
105 106
106 base::string16 GenerateTempKeyPath() { 107 base::string16 GenerateTempKeyPath() {
107 return GenerateTempKeyPath(base::string16(kTempTestKeyPath), 108 return GenerateTempKeyPath(base::string16(kTempTestKeyPath),
108 base::Time::Now()); 109 base::Time::Now());
109 } 110 }
110 111
111 } // namespace registry_util 112 } // namespace registry_util
OLDNEW
« no previous file with comments | « base/test/test_reg_util_win.h ('k') | base/test/test_reg_util_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698