| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 #include "chrome/browser/search_engines/template_url.h" | 77 #include "chrome/browser/search_engines/template_url.h" |
| 78 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 78 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 79 #include "chrome/browser/search_engines/template_url_service.h" | 79 #include "chrome/browser/search_engines/template_url_service.h" |
| 80 #include "chrome/browser/search_engines/template_url_service_factory.h" | 80 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 81 #include "chrome/browser/service/service_process_control.h" | 81 #include "chrome/browser/service/service_process_control.h" |
| 82 #include "chrome/browser/shell_integration.h" | 82 #include "chrome/browser/shell_integration.h" |
| 83 #include "chrome/browser/translate/translate_manager.h" | 83 #include "chrome/browser/translate/translate_manager.h" |
| 84 #include "chrome/browser/ui/browser.h" | 84 #include "chrome/browser/ui/browser.h" |
| 85 #include "chrome/browser/ui/browser_finder.h" | 85 #include "chrome/browser/ui/browser_finder.h" |
| 86 #include "chrome/browser/ui/browser_ui_prefs.h" | 86 #include "chrome/browser/ui/browser_ui_prefs.h" |
| 87 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 87 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 88 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 88 #include "chrome/browser/ui/uma_browsing_activity_observer.h" | 89 #include "chrome/browser/ui/uma_browsing_activity_observer.h" |
| 89 #include "chrome/browser/ui/user_data_dir_dialog.h" | 90 #include "chrome/browser/ui/user_data_dir_dialog.h" |
| 90 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 91 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 91 #include "chrome/common/child_process_logging.h" | 92 #include "chrome/common/child_process_logging.h" |
| 92 #include "chrome/common/chrome_constants.h" | 93 #include "chrome/common/chrome_constants.h" |
| 93 #include "chrome/common/chrome_paths.h" | 94 #include "chrome/common/chrome_paths.h" |
| 94 #include "chrome/common/chrome_result_codes.h" | 95 #include "chrome/common/chrome_result_codes.h" |
| 95 #include "chrome/common/chrome_switches.h" | 96 #include "chrome/common/chrome_switches.h" |
| 96 #include "chrome/common/chrome_version_info.h" | 97 #include "chrome/common/chrome_version_info.h" |
| (...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1677 | 1678 |
| 1678 // If stats reporting was turned on by the first run dialog then toggle | 1679 // If stats reporting was turned on by the first run dialog then toggle |
| 1679 // the pref. | 1680 // the pref. |
| 1680 if (GoogleUpdateSettings::GetCollectStatsConsent()) | 1681 if (GoogleUpdateSettings::GetCollectStatsConsent()) |
| 1681 local_state_->SetBoolean(prefs::kMetricsReportingEnabled, true); | 1682 local_state_->SetBoolean(prefs::kMetricsReportingEnabled, true); |
| 1682 #endif // OS_POSIX && !OS_CHROMEOS | 1683 #endif // OS_POSIX && !OS_CHROMEOS |
| 1683 } // if (!first_run_ui_bypass_) | 1684 } // if (!first_run_ui_bypass_) |
| 1684 | 1685 |
| 1685 chrome::SetNewHomePagePrefs(profile_->GetPrefs()); | 1686 chrome::SetNewHomePagePrefs(profile_->GetPrefs()); |
| 1686 browser_process_->profile_manager()->OnImportFinished(profile_); | 1687 browser_process_->profile_manager()->OnImportFinished(profile_); |
| 1688 |
| 1689 if (!master_prefs_->suppress_first_run_default_browser_prompt) |
| 1690 chrome::ShowFirstRunDefaultBrowserPrompt(profile_); |
| 1691 else |
| 1692 browser_creator_->set_is_default_browser_dialog_suppressed(true); |
| 1687 } // if (is_first_run_) | 1693 } // if (is_first_run_) |
| 1688 | 1694 |
| 1689 #if defined(OS_WIN) | 1695 #if defined(OS_WIN) |
| 1690 // Sets things up so that if we crash from this point on, a dialog will | 1696 // Sets things up so that if we crash from this point on, a dialog will |
| 1691 // popup asking the user to restart chrome. It is done this late to avoid | 1697 // popup asking the user to restart chrome. It is done this late to avoid |
| 1692 // testing against a bunch of special cases that are taken care early on. | 1698 // testing against a bunch of special cases that are taken care early on. |
| 1693 ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 1699 ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
| 1694 parsed_command_line()); | 1700 parsed_command_line()); |
| 1695 | 1701 |
| 1696 // Registers Chrome with the Windows Restart Manager, which will restore the | 1702 // Registers Chrome with the Windows Restart Manager, which will restore the |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2073 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2079 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 2074 uma_name += "_XP"; | 2080 uma_name += "_XP"; |
| 2075 | 2081 |
| 2076 uma_name += "_PreRead_"; | 2082 uma_name += "_PreRead_"; |
| 2077 uma_name += pre_read_percentage; | 2083 uma_name += pre_read_percentage; |
| 2078 AddPreReadHistogramTime(uma_name.c_str(), time); | 2084 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2079 } | 2085 } |
| 2080 #endif | 2086 #endif |
| 2081 #endif | 2087 #endif |
| 2082 } | 2088 } |
| OLD | NEW |