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

Side by Side Diff: content/browser/webui/shared_resources_data_source.cc

Issue 530623002: Use qualified path for three more grit headers from ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ui_resources too Created 6 years, 3 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
« no previous file with comments | « content/DEPS ('k') | content/common/cursors/DEPS » ('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 "content/browser/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/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
11 #include "content/public/common/content_client.h" 11 #include "content/public/common/content_client.h"
12 #include "content/public/common/url_constants.h" 12 #include "content/public/common/url_constants.h"
13 #include "grit/webui_resources_map.h"
14 #include "net/base/mime_util.h" 13 #include "net/base/mime_util.h"
14 #include "ui/resources/grit/webui_resources_map.h"
15 15
16 namespace { 16 namespace {
17 17
18 const char kAppImagesPath[] = "images/apps/"; 18 const char kAppImagesPath[] = "images/apps/";
19 const char kAppImagesPath2x[] = "images/2x/apps/"; 19 const char kAppImagesPath2x[] = "images/2x/apps/";
20 20
21 const char kReplacement[] = "../../resources/default_100_percent/common/"; 21 const char kReplacement[] = "../../resources/default_100_percent/common/";
22 const char kReplacement2x[] = "../../resources/default_200_percent/common/"; 22 const char kReplacement2x[] = "../../resources/default_200_percent/common/";
23 23
24 // This entire method is a hack introduced to be able to handle apps images 24 // This entire method is a hack introduced to be able to handle apps images
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 std::string SharedResourcesDataSource::GetMimeType( 82 std::string SharedResourcesDataSource::GetMimeType(
83 const std::string& path) const { 83 const std::string& path) const {
84 // Requests should not block on the disk! On POSIX this goes to disk. 84 // Requests should not block on the disk! On POSIX this goes to disk.
85 // http://code.google.com/p/chromium/issues/detail?id=59849 85 // http://code.google.com/p/chromium/issues/detail?id=59849
86 86
87 base::ThreadRestrictions::ScopedAllowIO allow_io; 87 base::ThreadRestrictions::ScopedAllowIO allow_io;
88 std::string mime_type; 88 std::string mime_type;
89 net::GetMimeTypeFromFile(base::FilePath().AppendASCII(path), &mime_type); 89 net::GetMimeTypeFromFile(base::FilePath().AppendASCII(path), &mime_type);
90 return mime_type; 90 return mime_type;
91 } 91 }
OLDNEW
« no previous file with comments | « content/DEPS ('k') | content/common/cursors/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698