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

Unified Diff: content/browser/webui/web_ui_data_source_impl.cc

Issue 2311223003: [chromecast] Add ResourceBundle::LoadLocalizedResourceBytes(). (Closed)
Patch Set: [chromecast] Add ResourceBundle::LoadLocalizedResourceBytes() to to get binary data from locale_res… Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/common/cast_content_client.cc ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_data_source_impl.cc
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index 0b07bddf0043f85ecc50e78ef55699b85ba00dae..80a7e1a19d5a90bd9135aea9cbd574e156d73614 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -252,7 +252,8 @@ void WebUIDataSourceImpl::StartDataRequest(
// TODO(dschuyler): improve filtering of which resource to run template
// expansion upon. TODO(dbeam): make a streaming filter that works on gzipped
// content.
- if (GetMimeType(path) == "text/html" && !source()->IsGzipped(path)) {
+ if (response.get() && GetMimeType(path) == "text/html" &&
+ !source()->IsGzipped(path)) {
std::string replaced = ui::ReplaceTemplateExpressions(
base::StringPiece(response->front_as<char>(), response->size()),
replacements_);
« no previous file with comments | « chromecast/common/cast_content_client.cc ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698