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

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

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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.h" 9 #include "base/process.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 std::string version = GetVersion(type); 55 std::string version = GetVersion(type);
56 if (version.empty()) 56 if (version.empty())
57 return false; 57 return false;
58 base::FilePath path; 58 base::FilePath path;
59 bool has_install_dir = GetInstallDirectory(system_level, 59 bool has_install_dir = GetInstallDirectory(system_level,
60 ToBrowserDistributionType(type), 60 ToBrowserDistributionType(type),
61 &path); 61 &path);
62 if (!has_install_dir || !file_util::PathExists(path)) 62 if (!has_install_dir || !file_util::PathExists(path))
63 return false; 63 return false;
64 path = path.AppendASCII(version); 64 path = path.AppendASCII(version);
65 return file_util::Delete(path, true); 65 return base::Delete(path, true);
66 } 66 }
67 67
68 bool DeleteRegistryKey(bool system_level, 68 bool DeleteRegistryKey(bool system_level,
69 InstallationValidator::InstallationType type) { 69 InstallationValidator::InstallationType type) {
70 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( 70 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution(
71 ToBrowserDistributionType(type)); 71 ToBrowserDistributionType(type));
72 base::FilePath::StringType key(google_update::kRegPathClients); 72 base::FilePath::StringType key(google_update::kRegPathClients);
73 key.push_back(base::FilePath::kSeparators[0]); 73 key.push_back(base::FilePath::kSeparators[0]);
74 key.append(dist->GetAppGuid()); 74 key.append(dist->GetAppGuid());
75 HKEY root = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 75 HKEY root = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return false; 291 return false;
292 } 292 }
293 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) { 293 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) {
294 LOG(ERROR) << "Launched process did not complete."; 294 LOG(ERROR) << "Launched process did not complete.";
295 return false; 295 return false;
296 } 296 }
297 return true; 297 return true;
298 } 298 }
299 299
300 } // namespace 300 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/logging/win/test_log_collector.cc ('k') | chrome/test/mini_installer_test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698