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

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

Issue 3814013: FBTF: Monster ctor patch after changing heuristics in clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: More add file fail Created 10 years, 2 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') | net/url_request/view_cache_helper.h » ('j') | 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 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 10
11 using base::TimeDelta; 11 using base::TimeDelta;
12 12
13 URLRequestJobMetrics::URLRequestJobMetrics()
14 : total_bytes_read_(0),
15 number_of_read_IO_(0),
16 success_(false) {
17 }
18
19 URLRequestJobMetrics::~URLRequestJobMetrics() {}
20
13 void URLRequestJobMetrics::AppendText(std::wstring* text) { 21 void URLRequestJobMetrics::AppendText(std::wstring* text) {
14 if (!text) 22 if (!text)
15 return; 23 return;
16 24
17 text->append(L"job url = "); 25 text->append(L"job url = ");
18 text->append(UTF8ToWide(original_url_->spec())); 26 text->append(UTF8ToWide(original_url_->spec()));
19 27
20 if (url_.get()) { 28 if (url_.get()) {
21 text->append(L"; redirected url = "); 29 text->append(L"; redirected url = ");
22 text->append(UTF8ToWide(url_->spec())); 30 text->append(UTF8ToWide(url_->spec()));
23 } 31 }
24 32
25 TimeDelta elapsed = end_time_ - start_time_; 33 TimeDelta elapsed = end_time_ - start_time_;
26 StringAppendF(text, 34 StringAppendF(text,
27 L"; total bytes read = %ld; read calls = %d; time = %lld ms;", 35 L"; total bytes read = %ld; read calls = %d; time = %lld ms;",
28 static_cast<long>(total_bytes_read_), 36 static_cast<long>(total_bytes_read_),
29 number_of_read_IO_, elapsed.InMilliseconds()); 37 number_of_read_IO_, elapsed.InMilliseconds());
30 38
31 if (success_) { 39 if (success_) {
32 text->append(L" success."); 40 text->append(L" success.");
33 } else { 41 } else {
34 text->append(L" fail."); 42 text->append(L" fail.");
35 } 43 }
36 } 44 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_job_metrics.h ('k') | net/url_request/view_cache_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698