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 16 matching lines...) Expand all Loading... |
27 #include "base/threading/platform_thread.h" | 27 #include "base/threading/platform_thread.h" |
28 #include "base/time.h" | 28 #include "base/time.h" |
29 #include "base/utf_string_conversions.h" | 29 #include "base/utf_string_conversions.h" |
30 #include "base/values.h" | 30 #include "base/values.h" |
31 #include "build/build_config.h" | 31 #include "build/build_config.h" |
32 #include "chrome/browser/about_flags.h" | 32 #include "chrome/browser/about_flags.h" |
33 #include "chrome/browser/browser_process.h" | 33 #include "chrome/browser/browser_process.h" |
34 #include "chrome/browser/browser_process_impl.h" | 34 #include "chrome/browser/browser_process_impl.h" |
35 #include "chrome/browser/browser_shutdown.h" | 35 #include "chrome/browser/browser_shutdown.h" |
36 #include "chrome/browser/chrome_browser_main_extra_parts.h" | 36 #include "chrome/browser/chrome_browser_main_extra_parts.h" |
37 #include "chrome/browser/chrome_gpu_util.h" | |
38 #include "chrome/browser/defaults.h" | 37 #include "chrome/browser/defaults.h" |
39 #include "chrome/browser/extensions/extension_protocols.h" | 38 #include "chrome/browser/extensions/extension_protocols.h" |
40 #include "chrome/browser/extensions/extension_service.h" | 39 #include "chrome/browser/extensions/extension_service.h" |
41 #include "chrome/browser/extensions/startup_helper.h" | 40 #include "chrome/browser/extensions/startup_helper.h" |
42 #include "chrome/browser/first_run/upgrade_util.h" | 41 #include "chrome/browser/first_run/upgrade_util.h" |
43 #include "chrome/browser/google/google_search_counter.h" | 42 #include "chrome/browser/google/google_search_counter.h" |
44 #include "chrome/browser/google/google_util.h" | 43 #include "chrome/browser/google/google_util.h" |
45 #include "chrome/browser/jankometer.h" | 44 #include "chrome/browser/jankometer.h" |
46 #include "chrome/browser/language_usage_metrics.h" | 45 #include "chrome/browser/language_usage_metrics.h" |
47 #include "chrome/browser/managed_mode.h" | 46 #include "chrome/browser/managed_mode.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 #include "chrome/common/env_vars.h" | 90 #include "chrome/common/env_vars.h" |
92 #include "chrome/common/json_pref_store.h" | 91 #include "chrome/common/json_pref_store.h" |
93 #include "chrome/common/jstemplate_builder.h" | 92 #include "chrome/common/jstemplate_builder.h" |
94 #include "chrome/common/logging_chrome.h" | 93 #include "chrome/common/logging_chrome.h" |
95 #include "chrome/common/metrics/variations/variations_util.h" | 94 #include "chrome/common/metrics/variations/variations_util.h" |
96 #include "chrome/common/net/net_resource_provider.h" | 95 #include "chrome/common/net/net_resource_provider.h" |
97 #include "chrome/common/pref_names.h" | 96 #include "chrome/common/pref_names.h" |
98 #include "chrome/common/profiling.h" | 97 #include "chrome/common/profiling.h" |
99 #include "chrome/installer/util/google_update_settings.h" | 98 #include "chrome/installer/util/google_update_settings.h" |
100 #include "content/public/browser/browser_thread.h" | 99 #include "content/public/browser/browser_thread.h" |
101 #include "content/public/browser/gpu_data_manager.h" | |
102 #include "content/public/browser/render_process_host.h" | 100 #include "content/public/browser/render_process_host.h" |
103 #include "content/public/common/content_client.h" | 101 #include "content/public/common/content_client.h" |
104 #include "content/public/common/main_function_params.h" | 102 #include "content/public/common/main_function_params.h" |
105 #include "grit/app_locale_settings.h" | 103 #include "grit/app_locale_settings.h" |
106 #include "grit/browser_resources.h" | 104 #include "grit/browser_resources.h" |
107 #include "grit/chromium_strings.h" | 105 #include "grit/chromium_strings.h" |
108 #include "grit/generated_resources.h" | 106 #include "grit/generated_resources.h" |
109 #include "grit/platform_locale_settings.h" | 107 #include "grit/platform_locale_settings.h" |
110 #include "net/base/net_module.h" | 108 #include "net/base/net_module.h" |
111 #include "net/base/sdch_manager.h" | 109 #include "net/base/sdch_manager.h" |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 | 1306 |
1309 // Create the instance of the cloud print proxy service so that it can launch | 1307 // Create the instance of the cloud print proxy service so that it can launch |
1310 // the service process if needed. This is needed because the service process | 1308 // the service process if needed. This is needed because the service process |
1311 // might have shutdown because an update was available. | 1309 // might have shutdown because an update was available. |
1312 // TODO(torne): this should maybe be done with | 1310 // TODO(torne): this should maybe be done with |
1313 // ProfileKeyedServiceFactory::ServiceIsCreatedWithProfile() instead? | 1311 // ProfileKeyedServiceFactory::ServiceIsCreatedWithProfile() instead? |
1314 #if !defined(OS_ANDROID) | 1312 #if !defined(OS_ANDROID) |
1315 CloudPrintProxyServiceFactory::GetForProfile(profile_); | 1313 CloudPrintProxyServiceFactory::GetForProfile(profile_); |
1316 #endif | 1314 #endif |
1317 | 1315 |
1318 // Load GPU Blacklist; load preliminary GPU info. | |
1319 gpu_util::InitializeGpuDataManager(parsed_command_line()); | |
1320 | |
1321 // Start watching all browser threads for responsiveness. | 1316 // Start watching all browser threads for responsiveness. |
1322 ThreadWatcherList::StartWatchingAll(parsed_command_line()); | 1317 ThreadWatcherList::StartWatchingAll(parsed_command_line()); |
1323 | 1318 |
1324 #if !defined(DISABLE_NACL) | 1319 #if !defined(DISABLE_NACL) |
1325 if (parsed_command_line().HasSwitch(switches::kPnaclDir)) { | 1320 if (parsed_command_line().HasSwitch(switches::kPnaclDir)) { |
1326 PathService::Override(chrome::DIR_PNACL_BASE, | 1321 PathService::Override(chrome::DIR_PNACL_BASE, |
1327 parsed_command_line().GetSwitchValuePath( | 1322 parsed_command_line().GetSwitchValuePath( |
1328 switches::kPnaclDir)); | 1323 switches::kPnaclDir)); |
1329 } | 1324 } |
1330 NaClProcessHost::EarlyStartup(); | 1325 NaClProcessHost::EarlyStartup(); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1582 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1588 uma_name += "_XP"; | 1583 uma_name += "_XP"; |
1589 | 1584 |
1590 uma_name += "_PreRead_"; | 1585 uma_name += "_PreRead_"; |
1591 uma_name += pre_read_percentage; | 1586 uma_name += pre_read_percentage; |
1592 AddPreReadHistogramTime(uma_name.c_str(), time); | 1587 AddPreReadHistogramTime(uma_name.c_str(), time); |
1593 } | 1588 } |
1594 #endif | 1589 #endif |
1595 #endif | 1590 #endif |
1596 } | 1591 } |
OLD | NEW |