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

Side by Side Diff: net/http/partial_data.cc

Issue 1062413002: Remove unnecessary instrumentation for several jank bugs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fixes Created 5 years, 8 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
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/proxy/proxy_resolver_v8_tracing.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/http/partial_data.h" 5 #include "net/http/partial_data.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/profiler/scoped_tracker.h"
12 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
14 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
15 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
16 #include "net/disk_cache/disk_cache.h" 15 #include "net/disk_cache/disk_cache.h"
17 #include "net/http/http_response_headers.h" 16 #include "net/http/http_response_headers.h"
18 #include "net/http/http_util.h" 17 #include "net/http/http_util.h"
19 18
20 namespace net { 19 namespace net {
21 20
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 base::Unretained(this))); 82 base::Unretained(this)));
84 if (rv != net::ERR_IO_PENDING) { 83 if (rv != net::ERR_IO_PENDING) {
85 // The callback will not be invoked. Lets cleanup. 84 // The callback will not be invoked. Lets cleanup.
86 *start = start_; 85 *start = start_;
87 delete this; 86 delete this;
88 } 87 }
89 return rv; 88 return rv;
90 } 89 }
91 90
92 void PartialData::Core::OnIOComplete(int result) { 91 void PartialData::Core::OnIOComplete(int result) {
93 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
94 tracked_objects::ScopedTracker tracking_profile(
95 FROM_HERE_WITH_EXPLICIT_FUNCTION(
96 "422516 PartialData::Core::OnIOComplete"));
97
98 if (owner_) 92 if (owner_)
99 owner_->GetAvailableRangeCompleted(result, start_); 93 owner_->GetAvailableRangeCompleted(result, start_);
100 delete this; 94 delete this;
101 } 95 }
102 96
103 // ----------------------------------------------------------------------------- 97 // -----------------------------------------------------------------------------
104 98
105 PartialData::PartialData() 99 PartialData::PartialData()
106 : current_range_start_(0), 100 : current_range_start_(0),
107 current_range_end_(0), 101 current_range_end_(0),
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 cached_min_len_ = result; 498 cached_min_len_ = result;
505 if (result >= 0) 499 if (result >= 0)
506 result = 1; // Return success, go ahead and validate the entry. 500 result = 1; // Return success, go ahead and validate the entry.
507 501
508 CompletionCallback cb = callback_; 502 CompletionCallback cb = callback_;
509 callback_.Reset(); 503 callback_.Reset();
510 cb.Run(result); 504 cb.Run(result);
511 } 505 }
512 506
513 } // namespace net 507 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/proxy/proxy_resolver_v8_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698