blob: eea21fa4813468561b7997d4f410069ce34bd6e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/url_request/url_request_job_metrics.h"
#include "base/basictypes.h"
#include "base/string_util.h"
using base::TimeDelta;
void URLRequestJobMetrics::AppendText(std::wstring* text) {
if (!text)
return;
text->append(L"job url = ");
text->append(UTF8ToWide(original_url_->spec()));
if (url_.get()) {
text->append(L"; redirected url = ");
text->append(UTF8ToWide(url_->spec()));
}
TimeDelta elapsed = end_time_ - start_time_;
StringAppendF(text,
L"; total bytes read = %ld; read calls = %d; time = %lld ms;",
static_cast<long>(total_bytes_read_),
number_of_read_IO_, elapsed.InMilliseconds());
if (success_) {
text->append(L" success.");
} else {
text->append(L" fail.");
}
}
|