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

Unified Diff: chrome/browser/chromeos/login/signed_settings.cc

Issue 6520005: [cros] Temporary whitelist disk I/O on UIThread while store/retrieve signed setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/signed_settings.cc
diff --git a/chrome/browser/chromeos/login/signed_settings.cc b/chrome/browser/chromeos/login/signed_settings.cc
index 58bce4bc0d401fb8a25d7792fa3e3289ae44bd76..074d4ad3367a59b9270838b79225632320b78b2f 100644
--- a/chrome/browser/chromeos/login/signed_settings.cc
+++ b/chrome/browser/chromeos/login/signed_settings.cc
@@ -9,6 +9,7 @@
#include "base/ref_counted.h"
#include "base/stringprintf.h"
+#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
@@ -241,7 +242,14 @@ StorePropertyOp::StorePropertyOp(const std::string& name,
StorePropertyOp::~StorePropertyOp() {}
void StorePropertyOp::Execute() {
- if (!service_->IsAlreadyOwned()) {
+ bool is_owned = false;
+ {
+ // This should not do blocking IO from the UI thread.
+ // Temporarily allow it for now. http://crbug.com/70097
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ is_owned = service_->IsAlreadyOwned();
+ }
+ if (!is_owned) {
if (g_browser_process &&
g_browser_process->local_state() &&
SignedSettingsTempStorage::Store(name_, value_,
@@ -305,7 +313,14 @@ void RetrievePropertyOp::Execute() {
// device has been owned and before temp_storage settings are finally
// persisted into signed settings.
// In this lapse of time Retrieve loses access to those settings.
- if (!service_->IsAlreadyOwned()) {
+ bool is_owned = false;
+ {
+ // This should not do blocking IO from the UI thread.
+ // Temporarily allow it for now. http://crbug.com/70097
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ is_owned = service_->IsAlreadyOwned();
+ }
+ if (!is_owned) {
if (g_browser_process &&
g_browser_process->local_state() &&
SignedSettingsTempStorage::Retrieve(
« 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