OLD | NEW |
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 // See the corresponding header file for description of the functions in this | 5 // See the corresponding header file for description of the functions in this |
6 // file. | 6 // file. |
7 | 7 |
8 #include "chrome/installer/util/install_util.h" | 8 #include "chrome/installer/util/install_util.h" |
9 | 9 |
10 #include <shellapi.h> | 10 #include <shellapi.h> |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 return value == value_to_match_; | 445 return value == value_to_match_; |
446 } | 446 } |
447 | 447 |
448 // static | 448 // static |
449 int InstallUtil::GetInstallReturnCode(installer::InstallStatus status) { | 449 int InstallUtil::GetInstallReturnCode(installer::InstallStatus status) { |
450 switch (status) { | 450 switch (status) { |
451 case installer::FIRST_INSTALL_SUCCESS: | 451 case installer::FIRST_INSTALL_SUCCESS: |
452 case installer::INSTALL_REPAIRED: | 452 case installer::INSTALL_REPAIRED: |
453 case installer::NEW_VERSION_UPDATED: | 453 case installer::NEW_VERSION_UPDATED: |
454 case installer::IN_USE_UPDATED: | 454 case installer::IN_USE_UPDATED: |
| 455 case installer::ON_OS_UPGRADE_SUCCESSFUL: |
455 return 0; | 456 return 0; |
456 default: | 457 default: |
457 return status; | 458 return status; |
458 } | 459 } |
459 } | 460 } |
460 | 461 |
461 // static | 462 // static |
462 void InstallUtil::MakeUninstallCommand(const string16& program, | 463 void InstallUtil::MakeUninstallCommand(const string16& program, |
463 const string16& arguments, | 464 const string16& arguments, |
464 CommandLine* command_line) { | 465 CommandLine* command_line) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 // Open the program and see if it references the expected file. | 542 // Open the program and see if it references the expected file. |
542 base::win::ScopedHandle handle; | 543 base::win::ScopedHandle handle; |
543 BY_HANDLE_FILE_INFORMATION info = {}; | 544 BY_HANDLE_FILE_INFORMATION info = {}; |
544 | 545 |
545 return (OpenForInfo(program, &handle) && | 546 return (OpenForInfo(program, &handle) && |
546 GetInfo(handle, &info) && | 547 GetInfo(handle, &info) && |
547 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && | 548 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && |
548 info.nFileIndexHigh == file_info_.nFileIndexHigh && | 549 info.nFileIndexHigh == file_info_.nFileIndexHigh && |
549 info.nFileIndexLow == file_info_.nFileIndexLow); | 550 info.nFileIndexLow == file_info_.nFileIndexLow); |
550 } | 551 } |
OLD | NEW |