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

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

Issue 40319: Use filter context to track stats better in SDCH filtering (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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_job_metrics.h ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "net/url_request/url_request_job_metrics.h" 5 #include "net/url_request/url_request_job_metrics.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 9
10 using base::TimeDelta; 10 using base::TimeDelta;
11 11
12 void URLRequestJobMetrics::AppendText(std::wstring* text) { 12 void URLRequestJobMetrics::AppendText(std::wstring* text) {
13 if (!text) 13 if (!text)
14 return; 14 return;
15 15
16 text->append(L"job url = "); 16 text->append(L"job url = ");
17 text->append(UTF8ToWide(original_url_->spec())); 17 text->append(UTF8ToWide(original_url_->spec()));
18 18
19 if (url_.get()) { 19 if (url_.get()) {
20 text->append(L"; redirected url = "); 20 text->append(L"; redirected url = ");
21 text->append(UTF8ToWide(url_->spec())); 21 text->append(UTF8ToWide(url_->spec()));
22 } 22 }
23 23
24 TimeDelta elapsed = end_time_ - start_time_; 24 TimeDelta elapsed = end_time_ - start_time_;
25 StringAppendF(text, 25 StringAppendF(text,
26 L"; total bytes read = %d; read calls = %d; time = %lld ms;", 26 L"; total bytes read = %ld; read calls = %d; time = %lld ms;",
27 total_bytes_read_, number_of_read_IO_, elapsed.InMilliseconds()); 27 static_cast<long>(total_bytes_read_),
28 number_of_read_IO_, elapsed.InMilliseconds());
28 29
29 if (success_) { 30 if (success_) {
30 text->append(L" success."); 31 text->append(L" success.");
31 } else { 32 } else {
32 text->append(L" fail."); 33 text->append(L" fail.");
33 } 34 }
34 } 35 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_job_metrics.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698