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

Side by Side Diff: Source/core/html/parser/HTMLResourcePreloader.h

Issue 1112833004: Add HTMLResourcePreloader preconnect unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed crash Created 5 years, 4 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) 2013 Google Inc. All Rights Reserved. 2 * Copyright (C) 2013 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef HTMLResourcePreloader_h 26 #ifndef HTMLResourcePreloader_h
27 #define HTMLResourcePreloader_h 27 #define HTMLResourcePreloader_h
28 28
29 #include "core/fetch/FetchRequest.h" 29 #include "core/fetch/FetchRequest.h"
30 #include "core/fetch/Resource.h" 30 #include "core/fetch/Resource.h"
31 #include "core/html/parser/PreloadRequest.h" 31 #include "core/html/parser/PreloadRequest.h"
32 #include "core/html/parser/ResourcePreloader.h" 32 #include "core/html/parser/ResourcePreloader.h"
33 #include "core/loader/NetworkHintsInterface.h"
33 #include "wtf/CurrentTime.h" 34 #include "wtf/CurrentTime.h"
34 #include "wtf/text/TextPosition.h" 35 #include "wtf/text/TextPosition.h"
35 36
36 namespace blink { 37 namespace blink {
37 38
38 class HTMLResourcePreloader final : public NoBaseWillBeGarbageCollected<HTMLReso urcePreloader>, public ResourcePreloader { 39 class HTMLResourcePreloader final : public NoBaseWillBeGarbageCollected<HTMLReso urcePreloader>, public ResourcePreloader {
39 WTF_MAKE_NONCOPYABLE(HTMLResourcePreloader); WTF_MAKE_FAST_ALLOCATED_WILL_BE _REMOVED(HTMLResourcePreloader); 40 WTF_MAKE_NONCOPYABLE(HTMLResourcePreloader); WTF_MAKE_FAST_ALLOCATED_WILL_BE _REMOVED(HTMLResourcePreloader);
41 friend class HTMLResourcePreloaderTest;
40 public: 42 public:
41 static PassOwnPtrWillBeRawPtr<HTMLResourcePreloader> create(Document&); 43 static CORE_EXPORT PassOwnPtrWillBeRawPtr<HTMLResourcePreloader> create(Docu ment&);
42 DECLARE_TRACE(); 44 DECLARE_TRACE();
43 45
44 protected: 46 protected:
45 void preload(PassOwnPtr<PreloadRequest>) override; 47 CORE_EXPORT void preload(PassOwnPtr<PreloadRequest>, const NetworkHintsInter face&) override;
46 48
47 private: 49 private:
48 explicit HTMLResourcePreloader(Document&); 50 explicit HTMLResourcePreloader(Document&);
49 51
50 RawPtrWillBeMember<Document> m_document; 52 RawPtrWillBeMember<Document> m_document;
51 }; 53 };
52 54
53 } 55 }
54 56
55 #endif 57 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScannerTest.cpp ('k') | Source/core/html/parser/HTMLResourcePreloader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698