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

Unified Diff: chrome/browser/chromeos/login/login_utils.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: remove UI thread restriction, nits 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 65e4214925e2ff1a609eee91de842d51a6a70372..42a03ed64495fcffd9929f922dcfc117231627ed 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -15,6 +15,7 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/synchronization/lock.h"
+#include "base/threading/thread_restrictions.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
@@ -221,9 +222,15 @@ void LoginUtilsImpl::CompleteLogin(
logging::RedirectChromeLogging(*(CommandLine::ForCurrentProcess()));
btl->AddLoginTimeMarker("LoggingRedirected", false);
- // The default profile will have been changed because the ProfileManager
- // will process the notification that the UserManager sends out.
- Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
+ Profile* profile = NULL;
+ {
+ // Loading user profile causes us to do blocking IO on UI thread.
+ // Temporarily allow it until we fix http://crosbug.com/11104
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ // The default profile will have been changed because the ProfileManager
+ // will process the notification that the UserManager sends out.
+ profile = profile_manager->GetDefaultProfile(user_data_dir);
+ }
btl->AddLoginTimeMarker("UserProfileGotten", false);
// Change the proxy configuration service of the default request context to
« no previous file with comments | « chrome/browser/chromeos/login/language_switch_menu.cc ('k') | chrome/browser/chromeos/login/ownership_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698