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

Unified Diff: chrome/browser/policy/configuration_policy_provider_win.cc

Issue 5762002: Policy refresh hits the registry (an I/O operation) on the main thread.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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/policy/configuration_policy_provider_win.cc
===================================================================
--- chrome/browser/policy/configuration_policy_provider_win.cc (revision 68854)
+++ chrome/browser/policy/configuration_policy_provider_win.cc (working copy)
@@ -15,6 +15,7 @@
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
+#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "base/win/registry.h"
@@ -241,6 +242,10 @@
bool ConfigurationPolicyProviderWin::Provide(
ConfigurationPolicyStoreInterface* store) {
+ // This function calls GetRegistryPolicy* which hit up the registry. Those
+ // are I/O functions not allowed to be called on the main thread.
+ // http://crbug.com/66453
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
danno 2010/12/10 22:19:56 I don't think this is needed. Provide only gets ca
const PolicyDefinitionList* policy_list(policy_definition_list());
for (const PolicyDefinitionList::Entry* current = policy_list->begin;
current != policy_list->end; ++current) {
« 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