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

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

Issue 405011: Use an explicit boolean has_new_first_party_for_cookies instead... (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
« no previous file with comments | « webkit/glue/media/buffered_data_source.h ('k') | webkit/glue/media/simple_data_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool* has_new_first_party_for_cookies,
234 GURL* new_first_party_for_cookies) { 235 GURL* new_first_party_for_cookies) {
235 DCHECK(bridge_.get()); 236 DCHECK(bridge_.get());
236 237
237 // Save the new URL. 238 // Save the new URL.
238 url_ = new_url; 239 url_ = new_url;
239 *new_first_party_for_cookies = GURL(); 240 // TODO(wtc): should we return a new first party for cookies URL?
241 *has_new_first_party_for_cookies = false;
240 242
241 // The load may have been stopped and |start_callback| is destroyed. 243 // The load may have been stopped and |start_callback| is destroyed.
242 // In this case we shouldn't do anything. 244 // In this case we shouldn't do anything.
243 if (!start_callback_.get()) 245 if (!start_callback_.get())
244 return true; 246 return true;
245 247
246 if (!IsProtocolSupportedForMedia(new_url)) { 248 if (!IsProtocolSupportedForMedia(new_url)) {
247 DoneStart(net::ERR_ADDRESS_INVALID); 249 DoneStart(net::ERR_ADDRESS_INVALID);
248 Stop(); 250 Stop();
249 return false; 251 return false;
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 return; 996 return;
995 997
996 if (network_activity != network_activity_) { 998 if (network_activity != network_activity_) {
997 network_activity_ = network_activity; 999 network_activity_ = network_activity;
998 host()->SetNetworkActivity(network_activity); 1000 host()->SetNetworkActivity(network_activity);
999 } 1001 }
1000 host()->SetBufferedBytes(buffered_last_byte_position + 1); 1002 host()->SetBufferedBytes(buffered_last_byte_position + 1);
1001 } 1003 }
1002 1004
1003 } // namespace webkit_glue 1005 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/media/buffered_data_source.h ('k') | webkit/glue/media/simple_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698