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

Side by Side Diff: Source/WebKit/chromium/src/AssociatedURLLoader.cpp

Issue 9981003: Merge 112485 - AssociatedURLLoader does not support Cross Origin Redirects when using (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2010, 2011, 2012 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 virtual void didSendData(unsigned long long /*bytesSent*/, unsigned long lon g /*totalBytesToBeSent*/); 134 virtual void didSendData(unsigned long long /*bytesSent*/, unsigned long lon g /*totalBytesToBeSent*/);
135 virtual void willSendRequest(ResourceRequest& /*newRequest*/, const Resource Response& /*redirectResponse*/); 135 virtual void willSendRequest(ResourceRequest& /*newRequest*/, const Resource Response& /*redirectResponse*/);
136 136
137 virtual void didReceiveResponse(unsigned long, const ResourceResponse&); 137 virtual void didReceiveResponse(unsigned long, const ResourceResponse&);
138 virtual void didDownloadData(int /*dataLength*/); 138 virtual void didDownloadData(int /*dataLength*/);
139 virtual void didReceiveData(const char*, int /*dataLength*/); 139 virtual void didReceiveData(const char*, int /*dataLength*/);
140 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/); 140 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/);
141 virtual void didFinishLoading(unsigned long /*identifier*/, double /*finishT ime*/); 141 virtual void didFinishLoading(unsigned long /*identifier*/, double /*finishT ime*/);
142 virtual void didFail(const ResourceError&); 142 virtual void didFail(const ResourceError&);
143 virtual void didFailRedirectCheck();
143 144
144 virtual bool isDocumentThreadableLoaderClient() { return true; } 145 virtual bool isDocumentThreadableLoaderClient() { return true; }
145 146
146 // Sets an error to be reported back to the client, asychronously. 147 // Sets an error to be reported back to the client, asychronously.
147 void setDelayedError(const ResourceError&); 148 void setDelayedError(const ResourceError&);
148 149
149 // Enables forwarding of error notifications to the WebURLLoaderClient. Thes e must be 150 // Enables forwarding of error notifications to the WebURLLoaderClient. Thes e must be
150 // deferred until after the call to AssociatedURLLoader::loadAsynchronously( ) completes. 151 // deferred until after the call to AssociatedURLLoader::loadAsynchronously( ) completes.
151 void enableErrorNotifications(); 152 void enableErrorNotifications();
152 153
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 { 257 {
257 if (!m_client) 258 if (!m_client)
258 return; 259 return;
259 260
260 m_didFail = true; 261 m_didFail = true;
261 m_error = WebURLError(error); 262 m_error = WebURLError(error);
262 if (m_enableErrorNotifications) 263 if (m_enableErrorNotifications)
263 notifyError(&m_errorTimer); 264 notifyError(&m_errorTimer);
264 } 265 }
265 266
267 void AssociatedURLLoader::ClientAdapter::didFailRedirectCheck()
268 {
269 m_loader->cancel();
270 }
271
266 void AssociatedURLLoader::ClientAdapter::setDelayedError(const ResourceError& er ror) 272 void AssociatedURLLoader::ClientAdapter::setDelayedError(const ResourceError& er ror)
267 { 273 {
268 didFail(error); 274 didFail(error);
269 } 275 }
270 276
271 void AssociatedURLLoader::ClientAdapter::enableErrorNotifications() 277 void AssociatedURLLoader::ClientAdapter::enableErrorNotifications()
272 { 278 {
273 m_enableErrorNotifications = true; 279 m_enableErrorNotifications = true;
274 // If an error has already been received, start a timer to report it to the client 280 // If an error has already been received, start a timer to report it to the client
275 // after AssociatedURLLoader::loadAsynchronously has returned to the caller. 281 // after AssociatedURLLoader::loadAsynchronously has returned to the caller.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 m_loader->cancel(); 364 m_loader->cancel();
359 } 365 }
360 366
361 void AssociatedURLLoader::setDefersLoading(bool defersLoading) 367 void AssociatedURLLoader::setDefersLoading(bool defersLoading)
362 { 368 {
363 if (m_loader) 369 if (m_loader)
364 m_loader->setDefersLoading(defersLoading); 370 m_loader->setDefersLoading(defersLoading);
365 } 371 }
366 372
367 } // namespace WebKit 373 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698