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

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

Issue 575253002: Clean up unused param in RegistryOverrideManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more callers Created 6 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_reg_util_win.cc ('k') | chrome/browser/chrome_elf_init_unittest_win.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/test/test_reg_util_win.h" 9 #include "base/test/test_reg_util_win.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 key.Create(HKEY_CURRENT_USER, key_path.c_str(), KEY_ALL_ACCESS)); 57 key.Create(HKEY_CURRENT_USER, key_path.c_str(), KEY_ALL_ACCESS));
58 } 58 }
59 59
60 base::string16 FakeOverrideManagerPath(const base::Time& time) { 60 base::string16 FakeOverrideManagerPath(const base::Time& time) {
61 return fake_test_key_root_ + L"\\" + 61 return fake_test_key_root_ + L"\\" +
62 base::Int64ToString16(time.ToInternalValue()); 62 base::Int64ToString16(time.ToInternalValue());
63 } 63 }
64 64
65 void CreateManager(const base::Time& timestamp) { 65 void CreateManager(const base::Time& timestamp) {
66 manager_.reset(new RegistryOverrideManager(timestamp, fake_test_key_root_)); 66 manager_.reset(new RegistryOverrideManager(timestamp, fake_test_key_root_));
67 manager_->OverrideRegistry(HKEY_CURRENT_USER, L"override_manager_unittest"); 67 manager_->OverrideRegistry(HKEY_CURRENT_USER);
68 } 68 }
69 69
70 base::string16 fake_test_key_root_; 70 base::string16 fake_test_key_root_;
71 scoped_ptr<RegistryOverrideManager> manager_; 71 scoped_ptr<RegistryOverrideManager> manager_;
72 }; 72 };
73 73
74 TEST_F(RegistryOverrideManagerTest, Basic) { 74 TEST_F(RegistryOverrideManagerTest, Basic) {
75 CreateManager(base::Time::Now()); 75 CreateManager(base::Time::Now());
76 76
77 base::win::RegKey create_key; 77 base::win::RegKey create_key;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 manager_.reset(); 121 manager_.reset();
122 122
123 AssertKeyAbsent(path_garbage); 123 AssertKeyAbsent(path_garbage);
124 AssertKeyAbsent(path_very_stale); 124 AssertKeyAbsent(path_very_stale);
125 AssertKeyAbsent(path_stale); 125 AssertKeyAbsent(path_stale);
126 AssertKeyExists(path_current); 126 AssertKeyExists(path_current);
127 AssertKeyExists(path_future); 127 AssertKeyExists(path_future);
128 } 128 }
129 129
130 } // namespace registry_util 130 } // namespace registry_util
OLDNEW
« no previous file with comments | « base/test/test_reg_util_win.cc ('k') | chrome/browser/chrome_elf_init_unittest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698