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

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

Issue 49036: Final wiring of the distribution strings... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/util/google_chrome_distribution_unittest.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This file defines specific implementation of BrowserDistribution class for 5 // This file defines specific implementation of BrowserDistribution class for
6 // Google Chrome. 6 // Google Chrome.
7 7
8 #include "chrome/installer/util/google_chrome_distribution.h" 8 #include "chrome/installer/util/google_chrome_distribution.h"
9 9
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 WMIProcessUtil::Launch(command, &pid); 158 WMIProcessUtil::Launch(command, &pid);
159 } 159 }
160 160
161 std::wstring GoogleChromeDistribution::GetApplicationName() { 161 std::wstring GoogleChromeDistribution::GetApplicationName() {
162 const std::wstring& product_name = 162 const std::wstring& product_name =
163 installer_util::GetLocalizedString(IDS_PRODUCT_NAME_BASE); 163 installer_util::GetLocalizedString(IDS_PRODUCT_NAME_BASE);
164 return product_name; 164 return product_name;
165 } 165 }
166 166
167 std::wstring GoogleChromeDistribution::GetAlternateApplicationName() { 167 std::wstring GoogleChromeDistribution::GetAlternateApplicationName() {
168 // TODO(cpu): return the right localized strings when it arrives. 168 const std::wstring& alt_product_name =
169 return L""; 169 installer_util::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE);
Glenn Wilson 2009/03/26 00:53:55 I'm assuming that IDS_OEM_MAIN_SHORTCUT_NAME_BASE
170 return alt_product_name;
170 } 171 }
171 172
172 std::wstring GoogleChromeDistribution::GetInstallSubDir() { 173 std::wstring GoogleChromeDistribution::GetInstallSubDir() {
173 return L"Google\\Chrome"; 174 return L"Google\\Chrome";
174 } 175 }
175 176
176 std::wstring GoogleChromeDistribution::GetNewGoogleUpdateApKey( 177 std::wstring GoogleChromeDistribution::GetNewGoogleUpdateApKey(
177 bool diff_install, installer_util::InstallStatus status, 178 bool diff_install, installer_util::InstallStatus status,
178 const std::wstring& value) { 179 const std::wstring& value) {
179 // Magic suffix that we need to add or remove to "ap" key value. 180 // Magic suffix that we need to add or remove to "ap" key value.
(...skipping 19 matching lines...) Expand all
199 return new_value; 200 return new_value;
200 } 201 }
201 202
202 std::wstring GoogleChromeDistribution::GetPublisherName() { 203 std::wstring GoogleChromeDistribution::GetPublisherName() {
203 const std::wstring& publisher_name = 204 const std::wstring& publisher_name =
204 installer_util::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); 205 installer_util::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE);
205 return publisher_name; 206 return publisher_name;
206 } 207 }
207 208
208 std::wstring GoogleChromeDistribution::GetAppDescription() { 209 std::wstring GoogleChromeDistribution::GetAppDescription() {
209 // TODO(cpu): Wire the actual localized strings when they arrive. 210 const std::wstring& app_description =
210 return L""; 211 installer_util::GetLocalizedString(IDS_SHORTCUT_TOOLTIP_BASE);
212 return app_description;
211 } 213 }
212 214
213 int GoogleChromeDistribution::GetInstallReturnCode( 215 int GoogleChromeDistribution::GetInstallReturnCode(
214 installer_util::InstallStatus status) { 216 installer_util::InstallStatus status) {
215 switch (status) { 217 switch (status) {
216 case installer_util::FIRST_INSTALL_SUCCESS: 218 case installer_util::FIRST_INSTALL_SUCCESS:
217 case installer_util::INSTALL_REPAIRED: 219 case installer_util::INSTALL_REPAIRED:
218 case installer_util::NEW_VERSION_UPDATED: 220 case installer_util::NEW_VERSION_UPDATED:
219 case installer_util::HIGHER_VERSION_EXISTS: 221 case installer_util::HIGHER_VERSION_EXISTS:
220 return 0; // For Google Update's benefit we need to return 0 for success 222 return 0; // For Google Update's benefit we need to return 0 for success
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 287
286 std::wstring new_value = GoogleChromeDistribution::GetNewGoogleUpdateApKey( 288 std::wstring new_value = GoogleChromeDistribution::GetNewGoogleUpdateApKey(
287 incremental_install, install_status, ap_key_value); 289 incremental_install, install_status, ap_key_value);
288 if ((new_value.compare(ap_key_value) != 0) && 290 if ((new_value.compare(ap_key_value) != 0) &&
289 !key.WriteValue(google_update::kRegApField, new_value.c_str())) { 291 !key.WriteValue(google_update::kRegApField, new_value.c_str())) {
290 LOG(ERROR) << "Failed to write value " << new_value 292 LOG(ERROR) << "Failed to write value " << new_value
291 << " to the registry field " << google_update::kRegApField; 293 << " to the registry field " << google_update::kRegApField;
292 } 294 }
293 key.Close(); 295 key.Close();
294 } 296 }
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/util/google_chrome_distribution_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698