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

Side by Side Diff: third_party/WebKit/public/platform/WebURLLoaderClient.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, 3 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 class WebURLRequest; 40 class WebURLRequest;
41 class WebURLResponse; 41 class WebURLResponse;
42 struct WebURLError; 42 struct WebURLError;
43 43
44 class BLINK_PLATFORM_EXPORT WebURLLoaderClient { 44 class BLINK_PLATFORM_EXPORT WebURLLoaderClient {
45 public: 45 public:
46 // Called when following a redirect. |newRequest| contains the request 46 // Called when following a redirect. |newRequest| contains the request
47 // generated by the redirect. The client may modify |newRequest|. 47 // generated by the redirect. The client may modify |newRequest|.
48 // |encodedDataLength| is the size of the data that came from the network 48 // |encodedDataLength| is the size of the data that came from the network
49 // for this redirect, or zero if the redirect was served from cache. 49 // for this redirect, or zero if the redirect was served from cache.
50 virtual void willFollowRedirect( 50 //
51 WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirect Response, int64_t encodedDataLength) {} 51 // Implementations should return true to instruct the loader to follow the,
52 // redirect, or false otherwise.
53 virtual bool willFollowRedirect(
54 WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirect Response, int64_t encodedDataLength) {
jochen (gone - plz use gerrit) 2016/09/19 14:26:54 should newRequest be const now?
tyoshino (SeeGerritForStatus) 2016/09/26 14:48:41 Please see this. I'd like to give it try later as
jochen (gone - plz use gerrit) 2016/09/27 19:17:27 I'm worried that not doing this in one will put us
tyoshino (SeeGerritForStatus) 2016/09/29 13:40:22 To support by loading the AssociatedURLLoader, the
tyoshino (SeeGerritForStatus) 2016/09/29 13:41:17 s/by loading/loading by/;
55 return true;
56 }
52 57
53 // Called to report upload progress. The bytes reported correspond to 58 // Called to report upload progress. The bytes reported correspond to
54 // the HTTP message body. 59 // the HTTP message body.
55 virtual void didSendData( 60 virtual void didSendData(
56 WebURLLoader*, unsigned long long bytesSent, unsigned long long totalByt esToBeSent) { } 61 WebURLLoader*, unsigned long long bytesSent, unsigned long long totalByt esToBeSent) { }
57 62
58 // Called when response headers are received. 63 // Called when response headers are received.
59 virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) { } 64 virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) { }
60 65
61 // Called when response headers are received. 66 // Called when response headers are received.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Value passed to didFinishLoading when total encoded data length isn't kno wn. 100 // Value passed to didFinishLoading when total encoded data length isn't kno wn.
96 static const int64_t kUnknownEncodedDataLength = -1; 101 static const int64_t kUnknownEncodedDataLength = -1;
97 102
98 protected: 103 protected:
99 virtual ~WebURLLoaderClient() { } 104 virtual ~WebURLLoaderClient() { }
100 }; 105 };
101 106
102 } // namespace blink 107 } // namespace blink
103 108
104 #endif 109 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698