OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/dom_ui/shared_resources_data_source.h" | 5 #include "chrome/browser/dom_ui/shared_resources_data_source.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
11 #include "base/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
12 #include "chrome/browser/browser_thread.h" | 12 #include "chrome/browser/browser_thread.h" |
13 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 13 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
14 #include "chrome/browser/io_thread.h" | 14 #include "chrome/browser/io_thread.h" |
15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 #include "grit/shared_resources.h" | 17 #include "grit/shared_resources.h" |
18 #include "grit/shared_resources_map.h" | 18 #include "grit/shared_resources_map.h" |
19 #include "grit/app_resources.h" | 19 #include "grit/app_resources.h" |
20 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
21 #include "net/base/mime_util.h" | 21 #include "net/base/mime_util.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 const std::string& path) const { | 83 const std::string& path) const { |
84 // Requests should not block on the disk! On Windows this goes to the | 84 // Requests should not block on the disk! On Windows this goes to the |
85 // registry. | 85 // registry. |
86 // http://code.google.com/p/chromium/issues/detail?id=59849 | 86 // http://code.google.com/p/chromium/issues/detail?id=59849 |
87 base::ThreadRestrictions::ScopedAllowIO allow_io; | 87 base::ThreadRestrictions::ScopedAllowIO allow_io; |
88 | 88 |
89 std::string mime_type; | 89 std::string mime_type; |
90 net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type); | 90 net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type); |
91 return mime_type; | 91 return mime_type; |
92 } | 92 } |
OLD | NEW |