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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.h

Issue 2343623002: Add a warning whenever link preloads are not used (Closed)
Patch Set: Added comment Created 4 years, 2 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
5 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 5 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 enum ClearPreloadsPolicy { ClearAllPreloads, ClearSpeculativeMarkupPreloads }; 95 enum ClearPreloadsPolicy { ClearAllPreloads, ClearSpeculativeMarkupPreloads };
96 96
97 void enableIsPreloadedForTest(); 97 void enableIsPreloadedForTest();
98 bool isPreloadedForTest(const KURL&) const; 98 bool isPreloadedForTest(const KURL&) const;
99 99
100 int countPreloads() const { return m_preloads ? m_preloads->size() : 0; } 100 int countPreloads() const { return m_preloads ? m_preloads->size() : 0; }
101 void clearPreloads(ClearPreloadsPolicy = ClearAllPreloads); 101 void clearPreloads(ClearPreloadsPolicy = ClearAllPreloads);
102 void preloadStarted(Resource*); 102 void preloadStarted(Resource*);
103 void logPreloadStats(); 103 void logPreloadStats();
104 void warnUnusedPreloads();
104 105
105 MHTMLArchive* archive() const { return m_archive.get(); } 106 MHTMLArchive* archive() const { return m_archive.get(); }
106 ArchiveResource* createArchive(Resource*); 107 ArchiveResource* createArchive(Resource*);
107 108
108 void setDefersLoading(bool); 109 void setDefersLoading(bool);
109 void stopFetching(); 110 void stopFetching();
110 bool isFetching() const; 111 bool isFetching() const;
111 112
112 bool willFollowRedirect(Resource*, ResourceRequest&, const ResourceResponse& , int64_t encodedDataLength); 113 bool willFollowRedirect(Resource*, ResourceRequest&, const ResourceResponse& , int64_t encodedDataLength);
113 enum DidFinishLoadingReason { 114 enum DidFinishLoadingReason {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 m_loader->m_allowStaleResources = m_previousState; 239 m_loader->m_allowStaleResources = m_previousState;
239 } 240 }
240 private: 241 private:
241 Member<ResourceFetcher> m_loader; 242 Member<ResourceFetcher> m_loader;
242 bool m_previousState; 243 bool m_previousState;
243 }; 244 };
244 245
245 } // namespace blink 246 } // namespace blink
246 247
247 #endif // ResourceFetcher_h 248 #endif // ResourceFetcher_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FetchContext.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698