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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (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) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ~ScriptResourceClient() override {} 42 ~ScriptResourceClient() override {}
43 static ResourceClientType expectedType() { return ScriptType; } 43 static ResourceClientType expectedType() { return ScriptType; }
44 ResourceClientType resourceClientType() const final { return expectedType(); } 44 ResourceClientType resourceClientType() const final { return expectedType(); }
45 45
46 virtual void notifyAppendData(ScriptResource* resource) { } 46 virtual void notifyAppendData(ScriptResource* resource) { }
47 }; 47 };
48 48
49 class CORE_EXPORT ScriptResource final : public TextResource { 49 class CORE_EXPORT ScriptResource final : public TextResource {
50 public: 50 public:
51 using ClientType = ScriptResourceClient; 51 using ClientType = ScriptResourceClient;
52 static PassRefPtrWillBeRawPtr<ScriptResource> fetch(FetchRequest&, ResourceF etcher*); 52 static RawPtr<ScriptResource> fetch(FetchRequest&, ResourceFetcher*);
53 53
54 // Public for testing 54 // Public for testing
55 static PassRefPtrWillBeRawPtr<ScriptResource> create(const ResourceRequest& request, const String& charset) 55 static RawPtr<ScriptResource> create(const ResourceRequest& request, const S tring& charset)
56 { 56 {
57 return adoptRefWillBeNoop(new ScriptResource(request, charset)); 57 return (new ScriptResource(request, charset));
58 } 58 }
59 59
60 ~ScriptResource() override; 60 ~ScriptResource() override;
61 61
62 void didAddClient(ResourceClient*) override; 62 void didAddClient(ResourceClient*) override;
63 void appendData(const char*, size_t) override; 63 void appendData(const char*, size_t) override;
64 64
65 void onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) const o verride; 65 void onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) const o verride;
66 66
67 void destroyDecodedDataForFailedRevalidation() override; 67 void destroyDecodedDataForFailedRevalidation() override;
68 68
69 const CompressibleString& script(); 69 const CompressibleString& script();
70 70
71 AtomicString mimeType() const; 71 AtomicString mimeType() const;
72 72
73 bool mimeTypeAllowedByNosniff() const; 73 bool mimeTypeAllowedByNosniff() const;
74 74
75 void setIntegrityMetadata(const IntegrityMetadataSet& metadata) { m_integrit yMetadata = metadata; } 75 void setIntegrityMetadata(const IntegrityMetadataSet& metadata) { m_integrit yMetadata = metadata; }
76 const IntegrityMetadataSet& integrityMetadata() const { return m_integrityMe tadata; } 76 const IntegrityMetadataSet& integrityMetadata() const { return m_integrityMe tadata; }
77 void setIntegrityAlreadyChecked(bool checked) { m_integrityChecked = checked ; } 77 void setIntegrityAlreadyChecked(bool checked) { m_integrityChecked = checked ; }
78 bool integrityAlreadyChecked() { return m_integrityChecked; } 78 bool integrityAlreadyChecked() { return m_integrityChecked; }
79 bool mustRefetchDueToIntegrityMetadata(const FetchRequest&) const override; 79 bool mustRefetchDueToIntegrityMetadata(const FetchRequest&) const override;
80 80
81 private: 81 private:
82 class ScriptResourceFactory : public ResourceFactory { 82 class ScriptResourceFactory : public ResourceFactory {
83 public: 83 public:
84 ScriptResourceFactory() 84 ScriptResourceFactory()
85 : ResourceFactory(Resource::Script) { } 85 : ResourceFactory(Resource::Script) { }
86 86
87 PassRefPtrWillBeRawPtr<Resource> create(const ResourceRequest& request, const String& charset) const override 87 RawPtr<Resource> create(const ResourceRequest& request, const String& ch arset) const override
88 { 88 {
89 return adoptRefWillBeNoop(new ScriptResource(request, charset)); 89 return (new ScriptResource(request, charset));
90 } 90 }
91 }; 91 };
92 92
93 ScriptResource(const ResourceRequest&, const String& charset); 93 ScriptResource(const ResourceRequest&, const String& charset);
94 94
95 bool m_integrityChecked; 95 bool m_integrityChecked;
96 IntegrityMetadataSet m_integrityMetadata; 96 IntegrityMetadataSet m_integrityMetadata;
97 97
98 CompressibleString m_script; 98 CompressibleString m_script;
99 }; 99 };
100 100
101 DEFINE_RESOURCE_TYPE_CASTS(Script); 101 DEFINE_RESOURCE_TYPE_CASTS(Script);
102 102
103 } // namespace blink 103 } // namespace blink
104 104
105 #endif 105 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698