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

Side by Side Diff: webkit/glue/media/buffered_data_source.cc

Issue 385024: Propagate the "first party for cookies" from WebKit through the resource... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/stl_util-inl.h" 8 #include "base/stl_util-inl.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/common/extensions/url_pattern.h" 10 #include "chrome/common/extensions/url_pattern.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (buffer_.get()) 223 if (buffer_.get())
224 return offset_ + static_cast<int>(buffer_->forward_bytes()) - 1; 224 return offset_ + static_cast<int>(buffer_->forward_bytes()) - 1;
225 return kPositionNotSpecified; 225 return kPositionNotSpecified;
226 } 226 }
227 227
228 ///////////////////////////////////////////////////////////////////////////// 228 /////////////////////////////////////////////////////////////////////////////
229 // BufferedResourceLoader, 229 // BufferedResourceLoader,
230 // webkit_glue::ResourceLoaderBridge::Peer implementations 230 // webkit_glue::ResourceLoaderBridge::Peer implementations
231 bool BufferedResourceLoader::OnReceivedRedirect( 231 bool BufferedResourceLoader::OnReceivedRedirect(
232 const GURL& new_url, 232 const GURL& new_url,
233 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info) { 233 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info,
234 GURL* new_first_party_for_cookies) {
234 DCHECK(bridge_.get()); 235 DCHECK(bridge_.get());
235 236
236 // Save the new URL. 237 // Save the new URL.
237 url_ = new_url; 238 url_ = new_url;
239 *new_first_party_for_cookies = GURL();
238 240
239 // The load may have been stopped and |start_callback| is destroyed. 241 // The load may have been stopped and |start_callback| is destroyed.
240 // In this case we shouldn't do anything. 242 // In this case we shouldn't do anything.
241 if (!start_callback_.get()) 243 if (!start_callback_.get())
242 return true; 244 return true;
243 245
244 if (!IsProtocolSupportedForMedia(new_url)) { 246 if (!IsProtocolSupportedForMedia(new_url)) {
245 DoneStart(net::ERR_ADDRESS_INVALID); 247 DoneStart(net::ERR_ADDRESS_INVALID);
246 Stop(); 248 Stop();
247 return false; 249 return false;
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 return; 994 return;
993 995
994 if (network_activity != network_activity_) { 996 if (network_activity != network_activity_) {
995 network_activity_ = network_activity; 997 network_activity_ = network_activity;
996 host()->SetNetworkActivity(network_activity); 998 host()->SetNetworkActivity(network_activity);
997 } 999 }
998 host()->SetBufferedBytes(buffered_last_byte_position + 1); 1000 host()->SetBufferedBytes(buffered_last_byte_position + 1);
999 } 1001 }
1000 1002
1001 } // namespace webkit_glue 1003 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698