| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 #if defined(TOOLKIT_USES_GTK) | 195 #if defined(TOOLKIT_USES_GTK) |
| 196 #include "ui/gfx/gtk_util.h" | 196 #include "ui/gfx/gtk_util.h" |
| 197 #endif | 197 #endif |
| 198 | 198 |
| 199 #if defined(TOUCH_UI) | 199 #if defined(TOUCH_UI) |
| 200 #include "ui/base/touch/touch_factory.h" | 200 #include "ui/base/touch/touch_factory.h" |
| 201 #endif | 201 #endif |
| 202 | 202 |
| 203 #if defined(USE_AURA) | 203 #if defined(USE_AURA) |
| 204 #include "ui/aura/desktop.h" | 204 #include "ui/aura_shell/shell.h" |
| 205 #include "ui/aura_shell/shell_factory.h" | |
| 206 #include "ui/aura/desktop.h" | |
| 207 #endif | 205 #endif |
| 208 | 206 |
| 209 namespace net { | 207 namespace net { |
| 210 class NetLog; | 208 class NetLog; |
| 211 } // namespace net | 209 } // namespace net |
| 212 | 210 |
| 213 namespace { | 211 namespace { |
| 214 | 212 |
| 215 // This function provides some ways to test crash and assertion handling | 213 // This function provides some ways to test crash and assertion handling |
| 216 // behavior of the program. | 214 // behavior of the program. |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 | 1359 |
| 1362 // Convert active labs into switches. Modifies the current command line. | 1360 // Convert active labs into switches. Modifies the current command line. |
| 1363 about_flags::ConvertFlagsToSwitches(local_state, | 1361 about_flags::ConvertFlagsToSwitches(local_state, |
| 1364 CommandLine::ForCurrentProcess()); | 1362 CommandLine::ForCurrentProcess()); |
| 1365 | 1363 |
| 1366 // Reset the command line in the crash report details, since we may have | 1364 // Reset the command line in the crash report details, since we may have |
| 1367 // just changed it to include experiments. | 1365 // just changed it to include experiments. |
| 1368 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); | 1366 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); |
| 1369 | 1367 |
| 1370 #if defined(USE_AURA) | 1368 #if defined(USE_AURA) |
| 1371 aura_shell::InitDesktopWindow(); | 1369 aura_shell::Shell shell; |
| 1370 shell.Init(); |
| 1372 #elif defined(TOOLKIT_VIEWS) | 1371 #elif defined(TOOLKIT_VIEWS) |
| 1373 views::Widget::SetPureViews( | 1372 views::Widget::SetPureViews( |
| 1374 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); | 1373 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); |
| 1375 // Launch the views desktop shell window and register it as the default parent | 1374 // Launch the views desktop shell window and register it as the default parent |
| 1376 // for all unparented views widgets. | 1375 // for all unparented views widgets. |
| 1377 if (parsed_command_line().HasSwitch(switches::kViewsDesktop)) { | 1376 if (parsed_command_line().HasSwitch(switches::kViewsDesktop)) { |
| 1378 std::string desktop_type_cmd = | 1377 std::string desktop_type_cmd = |
| 1379 parsed_command_line().GetSwitchValueASCII(switches::kViewsDesktop); | 1378 parsed_command_line().GetSwitchValueASCII(switches::kViewsDesktop); |
| 1380 if (desktop_type_cmd != "disabled") { | 1379 if (desktop_type_cmd != "disabled") { |
| 1381 views::desktop::DesktopWindowView::DesktopType desktop_type; | 1380 views::desktop::DesktopWindowView::DesktopType desktop_type; |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2081 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2080 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2082 (pre_read == "0" || pre_read == "1")) { | 2081 (pre_read == "0" || pre_read == "1")) { |
| 2083 std::string uma_name(name); | 2082 std::string uma_name(name); |
| 2084 uma_name += "_PreRead"; | 2083 uma_name += "_PreRead"; |
| 2085 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2084 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2086 AddPreReadHistogramTime(uma_name.c_str(), time); | 2085 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2087 } | 2086 } |
| 2088 #endif | 2087 #endif |
| 2089 #endif | 2088 #endif |
| 2090 } | 2089 } |
| OLD | NEW |