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

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

Issue 6265024: Turn on disk I/O access checks for the UI thread on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698