| 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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 // about:flags, it will get unset bt the call to ConvertFlagsToSwitches in the | 1321 // about:flags, it will get unset bt the call to ConvertFlagsToSwitches in the |
| 1321 // following line. | 1322 // following line. |
| 1322 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, | 1323 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, |
| 1323 "other"); | 1324 "other"); |
| 1324 #endif | 1325 #endif |
| 1325 | 1326 |
| 1326 // Convert active labs into switches. Modifies the current command line. | 1327 // Convert active labs into switches. Modifies the current command line. |
| 1327 about_flags::ConvertFlagsToSwitches(local_state, | 1328 about_flags::ConvertFlagsToSwitches(local_state, |
| 1328 CommandLine::ForCurrentProcess()); | 1329 CommandLine::ForCurrentProcess()); |
| 1329 | 1330 |
| 1331 // Reset the command line in the crash report details, since we may have |
| 1332 // just changed it to include experiments. |
| 1333 child_process_logging::SetCommandLineFromCurrent(); |
| 1334 |
| 1330 #if defined(TOOLKIT_VIEWS) | 1335 #if defined(TOOLKIT_VIEWS) |
| 1331 views::Widget::SetPureViews( | 1336 views::Widget::SetPureViews( |
| 1332 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); | 1337 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); |
| 1333 // Launch the views desktop shell window and register it as the default parent | 1338 // Launch the views desktop shell window and register it as the default parent |
| 1334 // for all unparented views widgets. | 1339 // for all unparented views widgets. |
| 1335 if (parsed_command_line().HasSwitch(switches::kViewsDesktop)) { | 1340 if (parsed_command_line().HasSwitch(switches::kViewsDesktop)) { |
| 1336 std::string desktop_type_cmd = | 1341 std::string desktop_type_cmd = |
| 1337 parsed_command_line().GetSwitchValueASCII(switches::kViewsDesktop); | 1342 parsed_command_line().GetSwitchValueASCII(switches::kViewsDesktop); |
| 1338 if (desktop_type_cmd != "disabled") { | 1343 if (desktop_type_cmd != "disabled") { |
| 1339 views::desktop::DesktopWindowView::DesktopType desktop_type; | 1344 views::desktop::DesktopWindowView::DesktopType desktop_type; |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2027 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2023 (pre_read == "0" || pre_read == "1")) { | 2028 (pre_read == "0" || pre_read == "1")) { |
| 2024 std::string uma_name(name); | 2029 std::string uma_name(name); |
| 2025 uma_name += "_PreRead"; | 2030 uma_name += "_PreRead"; |
| 2026 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2031 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2027 AddPreReadHistogramTime(uma_name.c_str(), time); | 2032 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2028 } | 2033 } |
| 2029 #endif | 2034 #endif |
| 2030 #endif | 2035 #endif |
| 2031 } | 2036 } |
| OLD | NEW |