Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: chrome/browser/dom_ui/shared_resources_data_source.cc

Issue 6532069: Reland "WebUI: Move more files from chrome/browser/dom_ui to chrome/browser/webui. Part 5." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/singleton.h" 9 #include "base/singleton.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
11 #include "chrome/browser/browser_thread.h" 11 #include "chrome/browser/browser_thread.h"
12 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
13 #include "chrome/browser/io_thread.h" 12 #include "chrome/browser/io_thread.h"
13 #include "chrome/browser/webui/chrome_url_data_manager.h"
14 #include "chrome/common/url_constants.h" 14 #include "chrome/common/url_constants.h"
15 #include "grit/app_resources.h"
15 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
16 #include "grit/shared_resources.h" 17 #include "grit/shared_resources.h"
17 #include "grit/shared_resources_map.h" 18 #include "grit/shared_resources_map.h"
18 #include "grit/app_resources.h"
19 #include "grit/theme_resources.h" 19 #include "grit/theme_resources.h"
20 #include "net/base/mime_util.h" 20 #include "net/base/mime_util.h"
21 #include "ui/base/resource/resource_bundle.h" 21 #include "ui/base/resource/resource_bundle.h"
22 22
23 namespace { 23 namespace {
24 24
25 int PathToIDR(const std::string& path) { 25 int PathToIDR(const std::string& path) {
26 int idr = -1; 26 int idr = -1;
27 if (path == "app/resources/folder_closed.png") { 27 if (path == "app/resources/folder_closed.png") {
28 idr = IDR_FOLDER_CLOSED; 28 idr = IDR_FOLDER_CLOSED;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const std::string& path) const { 74 const std::string& path) const {
75 // Requests should not block on the disk! On Windows this goes to the 75 // Requests should not block on the disk! On Windows this goes to the
76 // registry. 76 // registry.
77 // http://code.google.com/p/chromium/issues/detail?id=59849 77 // http://code.google.com/p/chromium/issues/detail?id=59849
78 base::ThreadRestrictions::ScopedAllowIO allow_io; 78 base::ThreadRestrictions::ScopedAllowIO allow_io;
79 79
80 std::string mime_type; 80 std::string mime_type;
81 net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type); 81 net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type);
82 return mime_type; 82 return mime_type;
83 } 83 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/shared_resources_data_source.h ('k') | chrome/browser/dom_ui/sync_internals_html_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698