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

Side by Side Diff: chrome/installer/util/install_util.cc

Issue 2589753002: Remove multi-install from chrome/installer/setup. (Closed)
Patch Set: gab and robertshield comments Created 3 years, 11 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 // 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>
11 #include <shlobj.h> 11 #include <shlobj.h>
12 #include <shlwapi.h> 12 #include <shlwapi.h>
13 13
14 #include <algorithm>
15 #include <memory> 14 #include <memory>
15 #include <string>
16 #include <vector>
16 17
17 #include "base/command_line.h" 18 #include "base/command_line.h"
18 #include "base/environment.h" 19 #include "base/environment.h"
19 #include "base/files/file_util.h" 20 #include "base/files/file_util.h"
20 #include "base/logging.h" 21 #include "base/logging.h"
21 #include "base/macros.h" 22 #include "base/macros.h"
22 #include "base/numerics/safe_conversions.h" 23 #include "base/numerics/safe_conversions.h"
23 #include "base/path_service.h" 24 #include "base/path_service.h"
24 #include "base/process/launch.h" 25 #include "base/process/launch.h"
25 #include "base/strings/string_util.h" 26 #include "base/strings/string_util.h"
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 return value == value_to_match_; 490 return value == value_to_match_;
490 } 491 }
491 492
492 // static 493 // static
493 int InstallUtil::GetInstallReturnCode(installer::InstallStatus status) { 494 int InstallUtil::GetInstallReturnCode(installer::InstallStatus status) {
494 switch (status) { 495 switch (status) {
495 case installer::FIRST_INSTALL_SUCCESS: 496 case installer::FIRST_INSTALL_SUCCESS:
496 case installer::INSTALL_REPAIRED: 497 case installer::INSTALL_REPAIRED:
497 case installer::NEW_VERSION_UPDATED: 498 case installer::NEW_VERSION_UPDATED:
498 case installer::IN_USE_UPDATED: 499 case installer::IN_USE_UPDATED:
499 case installer::UNUSED_BINARIES_UNINSTALLED:
500 case installer::OLD_VERSION_DOWNGRADE: 500 case installer::OLD_VERSION_DOWNGRADE:
501 case installer::IN_USE_DOWNGRADE: 501 case installer::IN_USE_DOWNGRADE:
502 return 0; 502 return 0;
503 default: 503 default:
504 return status; 504 return status;
505 } 505 }
506 } 506 }
507 507
508 // static 508 // static
509 void InstallUtil::ComposeCommandLine(const base::string16& program, 509 void InstallUtil::ComposeCommandLine(const base::string16& program,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 // Open the program and see if it references the expected file. 634 // Open the program and see if it references the expected file.
635 base::File file; 635 base::File file;
636 BY_HANDLE_FILE_INFORMATION info = {}; 636 BY_HANDLE_FILE_INFORMATION info = {};
637 637
638 return (OpenForInfo(path, &file) && 638 return (OpenForInfo(path, &file) &&
639 GetInfo(file, &info) && 639 GetInfo(file, &info) &&
640 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && 640 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber &&
641 info.nFileIndexHigh == file_info_.nFileIndexHigh && 641 info.nFileIndexHigh == file_info_.nFileIndexHigh &&
642 info.nFileIndexLow == file_info_.nFileIndexLow); 642 info.nFileIndexLow == file_info_.nFileIndexLow);
643 } 643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698