diff options
author | Kristian Monsen <kristianm@google.com> | 2011-05-31 20:30:28 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-06-14 20:31:41 -0700 |
commit | 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801 (patch) | |
tree | 382278a54ce7a744d62fa510a9a80688cc12434b /base/mime_util_xdg.cc | |
parent | c4becdd46e31d261b930e4b5a539cbc1d45c23a6 (diff) | |
download | external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.zip external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.gz external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.bz2 |
Merge Chromium.org at r11.0.672.0: Initial merge by git.
Change-Id: I8b4aaf611a2a405fe3fe10e8a94ea7658645c192
Diffstat (limited to 'base/mime_util_xdg.cc')
-rw-r--r-- | base/mime_util_xdg.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/mime_util_xdg.cc b/base/mime_util_xdg.cc index 8be1d0d..5215d01 100644 --- a/base/mime_util_xdg.cc +++ b/base/mime_util_xdg.cc @@ -21,6 +21,7 @@ #include "base/string_split.h" #include "base/string_util.h" #include "base/third_party/xdg_mime/xdgmime.h" +#include "base/threading/thread_restrictions.h" namespace { @@ -155,6 +156,7 @@ class IconTheme { IconTheme::IconTheme(const std::string& name) : index_theme_loaded_(false), info_array_(NULL) { + base::ThreadRestrictions::AssertIOAllowed(); // Iterate on all icon directories to find directories of the specified // theme and load the first encountered index.theme. std::map<FilePath, int>::iterator iter; @@ -550,10 +552,12 @@ MimeUtilConstants::~MimeUtilConstants() { namespace mime_util { std::string GetFileMimeType(const FilePath& filepath) { + base::ThreadRestrictions::AssertIOAllowed(); return xdg_mime_get_mime_type_from_file_name(filepath.value().c_str()); } std::string GetDataMimeType(const std::string& data) { + base::ThreadRestrictions::AssertIOAllowed(); return xdg_mime_get_mime_type_for_data(data.data(), data.length(), NULL); } @@ -576,6 +580,7 @@ void DetectGtkTheme() { } FilePath GetMimeIcon(const std::string& mime_type, size_t size) { + base::ThreadRestrictions::AssertIOAllowed(); std::vector<std::string> icon_names; std::string icon_name; FilePath icon_file; |