| OLD | NEW |
| 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 #include <atlbase.h> | 5 #include <atlbase.h> |
| 6 #include <atlcom.h> | 6 #include <atlcom.h> |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shlobj.h> | 8 #include <shlobj.h> |
| 9 | 9 |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 if (parse_result & installer_util::MASTER_PROFILE_REQUIRE_EULA) { | 213 if (parse_result & installer_util::MASTER_PROFILE_REQUIRE_EULA) { |
| 214 // Show the post-installation EULA. This is done by setup.exe and the | 214 // Show the post-installation EULA. This is done by setup.exe and the |
| 215 // result determines if we continue or not. We wait here until the user | 215 // result determines if we continue or not. We wait here until the user |
| 216 // dismisses the dialog. | 216 // dismisses the dialog. |
| 217 int retcode = 0; | 217 int retcode = 0; |
| 218 if (!LaunchSetupWithParam(installer_util::switches::kShowEula, &retcode) || | 218 if (!LaunchSetupWithParam(installer_util::switches::kShowEula, &retcode) || |
| 219 (retcode == installer_util::EULA_REJECTED)) { | 219 (retcode == installer_util::EULA_REJECTED)) { |
| 220 LOG(WARNING) << "EULA rejected. Fast exit."; | 220 LOG(WARNING) << "EULA rejected. Fast exit."; |
| 221 ::ExitProcess(1); | 221 ::ExitProcess(1); |
| 222 } | 222 } |
| 223 if (retcode == installer_util::EULA_ACCEPTED_OPT_IN) { | 223 if (retcode == installer_util::EULA_ACCEPTED) { |
| 224 LOG(INFO) << "EULA : no collection"; |
| 225 GoogleUpdateSettings::SetCollectStatsConsent(false); |
| 226 } else if (retcode == installer_util::EULA_ACCEPTED_OPT_IN) { |
| 224 LOG(INFO) << "EULA : collection consent"; | 227 LOG(INFO) << "EULA : collection consent"; |
| 225 GoogleUpdateSettings::SetCollectStatsConsent(true); | 228 GoogleUpdateSettings::SetCollectStatsConsent(true); |
| 226 } | 229 } |
| 227 } | 230 } |
| 228 | 231 |
| 229 FilePath user_prefs = FilePath::FromWStringHack( | 232 FilePath user_prefs = FilePath::FromWStringHack( |
| 230 GetDefaultPrefFilePath(true, user_data_dir.ToWStringHack())); | 233 GetDefaultPrefFilePath(true, user_data_dir.ToWStringHack())); |
| 231 if (user_prefs.empty()) | 234 if (user_prefs.empty()) |
| 232 return true; | 235 return true; |
| 233 | 236 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 bool FirstRun::SetShowWelcomePagePref() { | 580 bool FirstRun::SetShowWelcomePagePref() { |
| 578 PrefService* local_state = g_browser_process->local_state(); | 581 PrefService* local_state = g_browser_process->local_state(); |
| 579 if (!local_state) | 582 if (!local_state) |
| 580 return false; | 583 return false; |
| 581 if (!local_state->IsPrefRegistered(prefs::kShouldShowWelcomePage)) { | 584 if (!local_state->IsPrefRegistered(prefs::kShouldShowWelcomePage)) { |
| 582 local_state->RegisterBooleanPref(prefs::kShouldShowWelcomePage, false); | 585 local_state->RegisterBooleanPref(prefs::kShouldShowWelcomePage, false); |
| 583 local_state->SetBoolean(prefs::kShouldShowWelcomePage, true); | 586 local_state->SetBoolean(prefs::kShouldShowWelcomePage, true); |
| 584 } | 587 } |
| 585 return true; | 588 return true; |
| 586 } | 589 } |
| OLD | NEW |