| OLD | NEW |
| 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 24 matching lines...) Expand all Loading... |
| 35 #include "Logging.h" | 35 #include "Logging.h" |
| 36 #include "NetscapePlugInStreamLoader.h" | 36 #include "NetscapePlugInStreamLoader.h" |
| 37 #include "PlatformStrategies.h" | 37 #include "PlatformStrategies.h" |
| 38 #include "ResourceLoader.h" | 38 #include "ResourceLoader.h" |
| 39 #include "ResourceRequest.h" | 39 #include "ResourceRequest.h" |
| 40 #include "SubresourceLoader.h" | 40 #include "SubresourceLoader.h" |
| 41 #include <wtf/MainThread.h> | 41 #include <wtf/MainThread.h> |
| 42 #include <wtf/TemporaryChange.h> | 42 #include <wtf/TemporaryChange.h> |
| 43 #include <wtf/text/CString.h> | 43 #include <wtf/text/CString.h> |
| 44 | 44 |
| 45 #if PLATFORM(CHROMIUM) | |
| 46 #define REQUEST_MANAGEMENT_ENABLED 0 | |
| 47 #else | |
| 48 #define REQUEST_MANAGEMENT_ENABLED 1 | 45 #define REQUEST_MANAGEMENT_ENABLED 1 |
| 49 #endif | |
| 50 | 46 |
| 51 namespace WebCore { | 47 namespace WebCore { |
| 52 | 48 |
| 53 #if REQUEST_MANAGEMENT_ENABLED | 49 #if REQUEST_MANAGEMENT_ENABLED |
| 54 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20; | 50 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20; |
| 55 // Match the parallel connection count used by the networking layer. | 51 // Match the parallel connection count used by the networking layer. |
| 56 static unsigned maxRequestsInFlightPerHost; | 52 static unsigned maxRequestsInFlightPerHost; |
| 57 #else | 53 #else |
| 58 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 10000; | 54 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 10000; |
| 59 static const unsigned maxRequestsInFlightPerHost = 10000; | 55 static const unsigned maxRequestsInFlightPerHost = 10000; |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 322 } |
| 327 | 323 |
| 328 bool ResourceLoadScheduler::HostInformation::limitRequests(ResourceLoadPriority
priority) const | 324 bool ResourceLoadScheduler::HostInformation::limitRequests(ResourceLoadPriority
priority) const |
| 329 { | 325 { |
| 330 if (priority == ResourceLoadPriorityVeryLow && !m_requestsLoading.isEmpty()) | 326 if (priority == ResourceLoadPriorityVeryLow && !m_requestsLoading.isEmpty()) |
| 331 return true; | 327 return true; |
| 332 return m_requestsLoading.size() >= (resourceLoadScheduler()->isSerialLoading
Enabled() ? 1 : m_maxRequestsInFlight); | 328 return m_requestsLoading.size() >= (resourceLoadScheduler()->isSerialLoading
Enabled() ? 1 : m_maxRequestsInFlight); |
| 333 } | 329 } |
| 334 | 330 |
| 335 } // namespace WebCore | 331 } // namespace WebCore |
| OLD | NEW |