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

Side by Side Diff: webkit/media/buffered_resource_loader.cc

Issue 10554014: Request all response headers be exposed to BufferedResourceLoader since it needs them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/media/buffered_resource_loader.h" 5 #include "webkit/media/buffered_resource_loader.h"
6 6
7 #include "base/bits.h" 7 #include "base/bits.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 scoped_ptr<WebURLLoader> loader; 184 scoped_ptr<WebURLLoader> loader;
185 if (test_loader_.get()) { 185 if (test_loader_.get()) {
186 loader = test_loader_.Pass(); 186 loader = test_loader_.Pass();
187 } else { 187 } else {
188 WebURLLoaderOptions options; 188 WebURLLoaderOptions options;
189 if (cors_mode_ == kUnspecified) { 189 if (cors_mode_ == kUnspecified) {
190 options.allowCredentials = true; 190 options.allowCredentials = true;
191 options.crossOriginRequestPolicy = 191 options.crossOriginRequestPolicy =
192 WebURLLoaderOptions::CrossOriginRequestPolicyAllow; 192 WebURLLoaderOptions::CrossOriginRequestPolicyAllow;
193 } else { 193 } else {
194 options.exposeAllResponseHeaders = true;
194 options.crossOriginRequestPolicy = 195 options.crossOriginRequestPolicy =
195 WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl; 196 WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl;
196 if (cors_mode_ == kUseCredentials) 197 if (cors_mode_ == kUseCredentials)
197 options.allowCredentials = true; 198 options.allowCredentials = true;
198 } 199 }
199 loader.reset(frame->createAssociatedURLLoader(options)); 200 loader.reset(frame->createAssociatedURLLoader(options));
200 } 201 }
201 202
202 // Start the resource loading. 203 // Start the resource loading.
203 loader->loadAsynchronously(request, this); 204 loader->loadAsynchronously(request, this);
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 855
855 void BufferedResourceLoader::Log() { 856 void BufferedResourceLoader::Log() {
856 media_log_->AddEvent( 857 media_log_->AddEvent(
857 media_log_->CreateBufferedExtentsChangedEvent( 858 media_log_->CreateBufferedExtentsChangedEvent(
858 offset_ - buffer_.backward_bytes(), 859 offset_ - buffer_.backward_bytes(),
859 offset_, 860 offset_,
860 offset_ + buffer_.forward_bytes())); 861 offset_ + buffer_.forward_bytes()));
861 } 862 }
862 863
863 } // namespace webkit_media 864 } // namespace webkit_media
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