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

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

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 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 "content/renderer/media/rtc_data_channel_handler.h" 5 #include "content/renderer/media/rtc_data_channel_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 void RtcDataChannelHandler::OnMessage(const webrtc::DataBuffer& buffer) { 114 void RtcDataChannelHandler::OnMessage(const webrtc::DataBuffer& buffer) {
115 if (!webkit_client_) { 115 if (!webkit_client_) {
116 LOG(ERROR) << "WebRTCDataChannelHandlerClient not set."; 116 LOG(ERROR) << "WebRTCDataChannelHandlerClient not set.";
117 return; 117 return;
118 } 118 }
119 119
120 if (buffer.binary) { 120 if (buffer.binary) {
121 webkit_client_->didReceiveRawData(buffer.data.data(), buffer.data.length()); 121 webkit_client_->didReceiveRawData(buffer.data.data(), buffer.data.length());
122 } else { 122 } else {
123 string16 utf16; 123 base::string16 utf16;
124 if (!UTF8ToUTF16(buffer.data.data(), buffer.data.length(), &utf16)) { 124 if (!UTF8ToUTF16(buffer.data.data(), buffer.data.length(), &utf16)) {
125 LOG(ERROR) << "Failed convert received data to UTF16"; 125 LOG(ERROR) << "Failed convert received data to UTF16";
126 return; 126 return;
127 } 127 }
128 webkit_client_->didReceiveStringData(utf16); 128 webkit_client_->didReceiveStringData(utf16);
129 } 129 }
130 } 130 }
131 131
132 } // namespace content 132 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/midi_dispatcher.cc ('k') | content/renderer/media/webcontentdecryptionmodule_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698