| Index: base/mime_util_xdg.cc
|
| ===================================================================
|
| --- base/mime_util_xdg.cc (revision 74011)
|
| +++ base/mime_util_xdg.cc (working copy)
|
| @@ -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 @@
|
| 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 @@
|
| 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 @@
|
| }
|
|
|
| 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;
|
|
|