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

Side by Side Diff: Source/core/fetch/ResourceLoader.cpp

Issue 1246493002: Fix Resource Priorities and Scheduling (Blink Side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 5 years, 4 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 | « Source/core/fetch/ResourceLoader.h ('k') | Source/core/frame/Settings.in » ('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) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, int in traPriorityValue) 212 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, int in traPriorityValue)
213 { 213 {
214 if (m_loader) { 214 if (m_loader) {
215 m_fetcher->didChangeLoadingPriority(m_resource, loadPriority, intraPrior ityValue); 215 m_fetcher->didChangeLoadingPriority(m_resource, loadPriority, intraPrior ityValue);
216 ASSERT(m_state != Terminated); 216 ASSERT(m_state != Terminated);
217 m_loader->didChangePriority(static_cast<WebURLRequest::Priority>(loadPri ority), intraPriorityValue); 217 m_loader->didChangePriority(static_cast<WebURLRequest::Priority>(loadPri ority), intraPriorityValue);
218 } 218 }
219 } 219 }
220 220
221 bool ResourceLoader::shouldUseIncreasedPriorities()
222 {
223 return m_fetcher->context().fetchIncreasePriorities();
224 }
225
221 void ResourceLoader::cancelIfNotFinishing() 226 void ResourceLoader::cancelIfNotFinishing()
222 { 227 {
223 if (m_state != Initialized) 228 if (m_state != Initialized)
224 return; 229 return;
225 cancel(); 230 cancel();
226 } 231 }
227 232
228 void ResourceLoader::cancel() 233 void ResourceLoader::cancel()
229 { 234 {
230 cancel(ResourceError()); 235 cancel(ResourceError());
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); 523 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength);
519 } 524 }
520 525
521 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const 526 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const
522 { 527 {
523 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials); 528 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials);
524 return request; 529 return request;
525 } 530 }
526 531
527 } 532 }
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceLoader.h ('k') | Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698