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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 664553007: Cleanup: Put more chrome/ code behind ENABLE_EXTENSIONS ifdefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: fix android Created 6 years, 2 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/common/localized_error.cc ('k') | chrome/renderer/chrome_mock_render_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index fb789a203789bfd0146a5353260ceac8c2d630fc..baf68d88631f6f9776c7b81e7efb2ad8e5f6c51b 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1108,8 +1108,13 @@ void ChromeContentRendererClient::GetNavigationErrorStrings(
bool is_post = EqualsASCII(failed_request.httpMethod(), "POST");
if (error_html) {
+ bool extension_but_not_bookmark_app = false;
+#if defined(ENABLE_EXTENSIONS)
+ extension_but_not_bookmark_app = extension && !extension->from_bookmark();
+#endif
// Use a local error page.
- if (extension && !extension->from_bookmark()) {
+ if (extension_but_not_bookmark_app) {
+#if defined(ENABLE_EXTENSIONS)
// TODO(erikkay): Should we use a different template for different
// error messages?
int resource_id = IDR_ERROR_APP_HTML;
@@ -1126,6 +1131,7 @@ void ChromeContentRendererClient::GetNavigationErrorStrings(
*error_html = webui::GetTemplatesHtml(template_html, &error_strings,
"t");
}
+#endif
} else {
// TODO(ellyjones): change GetNavigationErrorStrings to take a RenderFrame
// instead of a RenderView, then pass that in.
« no previous file with comments | « chrome/common/localized_error.cc ('k') | chrome/renderer/chrome_mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698