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

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

Issue 2389643002: Reflow comments in core/fetch (Closed)
Patch Set: yoavs comments 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) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 static RawResource* fetchImport(FetchRequest&, ResourceFetcher*); 48 static RawResource* fetchImport(FetchRequest&, ResourceFetcher*);
49 static RawResource* fetchMedia(FetchRequest&, ResourceFetcher*); 49 static RawResource* fetchMedia(FetchRequest&, ResourceFetcher*);
50 static RawResource* fetchTextTrack(FetchRequest&, ResourceFetcher*); 50 static RawResource* fetchTextTrack(FetchRequest&, ResourceFetcher*);
51 static RawResource* fetchManifest(FetchRequest&, ResourceFetcher*); 51 static RawResource* fetchManifest(FetchRequest&, ResourceFetcher*);
52 52
53 // Exposed for testing 53 // Exposed for testing
54 static RawResource* create(const ResourceRequest& request, Type type) { 54 static RawResource* create(const ResourceRequest& request, Type type) {
55 return new RawResource(request, type, ResourceLoaderOptions()); 55 return new RawResource(request, type, ResourceLoaderOptions());
56 } 56 }
57 57
58 // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and ther efore shouldn't 58 // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and
59 // use RawResource. However, it is, and it needs to be able to defer loading. 59 // therefore shouldn't use RawResource. However, it is, and it needs to be
60 // This can be fixed by splitting CORS preflighting out of DocumentThreacableL oader. 60 // able to defer loading. This can be fixed by splitting CORS preflighting out
61 // of DocumentThreadableLoader.
61 void setDefersLoading(bool); 62 void setDefersLoading(bool);
62 63
63 bool canReuse(const ResourceRequest&) const override; 64 bool canReuse(const ResourceRequest&) const override;
64 65
65 private: 66 private:
66 class RawResourceFactory : public ResourceFactory { 67 class RawResourceFactory : public ResourceFactory {
67 public: 68 public:
68 explicit RawResourceFactory(Resource::Type type) : ResourceFactory(type) {} 69 explicit RawResourceFactory(Resource::Type type) : ResourceFactory(type) {}
69 70
70 Resource* create(const ResourceRequest& request, 71 Resource* create(const ResourceRequest& request,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 const char* /* data */, 145 const char* /* data */,
145 size_t /* length */) {} 146 size_t /* length */) {}
146 virtual void redirectReceived(Resource*, 147 virtual void redirectReceived(Resource*,
147 ResourceRequest&, 148 ResourceRequest&,
148 const ResourceResponse&) {} 149 const ResourceResponse&) {}
149 virtual void redirectBlocked() {} 150 virtual void redirectBlocked() {}
150 virtual void dataDownloaded(Resource*, int) {} 151 virtual void dataDownloaded(Resource*, int) {}
151 virtual void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) {} 152 virtual void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) {}
152 }; 153 };
153 154
154 // Checks the sequence of callbacks of RawResourceClient. 155 // Checks the sequence of callbacks of RawResourceClient. This can be used only
155 // This can be used only when a RawResourceClient is added as a client to 156 // when a RawResourceClient is added as a client to at most one RawResource.
156 // at most one RawResource.
157 class CORE_EXPORT RawResourceClientStateChecker final { 157 class CORE_EXPORT RawResourceClientStateChecker final {
158 public: 158 public:
159 RawResourceClientStateChecker(); 159 RawResourceClientStateChecker();
160 ~RawResourceClientStateChecker(); 160 ~RawResourceClientStateChecker();
161 161
162 // Call before addClient()/removeClient() is called. 162 // Call before addClient()/removeClient() is called.
163 void willAddClient(); 163 void willAddClient();
164 void willRemoveClient(); 164 void willRemoveClient();
165 165
166 // Call RawResourceClientStateChecker::f() at the beginning of 166 // Call RawResourceClientStateChecker::f() at the beginning of
(...skipping 17 matching lines...) Expand all
184 DataReceived, 184 DataReceived,
185 DataDownloaded, 185 DataDownloaded,
186 NotifyFinished 186 NotifyFinished
187 }; 187 };
188 State m_state; 188 State m_state;
189 }; 189 };
190 190
191 } // namespace blink 191 } // namespace blink
192 192
193 #endif // RawResource_h 193 #endif // RawResource_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698