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

Side by Side Diff: Source/WebCore/loader/ResourceLoadScheduler.cpp

Issue 7019016: Merge 86290 - 2011-05-11 Antoine Labour <piman@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 Copyright (C) 2010 Google Inc. All rights reserved. 7 Copyright (C) 2010 Google Inc. All rights reserved.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 , m_requestTimer(this, &ResourceLoadScheduler::requestTimerFired) 77 , m_requestTimer(this, &ResourceLoadScheduler::requestTimerFired)
78 , m_isSuspendingPendingRequests(false) 78 , m_isSuspendingPendingRequests(false)
79 , m_isSerialLoadingEnabled(false) 79 , m_isSerialLoadingEnabled(false)
80 { 80 {
81 #if REQUEST_MANAGEMENT_ENABLED 81 #if REQUEST_MANAGEMENT_ENABLED
82 maxRequestsInFlightPerHost = initializeMaximumHTTPConnectionCountPerHost(); 82 maxRequestsInFlightPerHost = initializeMaximumHTTPConnectionCountPerHost();
83 #endif 83 #endif
84 } 84 }
85 85
86 PassRefPtr<SubresourceLoader> ResourceLoadScheduler::scheduleSubresourceLoad(Fra me* frame, SubresourceLoaderClient* client, const ResourceRequest& request, Reso urceLoadPriority priority, SecurityCheckPolicy securityCheck, 86 PassRefPtr<SubresourceLoader> ResourceLoadScheduler::scheduleSubresourceLoad(Fra me* frame, SubresourceLoaderClient* client, const ResourceRequest& request, Reso urceLoadPriority priority, SecurityCheckPolicy securityCheck,
87 boo l sendResourceLoadCallbacks, bool shouldContentSniff, const String& optionalOutg oingReferrer) 87 boo l sendResourceLoadCallbacks, bool shouldContentSniff, const String& optionalOutg oingReferrer, bool shouldBufferData)
88 { 88 {
89 RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, client, request, securityCheck, sendResourceLoadCallbacks, shouldContentSniff, optionalO utgoingReferrer); 89 RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, client, request, securityCheck, sendResourceLoadCallbacks, shouldContentSniff, optionalO utgoingReferrer, shouldBufferData);
90 if (loader) 90 if (loader)
91 scheduleLoad(loader.get(), priority); 91 scheduleLoad(loader.get(), priority);
92 return loader.release(); 92 return loader.release();
93 } 93 }
94 94
95 PassRefPtr<NetscapePlugInStreamLoader> ResourceLoadScheduler::schedulePluginStre amLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceReq uest& request) 95 PassRefPtr<NetscapePlugInStreamLoader> ResourceLoadScheduler::schedulePluginStre amLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceReq uest& request)
96 { 96 {
97 PassRefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader:: create(frame, client, request); 97 PassRefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader:: create(frame, client, request);
98 if (loader) 98 if (loader)
99 scheduleLoad(loader.get(), ResourceLoadPriorityLow); 99 scheduleLoad(loader.get(), ResourceLoadPriorityLow);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 284 }
285 285
286 bool ResourceLoadScheduler::HostInformation::limitRequests(ResourceLoadPriority priority) const 286 bool ResourceLoadScheduler::HostInformation::limitRequests(ResourceLoadPriority priority) const
287 { 287 {
288 if (priority == ResourceLoadPriorityVeryLow && !m_requestsLoading.isEmpty()) 288 if (priority == ResourceLoadPriorityVeryLow && !m_requestsLoading.isEmpty())
289 return true; 289 return true;
290 return m_requestsLoading.size() >= (resourceLoadScheduler()->isSerialLoading Enabled() ? 1 : m_maxRequestsInFlight); 290 return m_requestsLoading.size() >= (resourceLoadScheduler()->isSerialLoading Enabled() ? 1 : m_maxRequestsInFlight);
291 } 291 }
292 292
293 } // namespace WebCore 293 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/loader/ResourceLoadScheduler.h ('k') | Source/WebCore/loader/SubresourceLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698