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

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

Issue 10790144: Revert 148046 - Revert 147650 - Implement installation of the Chrome App Host. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1215/src/
Patch Set: Created 8 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
« no previous file with comments | « chrome/installer/mini_installer/mini_installer.cc ('k') | chrome/installer/setup/install.cc » ('j') | 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) 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/installer/setup/chrome_frame_quick_enable.h" 5 #include "chrome/installer/setup/chrome_frame_quick_enable.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 DCHECK(chrome_state); // Checked in CheckQuickEnablePreconditions. 93 DCHECK(chrome_state); // Checked in CheckQuickEnablePreconditions.
94 94
95 // Temporarily remove Chrome from the product list. 95 // Temporarily remove Chrome from the product list.
96 // This is so that the operations below do not affect the installation 96 // This is so that the operations below do not affect the installation
97 // state of Chrome. 97 // state of Chrome.
98 installer_state->RemoveProduct( 98 installer_state->RemoveProduct(
99 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER)); 99 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER));
100 100
101 FilePath setup_path(chrome_state->GetSetupPath()); 101 FilePath setup_path(chrome_state->GetSetupPath());
102 const Version& new_version = chrome_state->version(); 102 const Version& new_version = chrome_state->version();
103 FilePath new_chrome_exe(
104 installer_state->target_path().Append(installer::kChromeNewExe));
105 103
106 // This creates the uninstallation entry for GCF. 104 // This creates the uninstallation entry for GCF.
107 AddUninstallShortcutWorkItems(*installer_state, setup_path, new_version, 105 AddUninstallShortcutWorkItems(*installer_state, setup_path, new_version,
108 item_list.get(), *cf); 106 item_list.get(), *cf);
109 // Always set the "lang" value since quick-enable always happens in the 107 // Always set the "lang" value since quick-enable always happens in the
110 // context of an interactive session with a user. 108 // context of an interactive session with a user.
111 AddVersionKeyWorkItems(installer_state->root_key(), cf->distribution(), 109 AddVersionKeyWorkItems(installer_state->root_key(), cf->distribution(),
112 new_version, true, item_list.get()); 110 new_version, true, item_list.get());
113 AddChromeFrameWorkItems(machine_state, *installer_state, setup_path, 111 AddChromeFrameWorkItems(machine_state, *installer_state, setup_path,
114 new_version, *cf, item_list.get()); 112 new_version, *cf, item_list.get());
115 113
116 const Version* opv = chrome_state->old_version(); 114 const Version* opv = chrome_state->old_version();
117 AppendPostInstallTasks(*installer_state, setup_path, new_chrome_exe, opv, 115 AppendPostInstallTasks(*installer_state, setup_path, opv,
118 new_version, temp_path.path(), item_list.get()); 116 new_version, temp_path.path(), item_list.get());
119 117
120 // Before updating the channel values, add Chrome back to the mix so that 118 // Before updating the channel values, add Chrome back to the mix so that
121 // all multi-installed products' channel values get updated. 119 // all multi-installed products' channel values get updated.
122 installer_state->AddProductFromState(BrowserDistribution::CHROME_BROWSER, 120 installer_state->AddProductFromState(BrowserDistribution::CHROME_BROWSER,
123 *chrome_state); 121 *chrome_state);
124 AddGoogleUpdateWorkItems(machine_state, *installer_state, 122 AddGoogleUpdateWorkItems(machine_state, *installer_state,
125 item_list.get()); 123 item_list.get());
126 124
127 // Add the items to remove the quick-enable-cf command from the registry. 125 // Add the items to remove the quick-enable-cf command from the registry.
128 AddQuickEnableWorkItems(*installer_state, machine_state, 126 AddQuickEnableChromeFrameWorkItems(
129 &chrome_state->uninstall_command().GetProgram(), 127 *installer_state, machine_state,
130 &chrome_state->version(), 128 &chrome_state->uninstall_command().GetProgram(),
131 item_list.get()); 129 &chrome_state->version(),
130 item_list.get());
132 131
133 if (!item_list->Do()) { 132 if (!item_list->Do()) {
134 item_list->Rollback(); 133 item_list->Rollback();
135 status = INSTALL_FAILED; 134 status = INSTALL_FAILED;
136 } else { 135 } else {
137 DCHECK_EQ(FIRST_INSTALL_SUCCESS, status); 136 DCHECK_EQ(FIRST_INSTALL_SUCCESS, status);
138 VLOG(1) << "Chrome Frame successfully activated."; 137 VLOG(1) << "Chrome Frame successfully activated.";
139 } 138 }
140 } 139 }
141 } 140 }
(...skipping 21 matching lines...) Expand all
163 BrowserDistribution::CHROME_BINARIES), 162 BrowserDistribution::CHROME_BINARIES),
164 true)) { 163 true)) {
165 LOG(ERROR) << "Failed to set EULA consent for multi-install binaries."; 164 LOG(ERROR) << "Failed to set EULA consent for multi-install binaries.";
166 } 165 }
167 } 166 }
168 167
169 return status; 168 return status;
170 } 169 }
171 170
172 } // namespace installer 171 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/mini_installer/mini_installer.cc ('k') | chrome/installer/setup/install.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698