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

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

Issue 4144003: Mac: turn on file access checks for the UI thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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) 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // and 1 if it can't be. This is for validation that the library is installed 476 // and 1 if it can't be. This is for validation that the library is installed
477 // and versioned properly for Chrome to find. 477 // and versioned properly for Chrome to find.
478 if (command_line.HasSwitch(switches::kTestLoadLibcros)) 478 if (command_line.HasSwitch(switches::kTestLoadLibcros))
479 exit(!chromeos::CrosLibrary::Get()->EnsureLoaded()); 479 exit(!chromeos::CrosLibrary::Get()->EnsureLoaded());
480 #endif 480 #endif
481 } 481 }
482 482
483 void RunUIMessageLoop(BrowserProcess* browser_process) { 483 void RunUIMessageLoop(BrowserProcess* browser_process) {
484 TRACE_EVENT_BEGIN("BrowserMain:MESSAGE_LOOP", 0, ""); 484 TRACE_EVENT_BEGIN("BrowserMain:MESSAGE_LOOP", 0, "");
485 485
486 #if defined(OS_LINUX) 486 #if defined(OS_LINUX) || defined(OS_MACOSX)
487 // If the UI thread blocks, the whole UI is unresponsive. 487 // If the UI thread blocks, the whole UI is unresponsive.
488 // Do not allow disk IO from the UI thread. 488 // Do not allow disk IO from the UI thread.
489 // TODO(evanm): turn this on for all platforms. 489 // TODO(evanm): turn this on for all platforms.
490 // http://code.google.com/p/chromium/issues/detail?id=60211 490 // http://code.google.com/p/chromium/issues/detail?id=60211
491 base::ThreadRestrictions::SetIOAllowed(false); 491 base::ThreadRestrictions::SetIOAllowed(false);
492 #endif 492 #endif
493 493
494 #if defined(TOOLKIT_VIEWS) 494 #if defined(TOOLKIT_VIEWS)
495 views::AcceleratorHandler accelerator_handler; 495 views::AcceleratorHandler accelerator_handler;
496 MessageLoopForUI::current()->Run(&accelerator_handler); 496 MessageLoopForUI::current()->Run(&accelerator_handler);
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 metrics->Stop(); 1572 metrics->Stop();
1573 1573
1574 // browser_shutdown takes care of deleting browser_process, so we need to 1574 // browser_shutdown takes care of deleting browser_process, so we need to
1575 // release it. 1575 // release it.
1576 ignore_result(browser_process.release()); 1576 ignore_result(browser_process.release());
1577 browser_shutdown::Shutdown(); 1577 browser_shutdown::Shutdown();
1578 1578
1579 TRACE_EVENT_END("BrowserMain", 0, 0); 1579 TRACE_EVENT_END("BrowserMain", 0, 0);
1580 return result_code; 1580 return result_code;
1581 } 1581 }
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