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

Side by Side Diff: net/url_request/url_request_view_net_internal_job.cc

Issue 192057: Use "GURL::possibly_invalid_spec()" rather than "GURL::spec()", in case the G... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Make unittest better Created 11 years, 3 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
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <sstream> 5 #include <sstream>
6 6
7 #include "net/url_request/url_request_view_net_internal_job.h" 7 #include "net/url_request/url_request_view_net_internal_job.h"
8 8
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 AddSubSection(new HostResolverCacheSubSection(this)); 268 AddSubSection(new HostResolverCacheSubSection(this));
269 } 269 }
270 }; 270 };
271 271
272 // Helper for the URLRequest "outstanding" and "live" sections. 272 // Helper for the URLRequest "outstanding" and "live" sections.
273 void OutputURLAndLoadLog(const GURL& url, 273 void OutputURLAndLoadLog(const GURL& url,
274 const net::LoadLog* log, 274 const net::LoadLog* log,
275 std::string* out) { 275 std::string* out) {
276 out->append("<li>"); 276 out->append("<li>");
277 out->append("<nobr>"); 277 out->append("<nobr>");
278 out->append(EscapeForHTML(url.spec())); 278 out->append(EscapeForHTML(url.possibly_invalid_spec()));
279 out->append("</nobr>"); 279 out->append("</nobr>");
280 if (log) 280 if (log)
281 OutputTextInPre(net::LoadLogUtil::PrettyPrintAsEventTree(log), out); 281 OutputTextInPre(net::LoadLogUtil::PrettyPrintAsEventTree(log), out);
282 out->append("</li>"); 282 out->append("</li>");
283 } 283 }
284 284
285 class URLRequestLiveSubSection : public SubSection { 285 class URLRequestLiveSubSection : public SubSection {
286 public: 286 public:
287 URLRequestLiveSubSection(SubSection* parent) 287 URLRequestLiveSubSection(SubSection* parent)
288 : SubSection(parent, "outstanding", "Outstanding requests") { 288 : SubSection(parent, "outstanding", "Outstanding requests") {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 data->append("<i>Nothing found for \""); 393 data->append("<i>Nothing found for \"");
394 data->append(EscapeForHTML(path)); 394 data->append(EscapeForHTML(path));
395 data->append("\"</i>"); 395 data->append("\"</i>");
396 } 396 }
397 397
398 data->append("</body></html>"); 398 data->append("</body></html>");
399 399
400 return true; 400 return true;
401 } 401 }
402 402
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698