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

Unified Diff: chrome/browser/themes/browser_theme_pack.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 | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/common/chrome_version_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/browser_theme_pack.cc
===================================================================
--- chrome/browser/themes/browser_theme_pack.cc (revision 64981)
+++ chrome/browser/themes/browser_theme_pack.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/data_pack.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
+#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_thread.h"
@@ -842,6 +843,10 @@
bool BrowserThemePack::LoadRawBitmapsTo(
const FilePathMap& file_paths,
ImageCache* raw_bitmaps) {
+ // Themes should be loaded on the file thread, not the UI thread.
+ // http://crbug.com/61838
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
for (FilePathMap::const_iterator it = file_paths.begin();
it != file_paths.end(); ++it) {
scoped_refptr<RefCountedMemory> raw_data(ReadFileData(it->second));
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/common/chrome_version_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698