Index: chrome/common/localized_error.cc |
=================================================================== |
--- chrome/common/localized_error.cc (revision 194125) |
+++ chrome/common/localized_error.cc (working copy) |
@@ -4,6 +4,7 @@ |
#include "chrome/common/localized_error.h" |
+#include "base/base64.h" |
#include "base/i18n/rtl.h" |
#include "base/logging.h" |
#include "base/string16.h" |
@@ -18,10 +19,12 @@ |
#include "googleurl/src/gurl.h" |
#include "grit/chromium_strings.h" |
#include "grit/generated_resources.h" |
+#include "grit/theme_resources.h" |
#include "net/base/escape.h" |
#include "net/base/net_errors.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" |
#include "ui/base/l10n/l10n_util.h" |
+#include "ui/base/resource/resource_bundle.h" |
#include "ui/webui/web_ui_util.h" |
#include "webkit/glue/webkit_glue.h" |
@@ -651,6 +654,16 @@ |
} |
error_strings->Set("suggestions", suggestions); |
+ |
+ std::string resource_base64; |
+ if (base::Base64Encode( |
+ ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( |
+ IDR_ERROR_NETWORK_GENERIC, ui::GetMaxScaleFactor()), |
Nico
2013/04/16 23:15:11
This is not correct. This needs to be a -webkit-im
mmenke
2013/04/16 23:23:02
This is run in a generic renderer process, and doe
mmenke
2013/04/16 23:27:18
Sorry...Just skimmed your response. I'll go ahead
mmenke
2013/04/16 23:57:30
I've embedded the images.
|
+ &resource_base64)) { |
+ base::StringValue* data_url = |
+ new base::StringValue("data:image/png;base64," + resource_base64); |
+ error_strings->Set("image", data_url); |
+ } |
} |
string16 LocalizedError::GetErrorDetails(const WebKit::WebURLError& error) { |