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

Side by Side Diff: content/browser/appcache/appcache_url_request_job.cc

Issue 900793009: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove remnant of change Created 5 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 unified diff | Download patch
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 "content/browser/appcache/appcache_url_request_job.h" 5 #include "content/browser/appcache/appcache_url_request_job.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 info_ = NULL; 375 info_ = NULL;
376 cache_ = NULL; 376 cache_ = NULL;
377 group_ = NULL; 377 group_ = NULL;
378 range_response_info_.reset(); 378 range_response_info_.reset();
379 net::URLRequestJob::Kill(); 379 net::URLRequestJob::Kill();
380 weak_factory_.InvalidateWeakPtrs(); 380 weak_factory_.InvalidateWeakPtrs();
381 } 381 }
382 } 382 }
383 383
384 net::LoadState AppCacheURLRequestJob::GetLoadState() const { 384 net::LoadState AppCacheURLRequestJob::GetLoadState() const {
385 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is
386 // fixed.
387 tracked_objects::ScopedTracker tracking_profile(
388 FROM_HERE_WITH_EXPLICIT_FUNCTION(
389 "455952 AppCacheURLRequestJob::GetLoadState"));
385 if (!has_been_started()) 390 if (!has_been_started())
386 return net::LOAD_STATE_IDLE; 391 return net::LOAD_STATE_IDLE;
387 if (!has_delivery_orders()) 392 if (!has_delivery_orders())
388 return net::LOAD_STATE_WAITING_FOR_APPCACHE; 393 return net::LOAD_STATE_WAITING_FOR_APPCACHE;
389 if (delivery_type_ != APPCACHED_DELIVERY) 394 if (delivery_type_ != APPCACHED_DELIVERY)
390 return net::LOAD_STATE_IDLE; 395 return net::LOAD_STATE_IDLE;
391 if (!info_.get()) 396 if (!info_.get())
392 return net::LOAD_STATE_WAITING_FOR_APPCACHE; 397 return net::LOAD_STATE_WAITING_FOR_APPCACHE;
393 if (reader_.get() && reader_->IsReadPending()) 398 if (reader_.get() && reader_->IsReadPending())
394 return net::LOAD_STATE_READING_RESPONSE; 399 return net::LOAD_STATE_READING_RESPONSE;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 return; 451 return;
447 } 452 }
448 453
449 // If multiple ranges are requested, we play dumb and 454 // If multiple ranges are requested, we play dumb and
450 // return the entire response with 200 OK. 455 // return the entire response with 200 OK.
451 if (ranges.size() == 1U) 456 if (ranges.size() == 1U)
452 range_requested_ = ranges[0]; 457 range_requested_ = ranges[0];
453 } 458 }
454 459
455 } // namespace content 460 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/net/pref_proxy_config_tracker_impl.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698