| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_main.h" | 5 #include "chrome/browser/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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 std::string first_screen = | 797 std::string first_screen = |
| 798 parsed_command_line.GetSwitchValueASCII(switches::kLoginScreen); | 798 parsed_command_line.GetSwitchValueASCII(switches::kLoginScreen); |
| 799 std::string size_arg = | 799 std::string size_arg = |
| 800 parsed_command_line.GetSwitchValueASCII( | 800 parsed_command_line.GetSwitchValueASCII( |
| 801 switches::kLoginScreenSize); | 801 switches::kLoginScreenSize); |
| 802 gfx::Size size(0, 0); | 802 gfx::Size size(0, 0); |
| 803 // Allow the size of the login window to be set explicitly. If not set, | 803 // Allow the size of the login window to be set explicitly. If not set, |
| 804 // default to the entire screen. This is mostly useful for testing. | 804 // default to the entire screen. This is mostly useful for testing. |
| 805 if (size_arg.size()) { | 805 if (size_arg.size()) { |
| 806 std::vector<std::string> dimensions; | 806 std::vector<std::string> dimensions; |
| 807 SplitString(size_arg, ',', &dimensions); | 807 base::SplitString(size_arg, ',', &dimensions); |
| 808 if (dimensions.size() == 2) { | 808 if (dimensions.size() == 2) { |
| 809 int width, height; | 809 int width, height; |
| 810 if (base::StringToInt(dimensions[0], &width) && | 810 if (base::StringToInt(dimensions[0], &width) && |
| 811 base::StringToInt(dimensions[1], &height)) | 811 base::StringToInt(dimensions[1], &height)) |
| 812 size.SetSize(width, height); | 812 size.SetSize(width, height); |
| 813 } | 813 } |
| 814 } | 814 } |
| 815 browser::ShowLoginWizard(first_screen, size); | 815 browser::ShowLoginWizard(first_screen, size); |
| 816 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && | 816 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && |
| 817 parsed_command_line.HasSwitch(switches::kLoginPassword)) { | 817 parsed_command_line.HasSwitch(switches::kLoginPassword)) { |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 metrics->Stop(); | 1532 metrics->Stop(); |
| 1533 | 1533 |
| 1534 // browser_shutdown takes care of deleting browser_process, so we need to | 1534 // browser_shutdown takes care of deleting browser_process, so we need to |
| 1535 // release it. | 1535 // release it. |
| 1536 ignore_result(browser_process.release()); | 1536 ignore_result(browser_process.release()); |
| 1537 browser_shutdown::Shutdown(); | 1537 browser_shutdown::Shutdown(); |
| 1538 | 1538 |
| 1539 TRACE_EVENT_END("BrowserMain", 0, 0); | 1539 TRACE_EVENT_END("BrowserMain", 0, 0); |
| 1540 return result_code; | 1540 return result_code; |
| 1541 } | 1541 } |
| OLD | NEW |