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

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 1680503002: Tidy up inclusion of WebScheduler.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 21 matching lines...) Expand all
32 #include "core/fetch/ResourceFetcher.h" 32 #include "core/fetch/ResourceFetcher.h"
33 #include "core/fetch/ResourceLoader.h" 33 #include "core/fetch/ResourceLoader.h"
34 #include "core/fetch/ResourcePtr.h" 34 #include "core/fetch/ResourcePtr.h"
35 #include "core/inspector/InspectorInstrumentation.h" 35 #include "core/inspector/InspectorInstrumentation.h"
36 #include "platform/Logging.h" 36 #include "platform/Logging.h"
37 #include "platform/SharedBuffer.h" 37 #include "platform/SharedBuffer.h"
38 #include "platform/TraceEvent.h" 38 #include "platform/TraceEvent.h"
39 #include "platform/weborigin/KURL.h" 39 #include "platform/weborigin/KURL.h"
40 #include "public/platform/Platform.h" 40 #include "public/platform/Platform.h"
41 #include "public/platform/WebProcessMemoryDump.h" 41 #include "public/platform/WebProcessMemoryDump.h"
42 #include "public/platform/WebScheduler.h"
42 #include "wtf/CurrentTime.h" 43 #include "wtf/CurrentTime.h"
43 #include "wtf/MathExtras.h" 44 #include "wtf/MathExtras.h"
44 #include "wtf/StdLibExtras.h" 45 #include "wtf/StdLibExtras.h"
45 #include "wtf/Vector.h" 46 #include "wtf/Vector.h"
46 #include "wtf/WeakPtr.h" 47 #include "wtf/WeakPtr.h"
47 #include "wtf/text/CString.h" 48 #include "wtf/text/CString.h"
48 #include <algorithm> 49 #include <algorithm>
49 50
50 using namespace WTF;
51
52 namespace blink { 51 namespace blink {
53 52
54 // These response headers are not copied from a revalidated response to the 53 // These response headers are not copied from a revalidated response to the
55 // cached response headers. For compatibility, this list is based on Chromium's 54 // cached response headers. For compatibility, this list is based on Chromium's
56 // net/http/http_response_headers.cc. 55 // net/http/http_response_headers.cc.
57 const char* const headersToIgnoreAfterRevalidation[] = { 56 const char* const headersToIgnoreAfterRevalidation[] = {
58 "allow", 57 "allow",
59 "connection", 58 "connection",
60 "etag", 59 "etag",
61 "expires", 60 "expires",
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 Vector<String> clientNames; 830 Vector<String> clientNames;
832 ResourceClientWalker<ResourceClient> walker(m_clients); 831 ResourceClientWalker<ResourceClient> walker(m_clients);
833 while (ResourceClient* client = walker.next()) 832 while (ResourceClient* client = walker.next())
834 clientNames.append(client->debugName()); 833 clientNames.append(client->debugName());
835 ResourceClientWalker<ResourceClient> walker2(m_clientsAwaitingCallback); 834 ResourceClientWalker<ResourceClient> walker2(m_clientsAwaitingCallback);
836 while (ResourceClient* client = walker2.next()) 835 while (ResourceClient* client = walker2.next())
837 clientNames.append("(awaiting) " + client->debugName()); 836 clientNames.append("(awaiting) " + client->debugName());
838 ResourceClientWalker<ResourceClient> walker3(m_finishedClients); 837 ResourceClientWalker<ResourceClient> walker3(m_finishedClients);
839 while (ResourceClient* client = walker3.next()) 838 while (ResourceClient* client = walker3.next())
840 clientNames.append("(finished) " + client->debugName()); 839 clientNames.append("(finished) " + client->debugName());
841 std::sort(clientNames.begin(), clientNames.end(), codePointCompareLessTh an); 840 std::sort(clientNames.begin(), clientNames.end(), WTF::codePointCompareL essThan);
842 841
843 StringBuilder builder; 842 StringBuilder builder;
844 for (size_t i = 0; i < clientNames.size() && i < kMaxResourceClientToSho wInMemoryInfra; ++i) { 843 for (size_t i = 0; i < clientNames.size() && i < kMaxResourceClientToSho wInMemoryInfra; ++i) {
845 if (i > 0) 844 if (i > 0)
846 builder.append(" / "); 845 builder.append(" / ");
847 builder.append(clientNames[i]); 846 builder.append(clientNames[i]);
848 } 847 }
849 if (clientNames.size() > kMaxResourceClientToShowInMemoryInfra) { 848 if (clientNames.size() > kMaxResourceClientToShowInMemoryInfra) {
850 builder.append(" / and "); 849 builder.append(" / and ");
851 builder.appendNumber(clientNames.size() - kMaxResourceClientToShowIn MemoryInfra); 850 builder.appendNumber(clientNames.size() - kMaxResourceClientToShowIn MemoryInfra);
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 case Resource::Media: 1190 case Resource::Media:
1192 return "Media"; 1191 return "Media";
1193 case Resource::Manifest: 1192 case Resource::Manifest:
1194 return "Manifest"; 1193 return "Manifest";
1195 } 1194 }
1196 ASSERT_NOT_REACHED(); 1195 ASSERT_NOT_REACHED();
1197 return "Unknown"; 1196 return "Unknown";
1198 } 1197 }
1199 1198
1200 } // namespace blink 1199 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/loader/NavigationScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698