renderer: generate net error strings when requested

This commit is contained in:
deepak1556 2016-05-21 10:21:15 +05:30
parent 8821cae34f
commit c9b314d43c
3 changed files with 20 additions and 0 deletions

View file

@ -18,6 +18,7 @@
#include "atom/renderer/guest_view_container.h"
#include "atom/renderer/node_array_buffer_bridge.h"
#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/renderer/media/chrome_key_systems.h"
#include "chrome/renderer/pepper/pepper_helper.h"
#include "chrome/renderer/printing/print_web_view_helper.h"
@ -28,6 +29,7 @@
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "ipc/ipc_message_macros.h"
#include "net/base/net_errors.h"
#include "third_party/WebKit/public/web/WebCustomElement.h"
#include "third_party/WebKit/public/web/WebFrameWidget.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@ -252,4 +254,16 @@ void AtomRendererClient::AddKeySystems(
AddChromeKeySystems(key_systems);
}
void AtomRendererClient::GetNavigationErrorStrings(
content::RenderFrame* render_frame,
const blink::WebURLRequest& failed_request,
const blink::WebURLError& error,
std::string* error_html,
base::string16* error_description) {
if (!error_description)
return;
*error_description = base::UTF8ToUTF16(net::ErrorToShortString(error.reason));
}
} // namespace atom