Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Side by Side Diff: chrome/browser/browser_main.cc

Issue 6272012: Temporary whitelist several cases of disk I/O on the UI threads in cros. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos
Patch Set: cleanup WizardInProcessBrowserTest Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 // and 1 if it can't be. This is for validation that the library is installed 524 // and 1 if it can't be. This is for validation that the library is installed
525 // and versioned properly for Chrome to find. 525 // and versioned properly for Chrome to find.
526 if (command_line.HasSwitch(switches::kTestLoadLibcros)) 526 if (command_line.HasSwitch(switches::kTestLoadLibcros))
527 exit(!chromeos::CrosLibrary::Get()->EnsureLoaded()); 527 exit(!chromeos::CrosLibrary::Get()->EnsureLoaded());
528 #endif 528 #endif
529 } 529 }
530 530
531 void RunUIMessageLoop(BrowserProcess* browser_process) { 531 void RunUIMessageLoop(BrowserProcess* browser_process) {
532 TRACE_EVENT_BEGIN("BrowserMain:MESSAGE_LOOP", 0, ""); 532 TRACE_EVENT_BEGIN("BrowserMain:MESSAGE_LOOP", 0, "");
533 533
534 #if !defined(OS_CHROMEOS)
535 // If the UI thread blocks, the whole UI is unresponsive. 534 // If the UI thread blocks, the whole UI is unresponsive.
536 // Do not allow disk IO from the UI thread. 535 // Do not allow disk IO from the UI thread.
537 // TODO(evanm): turn this on for all platforms.
538 // http://code.google.com/p/chromium/issues/detail?id=60211
539 base::ThreadRestrictions::SetIOAllowed(false); 536 base::ThreadRestrictions::SetIOAllowed(false);
540 #endif
541 537
542 #if defined(TOOLKIT_VIEWS) 538 #if defined(TOOLKIT_VIEWS)
543 views::AcceleratorHandler accelerator_handler; 539 views::AcceleratorHandler accelerator_handler;
544 MessageLoopForUI::current()->Run(&accelerator_handler); 540 MessageLoopForUI::current()->Run(&accelerator_handler);
545 #elif defined(USE_X11) 541 #elif defined(USE_X11)
546 MessageLoopForUI::current()->Run(NULL); 542 MessageLoopForUI::current()->Run(NULL);
547 #elif defined(OS_POSIX) 543 #elif defined(OS_POSIX)
548 MessageLoopForUI::current()->Run(); 544 MessageLoopForUI::current()->Run();
549 #endif 545 #endif
550 #if defined(OS_CHROMEOS) 546 #if defined(OS_CHROMEOS)
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 #if defined(OS_CHROMEOS) 1745 #if defined(OS_CHROMEOS)
1750 // To be precise, logout (browser shutdown) is not yet done, but the 1746 // To be precise, logout (browser shutdown) is not yet done, but the
1751 // remaining work is negligible, hence we say LogoutDone here. 1747 // remaining work is negligible, hence we say LogoutDone here.
1752 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1748 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1753 false); 1749 false);
1754 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1750 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1755 #endif 1751 #endif
1756 TRACE_EVENT_END("BrowserMain", 0, 0); 1752 TRACE_EVENT_END("BrowserMain", 0, 0);
1757 return result_code; 1753 return result_code;
1758 } 1754 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698