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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2340603002: For more aggressive progress bar completion strategies, only count high priority resources (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/core/loader/ProgressTracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 std::unique_ptr<TracedValue> value = TracedValue::create(); 407 std::unique_ptr<TracedValue> value = TracedValue::create();
408 value->setString("requestId", requestId); 408 value->setString("requestId", requestId);
409 value->setString("url", url.getString()); 409 value->setString("url", url.getString());
410 value->setInteger("priority", priority); 410 value->setInteger("priority", priority);
411 return value; 411 return value;
412 } 412 }
413 413
414 void FrameFetchContext::willStartLoadingResource(unsigned long identifier, Resou rceRequest& request, Resource::Type type) 414 void FrameFetchContext::willStartLoadingResource(unsigned long identifier, Resou rceRequest& request, Resource::Type type)
415 { 415 {
416 TRACE_EVENT_ASYNC_BEGIN1("blink.net", "Resource", identifier, "data", loadRe sourceTraceData(identifier, request.url(), request.priority())); 416 TRACE_EVENT_ASYNC_BEGIN1("blink.net", "Resource", identifier, "data", loadRe sourceTraceData(identifier, request.url(), request.priority()));
417 frame()->loader().progress().willStartLoading(identifier); 417 frame()->loader().progress().willStartLoading(identifier, request.priority() );
418 prepareRequest(request); 418 prepareRequest(request);
419 419
420 if (!m_documentLoader || m_documentLoader->fetcher()->archive() || !request. url().isValid()) 420 if (!m_documentLoader || m_documentLoader->fetcher()->archive() || !request. url().isValid())
421 return; 421 return;
422 if (type == Resource::MainResource) 422 if (type == Resource::MainResource)
423 m_documentLoader->applicationCacheHost()->willStartLoadingMainResource(r equest); 423 m_documentLoader->applicationCacheHost()->willStartLoadingMainResource(r equest);
424 else 424 else
425 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque st); 425 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque st);
426 } 426 }
427 427
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 } 799 }
800 800
801 DEFINE_TRACE(FrameFetchContext) 801 DEFINE_TRACE(FrameFetchContext)
802 { 802 {
803 visitor->trace(m_document); 803 visitor->trace(m_document);
804 visitor->trace(m_documentLoader); 804 visitor->trace(m_documentLoader);
805 FetchContext::trace(visitor); 805 FetchContext::trace(visitor);
806 } 806 }
807 807
808 } // namespace blink 808 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/ProgressTracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698