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

Side by Side Diff: chrome/installer/setup/main.cc

Issue 39149: Fix stupid mistake of forgetting negation in if condition. (Closed)
Patch Set: Created 11 years, 9 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 | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 5 #include <string>
6 #include <windows.h> 6 #include <windows.h>
7 #include <msi.h> 7 #include <msi.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 installer_util::SYSTEM_LEVEL_INSTALL_EXISTS; 319 installer_util::SYSTEM_LEVEL_INSTALL_EXISTS;
320 int str_id = system_install ? IDS_INSTALL_USER_LEVEL_EXISTS_BASE : 320 int str_id = system_install ? IDS_INSTALL_USER_LEVEL_EXISTS_BASE :
321 IDS_INSTALL_SYSTEM_LEVEL_EXISTS_BASE; 321 IDS_INSTALL_SYSTEM_LEVEL_EXISTS_BASE;
322 InstallUtil::WriteInstallerResult(system_install, status, str_id, NULL); 322 InstallUtil::WriteInstallerResult(system_install, status, str_id, NULL);
323 return false; 323 return false;
324 } 324 }
325 325
326 // If no previous installation of Chrome, make sure installation directory 326 // If no previous installation of Chrome, make sure installation directory
327 // either does not exist or can be deleted (i.e. is not locked by some other 327 // either does not exist or can be deleted (i.e. is not locked by some other
328 // process). 328 // process).
329 if (installed_version) { 329 if (!installed_version) {
330 std::wstring install_path(installer::GetChromeInstallPath(system_install)); 330 std::wstring install_path(installer::GetChromeInstallPath(system_install));
331 if (file_util::PathExists(install_path) && 331 if (file_util::PathExists(install_path) &&
332 !file_util::Delete(install_path, true)) { 332 !file_util::Delete(install_path, true)) {
333 LOG(ERROR) << "Installation directory " << install_path 333 LOG(ERROR) << "Installation directory " << install_path
334 << " exists and can not be deleted."; 334 << " exists and can not be deleted.";
335 status = installer_util::INSTALL_DIR_IN_USE; 335 status = installer_util::INSTALL_DIR_IN_USE;
336 int str_id = IDS_INSTALL_DIR_IN_USE_BASE; 336 int str_id = IDS_INSTALL_DIR_IN_USE_BASE;
337 InstallUtil::WriteInstallerResult(system_install, status, str_id, NULL); 337 InstallUtil::WriteInstallerResult(system_install, status, str_id, NULL);
338 return false; 338 return false;
339 } 339 }
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 } else { 603 } else {
604 install_status = InstallChrome(parsed_command_line, 604 install_status = InstallChrome(parsed_command_line,
605 installed_version.get(), 605 installed_version.get(),
606 options); 606 options);
607 } 607 }
608 608
609 CoUninitialize(); 609 CoUninitialize();
610 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 610 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
611 return dist->GetInstallReturnCode(install_status); 611 return dist->GetInstallReturnCode(install_status);
612 } 612 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698