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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 #include "chrome/browser/service/service_process_control.h" | 85 #include "chrome/browser/service/service_process_control.h" |
86 #include "chrome/browser/shell_integration.h" | 86 #include "chrome/browser/shell_integration.h" |
87 #include "chrome/browser/translate/translate_manager.h" | 87 #include "chrome/browser/translate/translate_manager.h" |
88 #include "chrome/browser/ui/browser.h" | 88 #include "chrome/browser/ui/browser.h" |
89 #include "chrome/browser/ui/browser_finder.h" | 89 #include "chrome/browser/ui/browser_finder.h" |
90 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 90 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
91 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 91 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
92 #include "chrome/browser/ui/uma_browsing_activity_observer.h" | 92 #include "chrome/browser/ui/uma_browsing_activity_observer.h" |
93 #include "chrome/browser/ui/user_data_dir_dialog.h" | 93 #include "chrome/browser/ui/user_data_dir_dialog.h" |
94 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 94 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
95 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | |
96 #include "chrome/common/child_process_logging.h" | 95 #include "chrome/common/child_process_logging.h" |
97 #include "chrome/common/chrome_constants.h" | 96 #include "chrome/common/chrome_constants.h" |
98 #include "chrome/common/chrome_paths.h" | 97 #include "chrome/common/chrome_paths.h" |
99 #include "chrome/common/chrome_result_codes.h" | 98 #include "chrome/common/chrome_result_codes.h" |
100 #include "chrome/common/chrome_switches.h" | 99 #include "chrome/common/chrome_switches.h" |
101 #include "chrome/common/env_vars.h" | 100 #include "chrome/common/env_vars.h" |
102 #include "chrome/common/jstemplate_builder.h" | 101 #include "chrome/common/jstemplate_builder.h" |
103 #include "chrome/common/logging_chrome.h" | 102 #include "chrome/common/logging_chrome.h" |
104 #include "chrome/common/metrics/variations/variations_util.h" | 103 #include "chrome/common/metrics/variations/variations_util.h" |
105 #include "chrome/common/net/net_resource_provider.h" | 104 #include "chrome/common/net/net_resource_provider.h" |
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 #if defined(OS_CHROMEOS) | 1384 #if defined(OS_CHROMEOS) |
1386 // On ChromeOS multiple profiles doesn't apply, and will break if we load | 1385 // On ChromeOS multiple profiles doesn't apply, and will break if we load |
1387 // them this early as the cryptohome hasn't yet been mounted (which happens | 1386 // them this early as the cryptohome hasn't yet been mounted (which happens |
1388 // only once we log in. | 1387 // only once we log in. |
1389 std::vector<Profile*> last_opened_profiles; | 1388 std::vector<Profile*> last_opened_profiles; |
1390 #else | 1389 #else |
1391 std::vector<Profile*> last_opened_profiles = | 1390 std::vector<Profile*> last_opened_profiles = |
1392 g_browser_process->profile_manager()->GetLastOpenedProfiles(); | 1391 g_browser_process->profile_manager()->GetLastOpenedProfiles(); |
1393 #endif | 1392 #endif |
1394 | 1393 |
1395 content::WebUIControllerFactory::RegisterFactory( | |
1396 ChromeWebUIControllerFactory::GetInstance()); | |
1397 | |
1398 if (browser_creator_->Start(parsed_command_line(), FilePath(), | 1394 if (browser_creator_->Start(parsed_command_line(), FilePath(), |
1399 profile_, last_opened_profiles, &result_code)) { | 1395 profile_, last_opened_profiles, &result_code)) { |
1400 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 1396 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
1401 // Initialize autoupdate timer. Timer callback costs basically nothing | 1397 // Initialize autoupdate timer. Timer callback costs basically nothing |
1402 // when browser is not in persistent mode, so it's OK to let it ride on | 1398 // when browser is not in persistent mode, so it's OK to let it ride on |
1403 // the main thread. This needs to be done here because we don't want | 1399 // the main thread. This needs to be done here because we don't want |
1404 // to start the timer when Chrome is run inside a test harness. | 1400 // to start the timer when Chrome is run inside a test harness. |
1405 browser_process_->StartAutoupdateTimer(); | 1401 browser_process_->StartAutoupdateTimer(); |
1406 #endif | 1402 #endif |
1407 | 1403 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1670 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1666 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1671 uma_name += "_XP"; | 1667 uma_name += "_XP"; |
1672 | 1668 |
1673 uma_name += "_PreRead_"; | 1669 uma_name += "_PreRead_"; |
1674 uma_name += pre_read_percentage; | 1670 uma_name += pre_read_percentage; |
1675 AddPreReadHistogramTime(uma_name.c_str(), time); | 1671 AddPreReadHistogramTime(uma_name.c_str(), time); |
1676 } | 1672 } |
1677 #endif | 1673 #endif |
1678 #endif | 1674 #endif |
1679 } | 1675 } |
OLD | NEW |