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

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

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 | « no previous file | base/test/test_reg_util_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 (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 #ifndef BASE_TEST_TEST_REG_UTIL_H_ 5 #ifndef BASE_TEST_TEST_REG_UTIL_H_
6 #define BASE_TEST_TEST_REG_UTIL_H_ 6 #define BASE_TEST_TEST_REG_UTIL_H_
7 7
8 // Registry utility functions used only by tests. 8 // Registry utility functions used only by tests.
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 16 matching lines...) Expand all
27 // - The test key root, HKCU\Software\Chromium\TempTestKeys\ 27 // - The test key root, HKCU\Software\Chromium\TempTestKeys\
28 // - The base::Time::ToInternalValue of the creation time. This is used to 28 // - The base::Time::ToInternalValue of the creation time. This is used to
29 // delete stale keys left over from crashed tests. 29 // delete stale keys left over from crashed tests.
30 // - A GUID used for preventing name collisions (although unlikely) between 30 // - A GUID used for preventing name collisions (although unlikely) between
31 // two RegistryOverrideManagers created with the same timestamp. 31 // two RegistryOverrideManagers created with the same timestamp.
32 class RegistryOverrideManager { 32 class RegistryOverrideManager {
33 public: 33 public:
34 RegistryOverrideManager(); 34 RegistryOverrideManager();
35 ~RegistryOverrideManager(); 35 ~RegistryOverrideManager();
36 36
37 // Override the given registry hive using a temporary key named by temp_name 37 // Override the given registry hive using a randomly generated temporary key.
38 // under the temporary test key path. There is no need to randomize 38 // Multiple overrides to the same hive are not supported and lead to undefined
39 // |override_name|, as a random parent key is generated. Multiple overrides to 39 // behavior.
40 // the same hive are not supported and lead to undefined behavior. 40 void OverrideRegistry(HKEY override);
41 void OverrideRegistry(HKEY override, const base::string16& override_name);
42 41
43 private: 42 private:
44 friend class RegistryOverrideManagerTest; 43 friend class RegistryOverrideManagerTest;
45 44
46 // Keeps track of one override. 45 // Keeps track of one override.
47 class ScopedRegistryKeyOverride { 46 class ScopedRegistryKeyOverride {
48 public: 47 public:
49 ScopedRegistryKeyOverride(HKEY override, const base::string16& key_path); 48 ScopedRegistryKeyOverride(HKEY override, const base::string16& key_path);
50 ~ScopedRegistryKeyOverride(); 49 ~ScopedRegistryKeyOverride();
51 50
(...skipping 17 matching lines...) Expand all
69 DISALLOW_COPY_AND_ASSIGN(RegistryOverrideManager); 68 DISALLOW_COPY_AND_ASSIGN(RegistryOverrideManager);
70 }; 69 };
71 70
72 // Generates a temporary key path that will be eventually deleted 71 // Generates a temporary key path that will be eventually deleted
73 // automatically if the process crashes. 72 // automatically if the process crashes.
74 base::string16 GenerateTempKeyPath(); 73 base::string16 GenerateTempKeyPath();
75 74
76 } // namespace registry_util 75 } // namespace registry_util
77 76
78 #endif // BASE_TEST_TEST_REG_UTIL_H_ 77 #endif // BASE_TEST_TEST_REG_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/test/test_reg_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698