OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/shared_resources_data_source.h" | 5 #include "content/browser/webui/shared_resources_data_source.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
10 #include "content/public/common/content_client.h" | 10 #include "content/public/common/content_client.h" |
11 #include "content/public/common/url_constants.h" | 11 #include "content/public/common/url_constants.h" |
12 #include "grit/webui_resources_map.h" | 12 #include "grit/webui_resources_map.h" |
13 #include "net/base/mime_util.h" | 13 #include "net/base/mime_util.h" |
14 | 14 |
15 namespace { | 15 namespace { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 std::string SharedResourcesDataSource::GetMimeType( | 53 std::string SharedResourcesDataSource::GetMimeType( |
54 const std::string& path) const { | 54 const std::string& path) const { |
55 // Requests should not block on the disk! On POSIX this goes to disk. | 55 // Requests should not block on the disk! On POSIX this goes to disk. |
56 // http://code.google.com/p/chromium/issues/detail?id=59849 | 56 // http://code.google.com/p/chromium/issues/detail?id=59849 |
57 | 57 |
58 base::ThreadRestrictions::ScopedAllowIO allow_io; | 58 base::ThreadRestrictions::ScopedAllowIO allow_io; |
59 std::string mime_type; | 59 std::string mime_type; |
60 net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type); | 60 net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type); |
61 return mime_type; | 61 return mime_type; |
62 } | 62 } |
OLD | NEW |