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

Side by Side Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 301933002: Changing default_url to destination_url for consistency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using DCHECK Created 6 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
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/webmediaplayer_impl.h" 5 #include "content/renderer/media/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 1092
1093 client_->keyError( 1093 client_->keyError(
1094 WebString::fromUTF8(GetPrefixedKeySystemName(current_key_system_)), 1094 WebString::fromUTF8(GetPrefixedKeySystemName(current_key_system_)),
1095 WebString::fromUTF8(session_id), 1095 WebString::fromUTF8(session_id),
1096 static_cast<blink::WebMediaPlayerClient::MediaKeyErrorCode>(error_code), 1096 static_cast<blink::WebMediaPlayerClient::MediaKeyErrorCode>(error_code),
1097 short_system_code); 1097 short_system_code);
1098 } 1098 }
1099 1099
1100 void WebMediaPlayerImpl::OnKeyMessage(const std::string& session_id, 1100 void WebMediaPlayerImpl::OnKeyMessage(const std::string& session_id,
1101 const std::vector<uint8>& message, 1101 const std::vector<uint8>& message,
1102 const std::string& default_url) { 1102 const GURL& destination_url) {
1103 DCHECK(main_loop_->BelongsToCurrentThread()); 1103 DCHECK(main_loop_->BelongsToCurrentThread());
1104 1104
1105 const GURL default_url_gurl(default_url); 1105 DCHECK(destination_url.is_empty() || destination_url.is_valid());
teravest 2014/06/02 14:25:34 This should be !destination_url.is_valid(), right?
AmoghBihani 2014/06/02 16:23:52 We want the URL to be either empty or valid. This
1106 DLOG_IF(WARNING, !default_url.empty() && !default_url_gurl.is_valid())
1107 << "Invalid URL in default_url: " << default_url;
1108 1106
1109 client_->keyMessage( 1107 client_->keyMessage(
1110 WebString::fromUTF8(GetPrefixedKeySystemName(current_key_system_)), 1108 WebString::fromUTF8(GetPrefixedKeySystemName(current_key_system_)),
1111 WebString::fromUTF8(session_id), 1109 WebString::fromUTF8(session_id),
1112 message.empty() ? NULL : &message[0], 1110 message.empty() ? NULL : &message[0],
1113 message.size(), 1111 message.size(),
1114 default_url_gurl); 1112 destination_url);
1115 } 1113 }
1116 1114
1117 void WebMediaPlayerImpl::DataSourceInitialized(const GURL& gurl, bool success) { 1115 void WebMediaPlayerImpl::DataSourceInitialized(const GURL& gurl, bool success) {
1118 DCHECK(main_loop_->BelongsToCurrentThread()); 1116 DCHECK(main_loop_->BelongsToCurrentThread());
1119 1117
1120 if (!success) { 1118 if (!success) {
1121 SetNetworkState(WebMediaPlayer::NetworkStateFormatError); 1119 SetNetworkState(WebMediaPlayer::NetworkStateFormatError);
1122 1120
1123 // TODO(scherkus): This should be handled by HTMLMediaElement and controls 1121 // TODO(scherkus): This should be handled by HTMLMediaElement and controls
1124 // should know when to invalidate themselves http://crbug.com/337015 1122 // should know when to invalidate themselves http://crbug.com/337015
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 compositor_task_runner_->PostTask(FROM_HERE, 1373 compositor_task_runner_->PostTask(FROM_HERE,
1376 base::Bind(&GetCurrentFrameAndSignal, 1374 base::Bind(&GetCurrentFrameAndSignal,
1377 base::Unretained(compositor_), 1375 base::Unretained(compositor_),
1378 &video_frame, 1376 &video_frame,
1379 &event)); 1377 &event));
1380 event.Wait(); 1378 event.Wait();
1381 return video_frame; 1379 return video_frame;
1382 } 1380 }
1383 1381
1384 } // namespace content 1382 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.h ('k') | content/renderer/pepper/content_decryptor_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698