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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 138513002: Plumb network stack information about existence of cached copy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 // error messages? 971 // error messages?
972 resource_id = IDR_ERROR_APP_HTML; 972 resource_id = IDR_ERROR_APP_HTML;
973 } else { 973 } else {
974 const std::string locale = RenderThread::Get()->GetLocale(); 974 const std::string locale = RenderThread::Get()->GetLocale();
975 if (!NetErrorHelper::GetErrorStringsForDnsProbe( 975 if (!NetErrorHelper::GetErrorStringsForDnsProbe(
976 frame, error, is_post, locale, accept_languages, 976 frame, error, is_post, locale, accept_languages,
977 &error_strings)) { 977 &error_strings)) {
978 // In most cases, the NetErrorHelper won't provide DNS-probe-specific 978 // In most cases, the NetErrorHelper won't provide DNS-probe-specific
979 // error pages, so fall back to LocalizedError. 979 // error pages, so fall back to LocalizedError.
980 LocalizedError::GetStrings(error.reason, error.domain.utf8(), 980 LocalizedError::GetStrings(error.reason, error.domain.utf8(),
981 error.unreachableURL, is_post, locale, 981 error.unreachableURL, is_post,
982 error.staleCopyInCache, locale,
982 accept_languages, &error_strings); 983 accept_languages, &error_strings);
983 } 984 }
984 resource_id = IDR_NET_ERROR_HTML; 985 resource_id = IDR_NET_ERROR_HTML;
985 } 986 }
986 987
987 const base::StringPiece template_html( 988 const base::StringPiece template_html(
988 ResourceBundle::GetSharedInstance().GetRawDataResource( 989 ResourceBundle::GetSharedInstance().GetRawDataResource(
989 resource_id)); 990 resource_id));
990 if (template_html.empty()) { 991 if (template_html.empty()) {
991 NOTREACHED() << "unable to load template. ID: " << resource_id; 992 NOTREACHED() << "unable to load template. ID: " << resource_id;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1383 CommandLine* command_line = CommandLine::ForCurrentProcess();
1383 return !command_line->HasSwitch(switches::kExtensionProcess); 1384 return !command_line->HasSwitch(switches::kExtensionProcess);
1384 } 1385 }
1385 1386
1386 blink::WebWorkerPermissionClientProxy* 1387 blink::WebWorkerPermissionClientProxy*
1387 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1388 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1388 content::RenderFrame* render_frame, 1389 content::RenderFrame* render_frame,
1389 blink::WebFrame* frame) { 1390 blink::WebFrame* frame) {
1390 return new WorkerPermissionClientProxy(render_frame, frame); 1391 return new WorkerPermissionClientProxy(render_frame, frame);
1391 } 1392 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698