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

Unified Diff: net/http/disk_cache_based_quic_server_info.cc

Issue 773373002: Update from https://crrev.com/306706 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/base/mime_util_unittest.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/disk_cache_based_quic_server_info.cc
diff --git a/net/http/disk_cache_based_quic_server_info.cc b/net/http/disk_cache_based_quic_server_info.cc
index ab34bbe9e1030db61a441ecd7e3c3bfd98e3558f..fd3a6fa5dff4d945a1fd9132da8ad94fe3fe4b4c 100644
--- a/net/http/disk_cache_based_quic_server_info.cc
+++ b/net/http/disk_cache_based_quic_server_info.cc
@@ -138,6 +138,11 @@ void DiskCacheBasedQuicServerInfo::Persist() {
}
void DiskCacheBasedQuicServerInfo::PersistInternal() {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::PersistInternal"));
+
DCHECK(CalledOnValidThread());
DCHECK_NE(GET_BACKEND, state_);
DCHECK(new_data_.empty());
@@ -255,6 +260,11 @@ int DiskCacheBasedQuicServerInfo::DoLoop(int rv) {
}
int DiskCacheBasedQuicServerInfo::DoGetBackendComplete(int rv) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoGetBackendComplete"));
+
if (rv == OK) {
backend_ = data_shim_->backend;
state_ = OPEN;
@@ -266,6 +276,11 @@ int DiskCacheBasedQuicServerInfo::DoGetBackendComplete(int rv) {
}
int DiskCacheBasedQuicServerInfo::DoOpenComplete(int rv) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoOpenComplete"));
+
if (rv == OK) {
entry_ = data_shim_->entry;
state_ = READ;
@@ -279,6 +294,11 @@ int DiskCacheBasedQuicServerInfo::DoOpenComplete(int rv) {
}
int DiskCacheBasedQuicServerInfo::DoReadComplete(int rv) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoReadComplete"));
+
if (rv > 0)
data_.assign(read_buffer_->data(), rv);
else if (rv < 0)
@@ -289,6 +309,11 @@ int DiskCacheBasedQuicServerInfo::DoReadComplete(int rv) {
}
int DiskCacheBasedQuicServerInfo::DoWriteComplete(int rv) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoWriteComplete"));
+
if (rv < 0)
RecordQuicServerInfoFailure(WRITE_FAILURE);
state_ = SET_DONE;
@@ -296,6 +321,11 @@ int DiskCacheBasedQuicServerInfo::DoWriteComplete(int rv) {
}
int DiskCacheBasedQuicServerInfo::DoCreateOrOpenComplete(int rv) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoCreateOrOpenComplete"));
+
if (rv != OK) {
RecordQuicServerInfoFailure(CREATE_OR_OPEN_FAILURE);
state_ = SET_DONE;
@@ -311,16 +341,31 @@ int DiskCacheBasedQuicServerInfo::DoCreateOrOpenComplete(int rv) {
}
int DiskCacheBasedQuicServerInfo::DoGetBackend() {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoGetBackend"));
+
state_ = GET_BACKEND_COMPLETE;
return http_cache_->GetBackend(&data_shim_->backend, io_callback_);
}
int DiskCacheBasedQuicServerInfo::DoOpen() {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoOpen"));
+
state_ = OPEN_COMPLETE;
return backend_->OpenEntry(key(), &data_shim_->entry, io_callback_);
}
int DiskCacheBasedQuicServerInfo::DoRead() {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoRead"));
+
const int32 size = entry_->GetDataSize(0 /* index */);
if (!size) {
state_ = WAIT_FOR_DATA_READY_DONE;
@@ -334,6 +379,11 @@ int DiskCacheBasedQuicServerInfo::DoRead() {
}
int DiskCacheBasedQuicServerInfo::DoWrite() {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoWrite"));
+
write_buffer_ = new IOBuffer(new_data_.size());
memcpy(write_buffer_->data(), new_data_.data(), new_data_.size());
state_ = WRITE_COMPLETE;
@@ -347,6 +397,11 @@ int DiskCacheBasedQuicServerInfo::DoWrite() {
}
int DiskCacheBasedQuicServerInfo::DoCreateOrOpen() {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoCreateOrOpen"));
+
state_ = CREATE_OR_OPEN_COMPLETE;
if (entry_)
return OK;
@@ -359,6 +414,11 @@ int DiskCacheBasedQuicServerInfo::DoCreateOrOpen() {
}
int DiskCacheBasedQuicServerInfo::DoWaitForDataReadyDone() {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 DiskCacheBasedQuicServerInfo::DoWaitForDataReadyDone"));
+
DCHECK(!ready_);
state_ = NONE;
ready_ = true;
« no previous file with comments | « net/base/mime_util_unittest.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698