| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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.h" | 5 #include "chrome/browser/first_run.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <shellapi.h> | 10 #include <shellapi.h> |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 master_prefs = master_prefs.Append(installer_util::kDefaultMasterPrefs); | 179 master_prefs = master_prefs.Append(installer_util::kDefaultMasterPrefs); |
| 180 } | 180 } |
| 181 | 181 |
| 182 scoped_ptr<DictionaryValue> prefs( | 182 scoped_ptr<DictionaryValue> prefs( |
| 183 installer_util::ParseDistributionPreferences(master_prefs)); | 183 installer_util::ParseDistributionPreferences(master_prefs)); |
| 184 if (!prefs.get()) | 184 if (!prefs.get()) |
| 185 return true; | 185 return true; |
| 186 | 186 |
| 187 if (new_tabs) | 187 if (new_tabs) |
| 188 *new_tabs = installer_util::GetFirstRunTabs(prefs.get()); | 188 *new_tabs = installer_util::GetFirstRunTabs(prefs.get()); |
| 189 if (ping_delay) | 189 if (ping_delay) { |
| 190 installer_util::GetDistributionPingDelay(prefs.get(), ping_delay); | 190 if (!installer_util::GetDistroIntegerPreference(prefs.get(), |
| 191 installer_util::master_preferences::kDistroPingDelay, ping_delay)) { |
| 192 // 90 seconds is the default that we want to use in case master |
| 193 // preferences is missing, corrupt or ping_delay is missing. |
| 194 *ping_delay = 90; |
| 195 } |
| 196 } |
| 191 | 197 |
| 192 if (installer_util::GetDistroBooleanPreference(prefs.get(), | 198 if (installer_util::GetDistroBooleanPreference(prefs.get(), |
| 193 installer_util::master_preferences::kRequireEula)) { | 199 installer_util::master_preferences::kRequireEula)) { |
| 194 // Show the post-installation EULA. This is done by setup.exe and the | 200 // Show the post-installation EULA. This is done by setup.exe and the |
| 195 // result determines if we continue or not. We wait here until the user | 201 // result determines if we continue or not. We wait here until the user |
| 196 // dismisses the dialog. | 202 // dismisses the dialog. |
| 197 | 203 |
| 198 // The actual eula text is in a resource in chrome. We extract it to | 204 // The actual eula text is in a resource in chrome. We extract it to |
| 199 // a text file so setup.exe can use it as an inner frame. | 205 // a text file so setup.exe can use it as an inner frame. |
| 200 FilePath inner_html; | 206 FilePath inner_html; |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 | 860 |
| 855 DISALLOW_COPY_AND_ASSIGN(TryChromeDialog); | 861 DISALLOW_COPY_AND_ASSIGN(TryChromeDialog); |
| 856 }; | 862 }; |
| 857 | 863 |
| 858 } // namespace | 864 } // namespace |
| 859 | 865 |
| 860 Upgrade::TryResult Upgrade::ShowTryChromeDialog() { | 866 Upgrade::TryResult Upgrade::ShowTryChromeDialog() { |
| 861 TryChromeDialog td; | 867 TryChromeDialog td; |
| 862 return td.ShowModal(); | 868 return td.ShowModal(); |
| 863 } | 869 } |
| OLD | NEW |