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

Unified Diff: net/disk_cache/entry_impl.cc

Issue 650068: Disk cache: Use TimeTicks instead of Time for some of the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/entry_impl.h ('k') | net/disk_cache/eviction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_impl.cc
===================================================================
--- net/disk_cache/entry_impl.cc (revision 39154)
+++ net/disk_cache/entry_impl.cc (working copy)
@@ -17,6 +17,7 @@
using base::Time;
using base::TimeDelta;
+using base::TimeTicks;
namespace {
@@ -29,7 +30,8 @@
public:
SyncCallback(disk_cache::EntryImpl* entry, net::IOBuffer* buffer,
net::CompletionCallback* callback )
- : entry_(entry), callback_(callback), buf_(buffer), start_(Time::Now()) {
+ : entry_(entry), callback_(callback), buf_(buffer),
+ start_(TimeTicks::Now()) {
entry->AddRef();
entry->IncrementIoCount();
}
@@ -41,7 +43,7 @@
disk_cache::EntryImpl* entry_;
net::CompletionCallback* callback_;
scoped_refptr<net::IOBuffer> buf_;
- Time start_;
+ TimeTicks start_;
DISALLOW_EVIL_CONSTRUCTORS(SyncCallback);
};
@@ -199,7 +201,7 @@
if (buf_len < 0)
return net::ERR_INVALID_ARGUMENT;
- Time start = Time::Now();
+ TimeTicks start = TimeTicks::Now();
if (offset + buf_len > entry_size)
buf_len = entry_size - offset;
@@ -270,7 +272,7 @@
return net::ERR_FAILED;
}
- Time start = Time::Now();
+ TimeTicks start = TimeTicks::Now();
// Read the size at this point (it may change inside prepare).
int entry_size = entry_.Data()->data_size[index];
@@ -355,7 +357,7 @@
if (net::OK != result)
return result;
- Time start = Time::Now();
+ TimeTicks start = TimeTicks::Now();
result = sparse_->StartIO(SparseControl::kReadOperation, offset, buf, buf_len,
completion_callback);
ReportIOTime(kSparseRead, start);
@@ -369,7 +371,7 @@
if (net::OK != result)
return result;
- Time start = Time::Now();
+ TimeTicks start = TimeTicks::Now();
result = sparse_->StartIO(SparseControl::kWriteOperation, offset, buf,
buf_len, completion_callback);
ReportIOTime(kSparseWrite, start);
@@ -596,7 +598,7 @@
node_.set_modified();
}
-void EntryImpl::ReportIOTime(Operation op, const base::Time& start) {
+void EntryImpl::ReportIOTime(Operation op, const base::TimeTicks& start) {
int group = backend_->GetSizeGroup();
switch (op) {
case kRead:
« no previous file with comments | « net/disk_cache/entry_impl.h ('k') | net/disk_cache/eviction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698