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

Unified Diff: chrome/browser/browser.cc

Issue 4146004: ThreadRestrictions: disallow blocking IO on the UI thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 187cd0fe8be81b463d81fe1b8042d9a36c832727..667e2d948b8e955ab8303b24f51cfd5a80180ff2 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -21,6 +21,7 @@
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/thread.h"
+#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "gfx/point.h"
#include "chrome/app/chrome_dll_resource.h"
@@ -2336,6 +2337,11 @@ GURL Browser::GetHomePage() const {
// --homepage overrides any preferences.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kHomePage)) {
+ // TODO(evanm): clean up usage of DIR_CURRENT.
+ // http://code.google.com/p/chromium/issues/detail?id=60630
+ // For now, allow this code to call getcwd().
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
FilePath browser_directory;
PathService::Get(base::DIR_CURRENT, &browser_directory);
GURL home_page(URLFixerUpper::FixupRelativeFile(browser_directory,
« base/nss_util.cc ('K') | « base/nss_util.cc ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698