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

Side by Side Diff: chrome/test/mini_installer_test/installer_test_util.cc

Issue 282363003: Add WOW64 support to the installer registry work items (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: nits. fix call to DeleteRegistryKey Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/mini_installer_test/installer_test_util.h" 5 #include "chrome/test/mini_installer_test/installer_test_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/process/kill.h" 9 #include "base/process/kill.h"
10 #include "base/process/launch.h" 10 #include "base/process/launch.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool has_install_dir = GetInstallDirectory(system_level, 58 bool has_install_dir = GetInstallDirectory(system_level,
59 ToBrowserDistributionType(type), 59 ToBrowserDistributionType(type),
60 &path); 60 &path);
61 if (!has_install_dir || !base::PathExists(path)) 61 if (!has_install_dir || !base::PathExists(path))
62 return false; 62 return false;
63 path = path.AppendASCII(version); 63 path = path.AppendASCII(version);
64 return base::DeleteFile(path, true); 64 return base::DeleteFile(path, true);
65 } 65 }
66 66
67 bool DeleteRegistryKey(bool system_level, 67 bool DeleteRegistryKey(bool system_level,
68 InstallationValidator::InstallationType type) { 68 InstallationValidator::InstallationType type,
69 REGSAM wow64_access) {
69 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( 70 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution(
70 ToBrowserDistributionType(type)); 71 ToBrowserDistributionType(type));
71 base::FilePath::StringType key(google_update::kRegPathClients); 72 base::FilePath::StringType key(google_update::kRegPathClients);
72 key.push_back(base::FilePath::kSeparators[0]); 73 key.push_back(base::FilePath::kSeparators[0]);
73 key.append(dist->GetAppGuid()); 74 key.append(dist->GetAppGuid());
74 HKEY root = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 75 HKEY root = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
75 return InstallUtil::DeleteRegistryKey(root, key); 76 return InstallUtil::DeleteRegistryKey(root, key, wow64_access);
76 } 77 }
77 78
78 bool GetChromeInstallDirectory(bool system_level, base::FilePath* path) { 79 bool GetChromeInstallDirectory(bool system_level, base::FilePath* path) {
79 return GetInstallDirectory(system_level, 80 return GetInstallDirectory(system_level,
80 BrowserDistribution::CHROME_BROWSER, path); 81 BrowserDistribution::CHROME_BROWSER, path);
81 } 82 }
82 83
83 bool GetInstallDirectory(bool system_level, 84 bool GetInstallDirectory(bool system_level,
84 BrowserDistribution::Type type, base::FilePath* path) { 85 BrowserDistribution::Type type, base::FilePath* path) {
85 BrowserDistribution* dist = 86 BrowserDistribution* dist =
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 << command.GetCommandLineString(); 290 << command.GetCommandLineString();
290 return false; 291 return false;
291 } 292 }
292 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) { 293 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) {
293 LOG(ERROR) << "Launched process did not complete."; 294 LOG(ERROR) << "Launched process did not complete.";
294 return false; 295 return false;
295 } 296 }
296 return true; 297 return true;
297 } 298 }
298 299
299 } // namespace 300 } // namespace installer_test
OLDNEW
« no previous file with comments | « chrome/test/mini_installer_test/installer_test_util.h ('k') | chrome/test/mini_installer_test/test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698