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

Unified Diff: base/win_util.cc

Issue 4222005: Turn on file access checks on Win. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Second try 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/registry.cc ('k') | chrome/browser/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win_util.cc
===================================================================
--- base/win_util.cc (revision 64981)
+++ base/win_util.cc (working copy)
@@ -17,6 +17,7 @@
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/thread_restrictions.h"
#include "base/win/windows_version.h"
namespace win_util {
@@ -127,6 +128,11 @@
}
bool UserAccountControlIsEnabled() {
+ // This can be slow if Windows ends up going to disk. Should watch this key
+ // for changes and only read it once, preferably on the file thread.
+ // http://code.google.com/p/chromium/issues/detail?id=61644
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
base::win::RegKey key(HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",
KEY_READ);
« no previous file with comments | « base/win/registry.cc ('k') | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698