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

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

Issue 2230173002: Change WebURLLoaderClient::willFollowRedirect() API to return bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 RawResource(const ResourceRequest&, Type, const ResourceLoaderOptions&); 78 RawResource(const ResourceRequest&, Type, const ResourceLoaderOptions&);
79 79
80 void didAddClient(ResourceClient*) override; 80 void didAddClient(ResourceClient*) override;
81 void appendData(const char*, size_t) override; 81 void appendData(const char*, size_t) override;
82 82
83 bool shouldIgnoreHTTPStatusCodeErrors() const override { 83 bool shouldIgnoreHTTPStatusCodeErrors() const override {
84 return !isLinkPreload(); 84 return !isLinkPreload();
85 } 85 }
86 86
87 void willFollowRedirect(ResourceRequest&, const ResourceResponse&) override; 87 bool willFollowRedirect(const ResourceRequest&,
88 const ResourceResponse&) override;
88 void willNotFollowRedirect() override; 89 void willNotFollowRedirect() override;
89 void responseReceived(const ResourceResponse&, 90 void responseReceived(const ResourceResponse&,
90 std::unique_ptr<WebDataConsumerHandle>) override; 91 std::unique_ptr<WebDataConsumerHandle>) override;
91 void setSerializedCachedMetadata(const char*, size_t) override; 92 void setSerializedCachedMetadata(const char*, size_t) override;
92 void didSendData(unsigned long long bytesSent, 93 void didSendData(unsigned long long bytesSent,
93 unsigned long long totalBytesToBeSent) override; 94 unsigned long long totalBytesToBeSent) override;
94 void didDownloadData(int) override; 95 void didDownloadData(int) override;
95 void reportResourceTimingToClients(const ResourceTimingInfo&) override; 96 void reportResourceTimingToClients(const ResourceTimingInfo&) override;
96 }; 97 };
97 98
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 virtual void dataSent(Resource*, 138 virtual void dataSent(Resource*,
138 unsigned long long /* bytesSent */, 139 unsigned long long /* bytesSent */,
139 unsigned long long /* totalBytesToBeSent */) {} 140 unsigned long long /* totalBytesToBeSent */) {}
140 virtual void responseReceived(Resource*, 141 virtual void responseReceived(Resource*,
141 const ResourceResponse&, 142 const ResourceResponse&,
142 std::unique_ptr<WebDataConsumerHandle>) {} 143 std::unique_ptr<WebDataConsumerHandle>) {}
143 virtual void setSerializedCachedMetadata(Resource*, const char*, size_t) {} 144 virtual void setSerializedCachedMetadata(Resource*, const char*, size_t) {}
144 virtual void dataReceived(Resource*, 145 virtual void dataReceived(Resource*,
145 const char* /* data */, 146 const char* /* data */,
146 size_t /* length */) {} 147 size_t /* length */) {}
147 virtual void redirectReceived(Resource*, 148 virtual bool redirectReceived(Resource*,
148 ResourceRequest&, 149 const ResourceRequest&,
149 const ResourceResponse&) {} 150 const ResourceResponse&) {
151 return true;
152 }
150 virtual void redirectBlocked() {} 153 virtual void redirectBlocked() {}
151 virtual void dataDownloaded(Resource*, int) {} 154 virtual void dataDownloaded(Resource*, int) {}
152 virtual void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) {} 155 virtual void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) {}
153 }; 156 };
154 157
155 // Checks the sequence of callbacks of RawResourceClient. This can be used only 158 // Checks the sequence of callbacks of RawResourceClient. This can be used only
156 // when a RawResourceClient is added as a client to at most one RawResource. 159 // when a RawResourceClient is added as a client to at most one RawResource.
157 class CORE_EXPORT RawResourceClientStateChecker final { 160 class CORE_EXPORT RawResourceClientStateChecker final {
158 public: 161 public:
159 RawResourceClientStateChecker(); 162 RawResourceClientStateChecker();
(...skipping 24 matching lines...) Expand all
184 DataReceived, 187 DataReceived,
185 DataDownloaded, 188 DataDownloaded,
186 NotifyFinished 189 NotifyFinished
187 }; 190 };
188 State m_state; 191 State m_state;
189 }; 192 };
190 193
191 } // namespace blink 194 } // namespace blink
192 195
193 #endif // RawResource_h 196 #endif // RawResource_h
OLDNEW
« no previous file with comments | « media/blink/resource_multibuffer_data_provider.cc ('k') | third_party/WebKit/Source/core/fetch/RawResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698