| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/net/net_error_helper.h" | 5 #include "chrome/renderer/net/net_error_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 error.unreachableURL, | 223 error.unreachableURL, |
| 224 is_failed_post, | 224 is_failed_post, |
| 225 error.staleCopyInCache, | 225 error.staleCopyInCache, |
| 226 RenderThread::Get()->GetLocale(), | 226 RenderThread::Get()->GetLocale(), |
| 227 render_frame()->GetRenderView()-> | 227 render_frame()->GetRenderView()-> |
| 228 GetAcceptLanguages(), | 228 GetAcceptLanguages(), |
| 229 scoped_ptr<ErrorPageParams>(), | 229 scoped_ptr<ErrorPageParams>(), |
| 230 &error_strings); | 230 &error_strings); |
| 231 | 231 |
| 232 std::string json; | 232 std::string json; |
| 233 JSONWriter::Write(&error_strings, &json); | 233 JSONWriter::Write(error_strings, &json); |
| 234 | 234 |
| 235 std::string js = "if (window.updateForDnsProbe) " | 235 std::string js = "if (window.updateForDnsProbe) " |
| 236 "updateForDnsProbe(" + json + ");"; | 236 "updateForDnsProbe(" + json + ");"; |
| 237 base::string16 js16; | 237 base::string16 js16; |
| 238 if (!base::UTF8ToUTF16(js.c_str(), js.length(), &js16)) { | 238 if (!base::UTF8ToUTF16(js.c_str(), js.length(), &js16)) { |
| 239 NOTREACHED(); | 239 NOTREACHED(); |
| 240 return; | 240 return; |
| 241 } | 241 } |
| 242 | 242 |
| 243 render_frame()->ExecuteJavaScript(js16); | 243 render_frame()->ExecuteJavaScript(js16); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 success ? data : "", | 342 success ? data : "", |
| 343 render_frame()->GetRenderView()->GetAcceptLanguages(), | 343 render_frame()->GetRenderView()->GetAcceptLanguages(), |
| 344 base::i18n::IsRTL()); | 344 base::i18n::IsRTL()); |
| 345 } | 345 } |
| 346 | 346 |
| 347 void NetErrorHelper::OnTrackingRequestComplete( | 347 void NetErrorHelper::OnTrackingRequestComplete( |
| 348 const blink::WebURLResponse& response, | 348 const blink::WebURLResponse& response, |
| 349 const std::string& data) { | 349 const std::string& data) { |
| 350 tracking_fetcher_.reset(); | 350 tracking_fetcher_.reset(); |
| 351 } | 351 } |
| OLD | NEW |