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

Unified Diff: chrome/browser/ui/webui/shared_resources_data_source.cc

Issue 11962043: Move webui resources from chrome\browser\resources\shared to ui\webui\resources. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/options/certificate_manager_browsertest.js ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/shared_resources_data_source.cc
===================================================================
--- chrome/browser/ui/webui/shared_resources_data_source.cc (revision 177292)
+++ chrome/browser/ui/webui/shared_resources_data_source.cc (working copy)
@@ -8,29 +8,23 @@
#include "base/memory/ref_counted_memory.h"
#include "base/memory/singleton.h"
-#include "base/threading/thread_restrictions.h"
#include "chrome/browser/io_thread.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
-#include "grit/shared_resources.h"
-#include "grit/shared_resources_map.h"
#include "grit/theme_resources.h"
#include "grit/ui_resources.h"
+#include "grit/webui_resources.h"
+#include "grit/webui_resources_map.h"
#include "net/base/mime_util.h"
#include "ui/base/resource/resource_bundle.h"
namespace {
int PathToIDR(const std::string& path) {
- // The name of the files in the grd list are prefixed with the following
- // directory:
- std::string key("shared/");
- key += path;
-
int idr = -1;
- for (size_t i = 0; i < kSharedResourcesSize; ++i) {
- if (kSharedResources[i].name == key) {
- idr = kSharedResources[i].value;
+ for (size_t i = 0; i < kWebuiResourcesSize; ++i) {
+ if (kWebuiResources[i].name == path) {
+ idr = kWebuiResources[i].value;
break;
}
}
@@ -65,11 +59,6 @@
std::string SharedResourcesDataSource::GetMimeType(
const std::string& path) const {
- // Requests should not block on the disk! On Windows this goes to the
- // registry.
- // http://code.google.com/p/chromium/issues/detail?id=59849
- base::ThreadRestrictions::ScopedAllowIO allow_io;
-
std::string mime_type;
net::GetMimeTypeFromFile(FilePath().AppendASCII(path), &mime_type);
return mime_type;
« no previous file with comments | « chrome/browser/ui/webui/options/certificate_manager_browsertest.js ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698