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

Side by Side Diff: chrome/browser/first_run/first_run_win.cc

Issue 3057033: Remove GetSwitchValue() from chrome/* where easy. (Closed)
Patch Set: finally Created 10 years, 4 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/first_run/first_run.h" 5 #include "chrome/browser/first_run/first_run.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 10
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 installer_util::master_preferences::kRequireEula, &value) && value) { 267 installer_util::master_preferences::kRequireEula, &value) && value) {
268 // Show the post-installation EULA. This is done by setup.exe and the 268 // Show the post-installation EULA. This is done by setup.exe and the
269 // result determines if we continue or not. We wait here until the user 269 // result determines if we continue or not. We wait here until the user
270 // dismisses the dialog. 270 // dismisses the dialog.
271 271
272 // The actual eula text is in a resource in chrome. We extract it to 272 // The actual eula text is in a resource in chrome. We extract it to
273 // a text file so setup.exe can use it as an inner frame. 273 // a text file so setup.exe can use it as an inner frame.
274 FilePath inner_html; 274 FilePath inner_html;
275 if (WriteEULAtoTempFile(&inner_html)) { 275 if (WriteEULAtoTempFile(&inner_html)) {
276 int retcode = 0; 276 int retcode = 0;
277 const std::string eula = WideToASCII(installer_util::switches::kShowEula); 277 if (!LaunchSetupWithParam(installer_util::switches::kShowEula,
278 if (!LaunchSetupWithParam(eula, inner_html.ToWStringHack(), &retcode) || 278 inner_html.ToWStringHack(), &retcode) ||
279 (retcode == installer_util::EULA_REJECTED)) { 279 (retcode == installer_util::EULA_REJECTED)) {
280 LOG(WARNING) << "EULA rejected. Fast exit."; 280 LOG(WARNING) << "EULA rejected. Fast exit.";
281 ::ExitProcess(1); 281 ::ExitProcess(1);
282 } 282 }
283 if (retcode == installer_util::EULA_ACCEPTED) { 283 if (retcode == installer_util::EULA_ACCEPTED) {
284 LOG(INFO) << "EULA : no collection"; 284 LOG(INFO) << "EULA : no collection";
285 GoogleUpdateSettings::SetCollectStatsConsent(false); 285 GoogleUpdateSettings::SetCollectStatsConsent(false);
286 } else if (retcode == installer_util::EULA_ACCEPTED_OPT_IN) { 286 } else if (retcode == installer_util::EULA_ACCEPTED_OPT_IN) {
287 LOG(INFO) << "EULA : collection consent"; 287 LOG(INFO) << "EULA : collection consent";
288 GoogleUpdateSettings::SetCollectStatsConsent(true); 288 GoogleUpdateSettings::SetCollectStatsConsent(true);
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 1064
1065 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) { 1065 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) {
1066 if (version > 10000) { 1066 if (version > 10000) {
1067 // This is a test value. We want to make sure we exercise 1067 // This is a test value. We want to make sure we exercise
1068 // returning this early. See EarlyReturnTest test harness. 1068 // returning this early. See EarlyReturnTest test harness.
1069 return Upgrade::TD_NOT_NOW; 1069 return Upgrade::TD_NOT_NOW;
1070 } 1070 }
1071 TryChromeDialog td; 1071 TryChromeDialog td;
1072 return td.ShowModal(); 1072 return td.ShowModal();
1073 } 1073 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698