Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/Resource.cpp |
| diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp |
| index f1aaf35ded75c5e9d21ed0548344ec9bd3c24798..1b89c6ad343162c20e8036ef4f036e4f1aa59b28 100644 |
| --- a/third_party/WebKit/Source/core/fetch/Resource.cpp |
| +++ b/third_party/WebKit/Source/core/fetch/Resource.cpp |
| @@ -941,10 +941,25 @@ size_t Resource::overheadSize() const |
| void Resource::didChangePriority(ResourceLoadPriority loadPriority, int intraPriorityValue) |
| { |
| + m_resourceRequest.setPriority(loadPriority, intraPriorityValue); |
| if (m_loader) |
| m_loader->didChangePriority(loadPriority, intraPriorityValue); |
| } |
| +ResourcePriority Resource::priorityFromClients() |
|
Nate Chapin
2015/10/07 19:40:40
I could go either way on whether this belongs here
|
| +{ |
| + ResourcePriority priority; |
| + ResourceClientWalker<ResourceClient> w(m_clients); |
|
esprehn
2015/10/08 05:39:11
walker
Nate Chapin
2015/10/08 21:26:37
Done.
|
| + while (ResourceClient* c = w.next()) { |
|
esprehn
2015/10/08 05:39:11
client = walker.next()
we should also really make
Nate Chapin
2015/10/08 21:26:37
I'll add that to my list of things to do eventuall
|
| + ResourcePriority nextPriority = c->updatePriority(this); |
| + if (nextPriority.visibility == ResourcePriority::NotVisible) |
| + continue; |
| + priority.visibility = ResourcePriority::Visible; |
| + priority.intraPriorityValue += nextPriority.intraPriorityValue; |
| + } |
| + return priority; |
| +} |
| + |
| Resource::ResourceCallback* Resource::ResourceCallback::callbackHandler() |
| { |
| DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<ResourceCallback>, callbackHandler, (adoptPtrWillBeNoop(new ResourceCallback))); |