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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.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) 2005, 2006, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2011 Apple 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // A succesful load will consist of: 62 // A succesful load will consist of:
63 // 0+ willFollowRedirect() 63 // 0+ willFollowRedirect()
64 // 0+ didSendData() 64 // 0+ didSendData()
65 // 1 didReceiveResponse() 65 // 1 didReceiveResponse()
66 // 0-1 didReceiveCachedMetadata() 66 // 0-1 didReceiveCachedMetadata()
67 // 0+ didReceiveData() or didDownloadData(), but never both 67 // 0+ didReceiveData() or didDownloadData(), but never both
68 // 1 didFinishLoading() 68 // 1 didFinishLoading()
69 // A failed load is indicated by 1 didFail(), which can occur at any time 69 // A failed load is indicated by 1 didFail(), which can occur at any time
70 // before didFinishLoading(), including synchronous inside one of the other 70 // before didFinishLoading(), including synchronous inside one of the other
71 // callbacks via ResourceLoader::cancel() 71 // callbacks via ResourceLoader::cancel()
72 void willFollowRedirect(WebURLLoader*, WebURLRequest&, const WebURLResponse& redirectResponse, int64_t encodedDataLength) override; 72 bool willFollowRedirect(WebURLLoader*, WebURLRequest&, const WebURLResponse& redirectResponse, int64_t encodedDataLength) override;
73 void didSendData(WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override; 73 void didSendData(WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override;
74 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) override; 74 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) override;
75 void didReceiveResponse(WebURLLoader*, const WebURLResponse&, WebDataConsume rHandle*) override; 75 void didReceiveResponse(WebURLLoader*, const WebURLResponse&, WebDataConsume rHandle*) override;
76 void didReceiveCachedMetadata(WebURLLoader*, const char* data, int length) o verride; 76 void didReceiveCachedMetadata(WebURLLoader*, const char* data, int length) o verride;
77 void didReceiveData(WebURLLoader*, const char*, int, int encodedDataLength, int encodedBodyLength) override; 77 void didReceiveData(WebURLLoader*, const char*, int, int encodedDataLength, int encodedBodyLength) override;
78 void didDownloadData(WebURLLoader*, int, int) override; 78 void didDownloadData(WebURLLoader*, int, int) override;
79 void didFinishLoading(WebURLLoader*, double finishTime, int64_t encodedDataL ength) override; 79 void didFinishLoading(WebURLLoader*, double finishTime, int64_t encodedDataL ength) override;
80 void didFail(WebURLLoader*, const WebURLError&) override; 80 void didFail(WebURLLoader*, const WebURLError&) override;
81 81
82 void didFinishLoadingFirstPartInMultipart(); 82 void didFinishLoadingFirstPartInMultipart();
83 83
84 private: 84 private:
85 // Assumes ResourceFetcher and Resource are non-null. 85 // Assumes ResourceFetcher and Resource are non-null.
86 ResourceLoader(ResourceFetcher*, Resource*); 86 ResourceLoader(ResourceFetcher*, Resource*);
87 87
88 void requestSynchronously(const ResourceRequest&); 88 void requestSynchronously(const ResourceRequest&);
89 89
90 std::unique_ptr<WebURLLoader> m_loader; 90 std::unique_ptr<WebURLLoader> m_loader;
91 Member<ResourceFetcher> m_fetcher; 91 Member<ResourceFetcher> m_fetcher;
92 Member<Resource> m_resource; 92 Member<Resource> m_resource;
93 }; 93 };
94 94
95 } // namespace blink 95 } // namespace blink
96 96
97 #endif 97 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698