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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 #include "chrome/browser/search_engines/template_url.h" | 78 #include "chrome/browser/search_engines/template_url.h" |
79 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 79 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
80 #include "chrome/browser/search_engines/template_url_service.h" | 80 #include "chrome/browser/search_engines/template_url_service.h" |
81 #include "chrome/browser/search_engines/template_url_service_factory.h" | 81 #include "chrome/browser/search_engines/template_url_service_factory.h" |
82 #include "chrome/browser/service/service_process_control.h" | 82 #include "chrome/browser/service/service_process_control.h" |
83 #include "chrome/browser/shell_integration.h" | 83 #include "chrome/browser/shell_integration.h" |
84 #include "chrome/browser/translate/translate_manager.h" | 84 #include "chrome/browser/translate/translate_manager.h" |
85 #include "chrome/browser/ui/browser.h" | 85 #include "chrome/browser/ui/browser.h" |
86 #include "chrome/browser/ui/browser_finder.h" | 86 #include "chrome/browser/ui/browser_finder.h" |
87 #include "chrome/browser/ui/browser_ui_prefs.h" | 87 #include "chrome/browser/ui/browser_ui_prefs.h" |
88 #include "chrome/browser/ui/startup/default_browser_prompt.h" | |
88 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 89 #include "chrome/browser/ui/startup/startup_browser_creator.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" |
97 #include "chrome/common/env_vars.h" | 98 #include "chrome/common/env_vars.h" |
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1636 | 1637 |
1637 // If stats reporting was turned on by the first run dialog then toggle | 1638 // If stats reporting was turned on by the first run dialog then toggle |
1638 // the pref. | 1639 // the pref. |
1639 if (GoogleUpdateSettings::GetCollectStatsConsent()) | 1640 if (GoogleUpdateSettings::GetCollectStatsConsent()) |
1640 local_state_->SetBoolean(prefs::kMetricsReportingEnabled, true); | 1641 local_state_->SetBoolean(prefs::kMetricsReportingEnabled, true); |
1641 #endif // OS_POSIX && !OS_CHROMEOS | 1642 #endif // OS_POSIX && !OS_CHROMEOS |
1642 } // if (!first_run_ui_bypass_) | 1643 } // if (!first_run_ui_bypass_) |
1643 | 1644 |
1644 chrome::SetNewHomePagePrefs(profile_->GetPrefs()); | 1645 chrome::SetNewHomePagePrefs(profile_->GetPrefs()); |
1645 browser_process_->profile_manager()->OnImportFinished(profile_); | 1646 browser_process_->profile_manager()->OnImportFinished(profile_); |
1647 chrome::ShowFirstRunDefaultBrowserPrompt(profile_); | |
grt (UTC plus 2)
2012/07/05 17:16:09
if my suggestion about kDefaultBrowserFlowDialogEn
motek.
2012/07/05 20:22:26
Done.
| |
1646 } // if (is_first_run_) | 1648 } // if (is_first_run_) |
1647 | 1649 |
1648 #if defined(OS_WIN) | 1650 #if defined(OS_WIN) |
1649 // Sets things up so that if we crash from this point on, a dialog will | 1651 // Sets things up so that if we crash from this point on, a dialog will |
1650 // popup asking the user to restart chrome. It is done this late to avoid | 1652 // popup asking the user to restart chrome. It is done this late to avoid |
1651 // testing against a bunch of special cases that are taken care early on. | 1653 // testing against a bunch of special cases that are taken care early on. |
1652 ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 1654 ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
1653 parsed_command_line()); | 1655 parsed_command_line()); |
1654 | 1656 |
1655 // Registers Chrome with the Windows Restart Manager, which will restore the | 1657 // Registers Chrome with the Windows Restart Manager, which will restore the |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2033 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2035 if (base::win::GetVersion() <= base::win::VERSION_XP) |
2034 uma_name += "_XP"; | 2036 uma_name += "_XP"; |
2035 | 2037 |
2036 uma_name += "_PreRead_"; | 2038 uma_name += "_PreRead_"; |
2037 uma_name += pre_read_percentage; | 2039 uma_name += pre_read_percentage; |
2038 AddPreReadHistogramTime(uma_name.c_str(), time); | 2040 AddPreReadHistogramTime(uma_name.c_str(), time); |
2039 } | 2041 } |
2040 #endif | 2042 #endif |
2041 #endif | 2043 #endif |
2042 } | 2044 } |
OLD | NEW |