| 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/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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 // and 1 if it can't be. This is for validation that the library is installed | 526 // and 1 if it can't be. This is for validation that the library is installed |
| 527 // and versioned properly for Chrome to find. | 527 // and versioned properly for Chrome to find. |
| 528 if (command_line.HasSwitch(switches::kTestLoadLibcros)) | 528 if (command_line.HasSwitch(switches::kTestLoadLibcros)) |
| 529 exit(!chromeos::CrosLibrary::Get()->EnsureLoaded()); | 529 exit(!chromeos::CrosLibrary::Get()->EnsureLoaded()); |
| 530 #endif | 530 #endif |
| 531 } | 531 } |
| 532 | 532 |
| 533 void RunUIMessageLoop(BrowserProcess* browser_process) { | 533 void RunUIMessageLoop(BrowserProcess* browser_process) { |
| 534 TRACE_EVENT_BEGIN("BrowserMain:MESSAGE_LOOP", 0, ""); | 534 TRACE_EVENT_BEGIN("BrowserMain:MESSAGE_LOOP", 0, ""); |
| 535 | 535 |
| 536 #if !defined(OS_CHROMEOS) | |
| 537 // If the UI thread blocks, the whole UI is unresponsive. | 536 // If the UI thread blocks, the whole UI is unresponsive. |
| 538 // Do not allow disk IO from the UI thread. | 537 // Do not allow disk IO from the UI thread. |
| 539 // TODO(evanm): turn this on for all platforms. | |
| 540 // http://code.google.com/p/chromium/issues/detail?id=60211 | |
| 541 base::ThreadRestrictions::SetIOAllowed(false); | 538 base::ThreadRestrictions::SetIOAllowed(false); |
| 542 #endif | |
| 543 | 539 |
| 544 #if defined(TOOLKIT_VIEWS) | 540 #if defined(TOOLKIT_VIEWS) |
| 545 views::AcceleratorHandler accelerator_handler; | 541 views::AcceleratorHandler accelerator_handler; |
| 546 MessageLoopForUI::current()->Run(&accelerator_handler); | 542 MessageLoopForUI::current()->Run(&accelerator_handler); |
| 547 #elif defined(USE_X11) | 543 #elif defined(USE_X11) |
| 548 MessageLoopForUI::current()->Run(NULL); | 544 MessageLoopForUI::current()->Run(NULL); |
| 549 #elif defined(OS_POSIX) | 545 #elif defined(OS_POSIX) |
| 550 MessageLoopForUI::current()->Run(); | 546 MessageLoopForUI::current()->Run(); |
| 551 #endif | 547 #endif |
| 552 #if defined(OS_CHROMEOS) | 548 #if defined(OS_CHROMEOS) |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 #if defined(OS_CHROMEOS) | 1779 #if defined(OS_CHROMEOS) |
| 1784 // To be precise, logout (browser shutdown) is not yet done, but the | 1780 // To be precise, logout (browser shutdown) is not yet done, but the |
| 1785 // remaining work is negligible, hence we say LogoutDone here. | 1781 // remaining work is negligible, hence we say LogoutDone here. |
| 1786 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1782 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 1787 false); | 1783 false); |
| 1788 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1784 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 1789 #endif | 1785 #endif |
| 1790 TRACE_EVENT_END("BrowserMain", 0, 0); | 1786 TRACE_EVENT_END("BrowserMain", 0, 0); |
| 1791 return result_code; | 1787 return result_code; |
| 1792 } | 1788 } |
| OLD | NEW |