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

Side by Side Diff: chrome/installer/gcapi/gcapi_test_registry_overrider.cc

Issue 57423008: Base: Make RegistryOverrideManager support sharded/parallel tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: run git cl format Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « base/test/test_reg_util_win_unittest.cc ('k') | chrome/installer/setup/setup_util_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 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 "chrome/installer/gcapi/gcapi_test_registry_overrider.h" 5 #include "chrome/installer/gcapi/gcapi_test_registry_overrider.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 11
12 GCAPITestRegistryOverrider::GCAPITestRegistryOverrider() { 12 GCAPITestRegistryOverrider::GCAPITestRegistryOverrider() {
13 // Override keys - this is undone during destruction. 13 // Override keys - this is undone during destruction.
14 string16 hkcu_override = base::StringPrintf( 14 override_manager_.OverrideRegistry(HKEY_CURRENT_USER, L"hkcu_override");
15 L"hkcu_override\\%ls", ASCIIToWide(base::GenerateGUID())); 15 override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE, L"hklm_override");
16 override_manager_.OverrideRegistry(HKEY_CURRENT_USER, hkcu_override);
17 string16 hklm_override = base::StringPrintf(
18 L"hklm_override\\%ls", ASCIIToWide(base::GenerateGUID()));
19 override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE, hklm_override);
20 } 16 }
21 17
22 GCAPITestRegistryOverrider::~GCAPITestRegistryOverrider() { 18 GCAPITestRegistryOverrider::~GCAPITestRegistryOverrider() {
23 } 19 }
OLDNEW
« no previous file with comments | « base/test/test_reg_util_win_unittest.cc ('k') | chrome/installer/setup/setup_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698