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

Side by Side Diff: chrome/browser/ui/webui/shared_resources_data_source.cc

Issue 10756018: Merge grd files in ui/resources and chrome/app/theme (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, *_standard.rc Created 8 years, 5 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
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | chrome/browser/ui/webui/theme_source_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/ui/webui/shared_resources_data_source.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
11 #include "base/threading/thread_restrictions.h" 11 #include "base/threading/thread_restrictions.h"
12 #include "chrome/browser/io_thread.h" 12 #include "chrome/browser/io_thread.h"
13 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 13 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
14 #include "chrome/common/url_constants.h" 14 #include "chrome/common/url_constants.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "grit/shared_resources.h" 16 #include "grit/shared_resources.h"
17 #include "grit/shared_resources_map.h" 17 #include "grit/shared_resources_map.h"
18 #include "grit/theme_resources.h" 18 #include "grit/theme_resources.h"
19 #include "grit/ui_resources.h" 19 #include "grit/ui_resources.h"
20 #include "grit/ui_resources_standard.h"
21 #include "net/base/mime_util.h" 20 #include "net/base/mime_util.h"
22 #include "ui/base/layout.h" 21 #include "ui/base/layout.h"
23 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
24 23
25 namespace { 24 namespace {
26 25
27 int PathToIDR(const std::string& path) { 26 int PathToIDR(const std::string& path) {
28 // The name of the files in the grd list are prefixed with the following 27 // The name of the files in the grd list are prefixed with the following
29 // directory: 28 // directory:
30 std::string key("shared/"); 29 std::string key("shared/");
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const std::string& path) const { 65 const std::string& path) const {
67 // Requests should not block on the disk! On Windows this goes to the 66 // Requests should not block on the disk! On Windows this goes to the
68 // registry. 67 // registry.
69 // http://code.google.com/p/chromium/issues/detail?id=59849 68 // http://code.google.com/p/chromium/issues/detail?id=59849
70 base::ThreadRestrictions::ScopedAllowIO allow_io; 69 base::ThreadRestrictions::ScopedAllowIO allow_io;
71 70
72 std::string mime_type; 71 std::string mime_type;
73 net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type); 72 net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type);
74 return mime_type; 73 return mime_type;
75 } 74 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | chrome/browser/ui/webui/theme_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698