| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 // If stats reporting was turned on by the first run dialog then toggle | 1124 // If stats reporting was turned on by the first run dialog then toggle |
| 1125 // the pref. | 1125 // the pref. |
| 1126 if (GoogleUpdateSettings::GetCollectStatsConsent()) | 1126 if (GoogleUpdateSettings::GetCollectStatsConsent()) |
| 1127 local_state_->SetBoolean(prefs::kMetricsReportingEnabled, true); | 1127 local_state_->SetBoolean(prefs::kMetricsReportingEnabled, true); |
| 1128 #endif // OS_POSIX && !OS_CHROMEOS | 1128 #endif // OS_POSIX && !OS_CHROMEOS |
| 1129 } // if (!first_run_ui_bypass_) | 1129 } // if (!first_run_ui_bypass_) |
| 1130 | 1130 |
| 1131 chrome::SetNewHomePagePrefs(profile_->GetPrefs()); | 1131 chrome::SetNewHomePagePrefs(profile_->GetPrefs()); |
| 1132 browser_process_->profile_manager()->OnImportFinished(profile_); | 1132 browser_process_->profile_manager()->OnImportFinished(profile_); |
| 1133 | 1133 |
| 1134 if (!master_prefs_->suppress_first_run_default_browser_prompt) | 1134 if (!master_prefs_->suppress_first_run_default_browser_prompt) { |
| 1135 chrome::ShowFirstRunDefaultBrowserPrompt(profile_); | 1135 browser_creator_->set_show_main_browser_window( |
| 1136 else | 1136 !chrome::ShowFirstRunDefaultBrowserPrompt(profile_)); |
| 1137 } else { |
| 1137 browser_creator_->set_is_default_browser_dialog_suppressed(true); | 1138 browser_creator_->set_is_default_browser_dialog_suppressed(true); |
| 1139 } |
| 1138 } // if (is_first_run_) | 1140 } // if (is_first_run_) |
| 1139 | 1141 |
| 1140 #if defined(OS_WIN) | 1142 #if defined(OS_WIN) |
| 1141 // Sets things up so that if we crash from this point on, a dialog will | 1143 // Sets things up so that if we crash from this point on, a dialog will |
| 1142 // popup asking the user to restart chrome. It is done this late to avoid | 1144 // popup asking the user to restart chrome. It is done this late to avoid |
| 1143 // testing against a bunch of special cases that are taken care early on. | 1145 // testing against a bunch of special cases that are taken care early on. |
| 1144 ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 1146 ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
| 1145 parsed_command_line()); | 1147 parsed_command_line()); |
| 1146 | 1148 |
| 1147 // Registers Chrome with the Windows Restart Manager, which will restore the | 1149 // Registers Chrome with the Windows Restart Manager, which will restore the |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1526 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1525 uma_name += "_XP"; | 1527 uma_name += "_XP"; |
| 1526 | 1528 |
| 1527 uma_name += "_PreRead_"; | 1529 uma_name += "_PreRead_"; |
| 1528 uma_name += pre_read_percentage; | 1530 uma_name += pre_read_percentage; |
| 1529 AddPreReadHistogramTime(uma_name.c_str(), time); | 1531 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1530 } | 1532 } |
| 1531 #endif | 1533 #endif |
| 1532 #endif | 1534 #endif |
| 1533 } | 1535 } |
| OLD | NEW |