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

Side by Side Diff: chrome/renderer/net/net_error_helper.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.cc ('k') | chrome/service/cloud_print/print_system_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698