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

Side by Side Diff: content/renderer/media/android/media_info_loader.cc

Issue 247573004: Always mark cross-origin as true for regular media urls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/media/android/media_info_loader.h" 5 #include "content/renderer/media/android/media_info_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/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "third_party/WebKit/public/platform/WebURLError.h" 10 #include "third_party/WebKit/public/platform/WebURLError.h"
(...skipping 12 matching lines...) Expand all
23 23
24 static const int kHttpOK = 200; 24 static const int kHttpOK = 200;
25 25
26 MediaInfoLoader::MediaInfoLoader( 26 MediaInfoLoader::MediaInfoLoader(
27 const GURL& url, 27 const GURL& url,
28 blink::WebMediaPlayer::CORSMode cors_mode, 28 blink::WebMediaPlayer::CORSMode cors_mode,
29 const ReadyCB& ready_cb) 29 const ReadyCB& ready_cb)
30 : loader_failed_(false), 30 : loader_failed_(false),
31 url_(url), 31 url_(url),
32 cors_mode_(cors_mode), 32 cors_mode_(cors_mode),
33 single_origin_(true), 33 // TODO(qinmin): The url might be redirected when android media player
34 // requests the stream. As a result, we cannot guarantee there is only
35 // a single origin. Set this back to true when b/12573548 is fixed.
scherkus (not reviewing) 2014/04/24 17:18:33 can we link to the crbug.com as well?
qinmin 2014/04/24 17:40:51 Done.
36 single_origin_(false),
34 ready_cb_(ready_cb) {} 37 ready_cb_(ready_cb) {}
35 38
36 MediaInfoLoader::~MediaInfoLoader() {} 39 MediaInfoLoader::~MediaInfoLoader() {}
37 40
38 void MediaInfoLoader::Start(blink::WebFrame* frame) { 41 void MediaInfoLoader::Start(blink::WebFrame* frame) {
39 // Make sure we have not started. 42 // Make sure we have not started.
40 DCHECK(!ready_cb_.is_null()); 43 DCHECK(!ready_cb_.is_null());
41 CHECK(frame); 44 CHECK(frame);
42 45
43 start_time_ = base::TimeTicks::Now(); 46 start_time_ = base::TimeTicks::Now();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 187
185 void MediaInfoLoader::DidBecomeReady(Status status) { 188 void MediaInfoLoader::DidBecomeReady(Status status) {
186 UMA_HISTOGRAM_TIMES("Media.InfoLoadDelay", 189 UMA_HISTOGRAM_TIMES("Media.InfoLoadDelay",
187 base::TimeTicks::Now() - start_time_); 190 base::TimeTicks::Now() - start_time_);
188 active_loader_.reset(); 191 active_loader_.reset();
189 if (!ready_cb_.is_null()) 192 if (!ready_cb_.is_null())
190 base::ResetAndReturn(&ready_cb_).Run(status); 193 base::ResetAndReturn(&ready_cb_).Run(status);
191 } 194 }
192 195
193 } // namespace content 196 } // namespace content
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