| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 #include "chrome/browser/search_engines/template_url.h" | 67 #include "chrome/browser/search_engines/template_url.h" |
| 68 #include "chrome/browser/search_engines/template_url_service.h" | 68 #include "chrome/browser/search_engines/template_url_service.h" |
| 69 #include "chrome/browser/search_engines/template_url_service_factory.h" | 69 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 70 #include "chrome/browser/service/service_process_control.h" | 70 #include "chrome/browser/service/service_process_control.h" |
| 71 #include "chrome/browser/shell_integration.h" | 71 #include "chrome/browser/shell_integration.h" |
| 72 #include "chrome/browser/translate/translate_manager.h" | 72 #include "chrome/browser/translate/translate_manager.h" |
| 73 #include "chrome/browser/ui/browser.h" | 73 #include "chrome/browser/ui/browser.h" |
| 74 #include "chrome/browser/ui/browser_init.h" | 74 #include "chrome/browser/ui/browser_init.h" |
| 75 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 75 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 76 #include "chrome/browser/web_resource/gpu_blacklist_updater.h" | 76 #include "chrome/browser/web_resource/gpu_blacklist_updater.h" |
| 77 #include "chrome/common/child_process_logging.h" |
| 77 #include "chrome/common/chrome_constants.h" | 78 #include "chrome/common/chrome_constants.h" |
| 78 #include "chrome/common/chrome_paths.h" | 79 #include "chrome/common/chrome_paths.h" |
| 79 #include "chrome/common/chrome_result_codes.h" | 80 #include "chrome/common/chrome_result_codes.h" |
| 80 #include "chrome/common/chrome_switches.h" | 81 #include "chrome/common/chrome_switches.h" |
| 81 #include "chrome/common/chrome_version_info.h" | 82 #include "chrome/common/chrome_version_info.h" |
| 82 #include "chrome/common/env_vars.h" | 83 #include "chrome/common/env_vars.h" |
| 83 #include "chrome/common/json_pref_store.h" | 84 #include "chrome/common/json_pref_store.h" |
| 84 #include "chrome/common/jstemplate_builder.h" | 85 #include "chrome/common/jstemplate_builder.h" |
| 85 #include "chrome/common/logging_chrome.h" | 86 #include "chrome/common/logging_chrome.h" |
| 86 #include "chrome/common/net/net_resource_provider.h" | 87 #include "chrome/common/net/net_resource_provider.h" |
| (...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1325 // call to ConvertFlagsToSwitches in the following line. | 1326 // call to ConvertFlagsToSwitches in the following line. |
| 1326 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) | 1327 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) |
| 1327 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, | 1328 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, |
| 1328 "other"); | 1329 "other"); |
| 1329 #endif | 1330 #endif |
| 1330 | 1331 |
| 1331 // Convert active labs into switches. Modifies the current command line. | 1332 // Convert active labs into switches. Modifies the current command line. |
| 1332 about_flags::ConvertFlagsToSwitches(local_state, | 1333 about_flags::ConvertFlagsToSwitches(local_state, |
| 1333 CommandLine::ForCurrentProcess()); | 1334 CommandLine::ForCurrentProcess()); |
| 1334 | 1335 |
| 1336 // Reset the command line in the crash report details, since we may have |
| 1337 // just changed it to include experiments. |
| 1338 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); |
| 1339 |
| 1335 #if defined(TOOLKIT_VIEWS) | 1340 #if defined(TOOLKIT_VIEWS) |
| 1336 views::Widget::SetPureViews( | 1341 views::Widget::SetPureViews( |
| 1337 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); | 1342 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); |
| 1338 // Launch the views desktop shell window and register it as the default parent | 1343 // Launch the views desktop shell window and register it as the default parent |
| 1339 // for all unparented views widgets. | 1344 // for all unparented views widgets. |
| 1340 if (parsed_command_line().HasSwitch(switches::kViewsDesktop)) { | 1345 if (parsed_command_line().HasSwitch(switches::kViewsDesktop)) { |
| 1341 std::string desktop_type_cmd = | 1346 std::string desktop_type_cmd = |
| 1342 parsed_command_line().GetSwitchValueASCII(switches::kViewsDesktop); | 1347 parsed_command_line().GetSwitchValueASCII(switches::kViewsDesktop); |
| 1343 if (desktop_type_cmd != "disabled") { | 1348 if (desktop_type_cmd != "disabled") { |
| 1344 views::desktop::DesktopWindowView::DesktopType desktop_type; | 1349 views::desktop::DesktopWindowView::DesktopType desktop_type; |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2030 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2035 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2031 (pre_read == "0" || pre_read == "1")) { | 2036 (pre_read == "0" || pre_read == "1")) { |
| 2032 std::string uma_name(name); | 2037 std::string uma_name(name); |
| 2033 uma_name += "_PreRead"; | 2038 uma_name += "_PreRead"; |
| 2034 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2039 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2035 AddPreReadHistogramTime(uma_name.c_str(), time); | 2040 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2036 } | 2041 } |
| 2037 #endif | 2042 #endif |
| 2038 #endif | 2043 #endif |
| 2039 } | 2044 } |
| OLD | NEW |