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/installer/util/install_util.cc

Issue 96193003: Uninstall multi-install Chrome Frame when updated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to r237927 Created 7 years 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 // 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const wchar_t kStagePreconditions[] = L"preconditions"; 50 const wchar_t kStagePreconditions[] = L"preconditions";
51 const wchar_t kStageRefreshingPolicy[] = L"refreshing_policy"; 51 const wchar_t kStageRefreshingPolicy[] = L"refreshing_policy";
52 const wchar_t kStageRegisteringChrome[] = L"registering_chrome"; 52 const wchar_t kStageRegisteringChrome[] = L"registering_chrome";
53 const wchar_t kStageRemovingOldVersions[] = L"removing_old_ver"; 53 const wchar_t kStageRemovingOldVersions[] = L"removing_old_ver";
54 const wchar_t kStageRollingback[] = L"rollingback"; 54 const wchar_t kStageRollingback[] = L"rollingback";
55 const wchar_t kStageUncompressing[] = L"uncompressing"; 55 const wchar_t kStageUncompressing[] = L"uncompressing";
56 const wchar_t kStageUnpacking[] = L"unpacking"; 56 const wchar_t kStageUnpacking[] = L"unpacking";
57 const wchar_t kStageUpdatingChannels[] = L"updating_channels"; 57 const wchar_t kStageUpdatingChannels[] = L"updating_channels";
58 const wchar_t kStageCreatingVisualManifest[] = L"creating_visual_manifest"; 58 const wchar_t kStageCreatingVisualManifest[] = L"creating_visual_manifest";
59 const wchar_t kStageDeferringToHigherVersion[] = L"deferring_to_higher_version"; 59 const wchar_t kStageDeferringToHigherVersion[] = L"deferring_to_higher_version";
60 const wchar_t kStageUninstallingBinaries[] = L"uninstalling_binaries";
61 const wchar_t kStageUninstallingChromeFrame[] = L"uninstalling_chrome_frame";
60 62
61 const wchar_t* const kStages[] = { 63 const wchar_t* const kStages[] = {
62 NULL, 64 NULL,
63 kStagePreconditions, 65 kStagePreconditions,
64 kStageUncompressing, 66 kStageUncompressing,
65 kStageEnsemblePatching, 67 kStageEnsemblePatching,
66 kStageBinaryPatching, 68 kStageBinaryPatching,
67 kStageUnpacking, 69 kStageUnpacking,
68 kStageBuilding, 70 kStageBuilding,
69 kStageExecuting, 71 kStageExecuting,
70 kStageRollingback, 72 kStageRollingback,
71 kStageRefreshingPolicy, 73 kStageRefreshingPolicy,
72 kStageUpdatingChannels, 74 kStageUpdatingChannels,
73 kStageCopyingPreferencesFile, 75 kStageCopyingPreferencesFile,
74 kStageCreatingShortcuts, 76 kStageCreatingShortcuts,
75 kStageRegisteringChrome, 77 kStageRegisteringChrome,
76 kStageRemovingOldVersions, 78 kStageRemovingOldVersions,
77 kStageFinishing, 79 kStageFinishing,
78 kStageConfiguringAutoLaunch, 80 kStageConfiguringAutoLaunch,
79 kStageCreatingVisualManifest, 81 kStageCreatingVisualManifest,
80 kStageDeferringToHigherVersion, 82 kStageDeferringToHigherVersion,
83 kStageUninstallingBinaries,
84 kStageUninstallingChromeFrame,
81 }; 85 };
82 86
83 COMPILE_ASSERT(installer::NUM_STAGES == arraysize(kStages), 87 COMPILE_ASSERT(installer::NUM_STAGES == arraysize(kStages),
84 kStages_disagrees_with_Stage_comma_they_must_match_bang); 88 kStages_disagrees_with_Stage_comma_they_must_match_bang);
85 89
86 // Creates a zero-sized non-decorated foreground window that doesn't appear 90 // Creates a zero-sized non-decorated foreground window that doesn't appear
87 // in the taskbar. This is used as a parent window for calls to ShellExecuteEx 91 // in the taskbar. This is used as a parent window for calls to ShellExecuteEx
88 // in order for the UAC dialog to appear in the foreground and for focus 92 // in order for the UAC dialog to appear in the foreground and for focus
89 // to be returned to this process once the UAC task is dismissed. Returns 93 // to be returned to this process once the UAC task is dismissed. Returns
90 // NULL on failure, a handle to the UAC window on success. 94 // NULL on failure, a handle to the UAC window on success.
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 // Open the program and see if it references the expected file. 625 // Open the program and see if it references the expected file.
622 base::win::ScopedHandle handle; 626 base::win::ScopedHandle handle;
623 BY_HANDLE_FILE_INFORMATION info = {}; 627 BY_HANDLE_FILE_INFORMATION info = {};
624 628
625 return (OpenForInfo(path, &handle) && 629 return (OpenForInfo(path, &handle) &&
626 GetInfo(handle, &info) && 630 GetInfo(handle, &info) &&
627 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && 631 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber &&
628 info.nFileIndexHigh == file_info_.nFileIndexHigh && 632 info.nFileIndexHigh == file_info_.nFileIndexHigh &&
629 info.nFileIndexLow == file_info_.nFileIndexLow); 633 info.nFileIndexLow == file_info_.nFileIndexLow);
630 } 634 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698