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

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

Issue 10912096: C++ reability review for gab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: propagate readbility fixes across all files Created 8 years, 3 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 | « no previous file | chrome/installer/setup/chrome_frame_ready_mode.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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 BrowserDistribution::CHROME_BROWSER); 92 BrowserDistribution::CHROME_BROWSER);
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();
gab 2012/09/07 20:56:44 I had done this without thinking as part of patch
103 103
104 // This creates the uninstallation entry for GCF. 104 // This creates the uninstallation entry for GCF.
105 AddUninstallShortcutWorkItems(*installer_state, setup_path, new_version, 105 AddUninstallShortcutWorkItems(*installer_state, setup_path, new_version,
106 item_list.get(), *cf); 106 *cf, item_list.get());
107 // 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
108 // context of an interactive session with a user. 108 // context of an interactive session with a user.
109 AddVersionKeyWorkItems(installer_state->root_key(), cf->distribution(), 109 AddVersionKeyWorkItems(installer_state->root_key(), cf->distribution(),
110 new_version, true, item_list.get()); 110 new_version, true, item_list.get());
111 AddChromeFrameWorkItems(machine_state, *installer_state, setup_path, 111 AddChromeFrameWorkItems(machine_state, *installer_state, setup_path,
112 new_version, *cf, item_list.get()); 112 new_version, *cf, item_list.get());
113 113
114 const Version* opv = chrome_state->old_version(); 114 const Version* opv = chrome_state->old_version();
115 AppendPostInstallTasks(*installer_state, setup_path, opv, 115 AppendPostInstallTasks(*installer_state, setup_path, opv,
116 new_version, temp_path.path(), item_list.get()); 116 new_version, temp_path.path(), item_list.get());
117 117
118 // 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
119 // all multi-installed products' channel values get updated. 119 // all multi-installed products' channel values get updated.
120 installer_state->AddProductFromState(BrowserDistribution::CHROME_BROWSER, 120 installer_state->AddProductFromState(BrowserDistribution::CHROME_BROWSER,
121 *chrome_state); 121 *chrome_state);
122 AddGoogleUpdateWorkItems(machine_state, *installer_state, 122 AddGoogleUpdateWorkItems(machine_state, *installer_state,
123 item_list.get()); 123 item_list.get());
124 124
125 // 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.
126 AddQuickEnableChromeFrameWorkItems( 126 AddQuickEnableChromeFrameWorkItems(
127 *installer_state, machine_state, 127 *installer_state, machine_state,
128 &chrome_state->uninstall_command().GetProgram(), 128 chrome_state->uninstall_command().GetProgram(),
129 &chrome_state->version(), 129 new_version,
130 item_list.get()); 130 item_list.get());
131 131
132 if (!item_list->Do()) { 132 if (!item_list->Do()) {
133 item_list->Rollback(); 133 item_list->Rollback();
134 status = INSTALL_FAILED; 134 status = INSTALL_FAILED;
135 } else { 135 } else {
136 DCHECK_EQ(FIRST_INSTALL_SUCCESS, status); 136 DCHECK_EQ(FIRST_INSTALL_SUCCESS, status);
137 VLOG(1) << "Chrome Frame successfully activated."; 137 VLOG(1) << "Chrome Frame successfully activated.";
138 } 138 }
139 } 139 }
(...skipping 22 matching lines...) Expand all
162 BrowserDistribution::CHROME_BINARIES), 162 BrowserDistribution::CHROME_BINARIES),
163 true)) { 163 true)) {
164 LOG(ERROR) << "Failed to set EULA consent for multi-install binaries."; 164 LOG(ERROR) << "Failed to set EULA consent for multi-install binaries.";
165 } 165 }
166 } 166 }
167 167
168 return status; 168 return status;
169 } 169 }
170 170
171 } // namespace installer 171 } // namespace installer
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/setup/chrome_frame_ready_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698