OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 // TODO(port): move more code in back from the first_run_win.cc module. | 9 // TODO(port): move more code in back from the first_run_win.cc module. |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // Show the post-installation EULA. This is done by setup.exe and the | 119 // Show the post-installation EULA. This is done by setup.exe and the |
120 // result determines if we continue or not. We wait here until the user | 120 // result determines if we continue or not. We wait here until the user |
121 // dismisses the dialog. | 121 // dismisses the dialog. |
122 | 122 |
123 // The actual eula text is in a resource in chrome. We extract it to | 123 // The actual eula text is in a resource in chrome. We extract it to |
124 // a text file so setup.exe can use it as an inner frame. | 124 // a text file so setup.exe can use it as an inner frame. |
125 FilePath inner_html; | 125 FilePath inner_html; |
126 if (WriteEULAtoTempFile(&inner_html)) { | 126 if (WriteEULAtoTempFile(&inner_html)) { |
127 int retcode = 0; | 127 int retcode = 0; |
128 if (!LaunchSetupWithParam(installer::switches::kShowEula, | 128 if (!LaunchSetupWithParam(installer::switches::kShowEula, |
129 inner_html.ToWStringHack(), &retcode) || | 129 inner_html.value(), &retcode) || |
130 (retcode == installer::EULA_REJECTED)) { | 130 (retcode == installer::EULA_REJECTED)) { |
131 LOG(WARNING) << "EULA rejected. Fast exit."; | 131 LOG(WARNING) << "EULA rejected. Fast exit."; |
132 ::ExitProcess(1); | 132 ::ExitProcess(1); |
133 } | 133 } |
134 if (retcode == installer::EULA_ACCEPTED) { | 134 if (retcode == installer::EULA_ACCEPTED) { |
135 VLOG(1) << "EULA : no collection"; | 135 VLOG(1) << "EULA : no collection"; |
136 GoogleUpdateSettings::SetCollectStatsConsent(false); | 136 GoogleUpdateSettings::SetCollectStatsConsent(false); |
137 } else if (retcode == installer::EULA_ACCEPTED_OPT_IN) { | 137 } else if (retcode == installer::EULA_ACCEPTED_OPT_IN) { |
138 VLOG(1) << "EULA : collection consent"; | 138 VLOG(1) << "EULA : collection consent"; |
139 GoogleUpdateSettings::SetCollectStatsConsent(true); | 139 GoogleUpdateSettings::SetCollectStatsConsent(true); |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 if (!observer->ended()) { | 690 if (!observer->ended()) { |
691 observer->set_should_quit_message_loop(); | 691 observer->set_should_quit_message_loop(); |
692 MessageLoop::current()->Run(); | 692 MessageLoop::current()->Run(); |
693 } | 693 } |
694 | 694 |
695 // Unfortunately there's no success/fail signal in ImporterHost. | 695 // Unfortunately there's no success/fail signal in ImporterHost. |
696 return true; | 696 return true; |
697 } | 697 } |
698 | 698 |
699 #endif // OS_POSIX | 699 #endif // OS_POSIX |
OLD | NEW |