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

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, 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) 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // A succesful load will consist of: 66 // A succesful load will consist of:
67 // 0+ willFollowRedirect() 67 // 0+ willFollowRedirect()
68 // 0+ didSendData() 68 // 0+ didSendData()
69 // 1 didReceiveResponse() 69 // 1 didReceiveResponse()
70 // 0-1 didReceiveCachedMetadata() 70 // 0-1 didReceiveCachedMetadata()
71 // 0+ didReceiveData() or didDownloadData(), but never both 71 // 0+ didReceiveData() or didDownloadData(), but never both
72 // 1 didFinishLoading() 72 // 1 didFinishLoading()
73 // A failed load is indicated by 1 didFail(), which can occur at any time 73 // A failed load is indicated by 1 didFail(), which can occur at any time
74 // before didFinishLoading(), including synchronous inside one of the other 74 // before didFinishLoading(), including synchronous inside one of the other
75 // callbacks via ResourceLoader::cancel() 75 // callbacks via ResourceLoader::cancel()
76 void willFollowRedirect(WebURLLoader*, 76 bool willFollowRedirect(WebURLLoader*,
77 WebURLRequest&, 77 WebURLRequest&,
78 const WebURLResponse& redirectResponse) override; 78 const WebURLResponse& redirectResponse) override;
79 void didSendData(WebURLLoader*, 79 void didSendData(WebURLLoader*,
80 unsigned long long bytesSent, 80 unsigned long long bytesSent,
81 unsigned long long totalBytesToBeSent) override; 81 unsigned long long totalBytesToBeSent) override;
82 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) override; 82 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) override;
83 void didReceiveResponse(WebURLLoader*, 83 void didReceiveResponse(WebURLLoader*,
84 const WebURLResponse&, 84 const WebURLResponse&,
85 WebDataConsumerHandle*) override; 85 WebDataConsumerHandle*) override;
86 void didReceiveCachedMetadata(WebURLLoader*, 86 void didReceiveCachedMetadata(WebURLLoader*,
87 const char* data, 87 const char* data,
88 int length) override; 88 int length) override;
89 void didReceiveData(WebURLLoader*, 89 void didReceiveData(WebURLLoader*,
90 const char*, 90 const char*,
91 int, 91 int,
92 int encodedDataLength, 92 int encodedDataLength,
93 int encodedBodyLength) override; 93 int encodedBodyLength) override;
94 void didDownloadData(WebURLLoader*, int, int) override; 94 void didDownloadData(WebURLLoader*, int, int) override;
95 void didFinishLoading(WebURLLoader*, 95 void didFinishLoading(WebURLLoader*,
96 double finishTime, 96 double finishTime,
97 int64_t encodedDataLength) override; 97 int64_t encodedDataLength) override;
98 void didFail(WebURLLoader*, const WebURLError&) override; 98 void didFail(WebURLLoader*, const WebURLError&) override;
99 99
100 void didFinishLoadingFirstPartInMultipart(); 100 void didFinishLoadingFirstPartInMultipart();
101 101
102 private: 102 private:
103 // Assumes ResourceFetcher and Resource are non-null. 103 // Assumes ResourceFetcher and Resource are non-null.
104 ResourceLoader(ResourceFetcher*, Resource*); 104 ResourceLoader(ResourceFetcher*, Resource*);
105 105
106 void cancelForRedirectAccessCheckError(const KURL&);
106 void requestSynchronously(const ResourceRequest&); 107 void requestSynchronously(const ResourceRequest&);
107 108
108 std::unique_ptr<WebURLLoader> m_loader; 109 std::unique_ptr<WebURLLoader> m_loader;
109 Member<ResourceFetcher> m_fetcher; 110 Member<ResourceFetcher> m_fetcher;
110 Member<Resource> m_resource; 111 Member<Resource> m_resource;
111 }; 112 };
112 113
113 } // namespace blink 114 } // namespace blink
114 115
115 #endif 116 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698