summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/mime_util_xdg.cc5
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;