Cleanup: Move json.h into rtc namespace.

This should fix the TODO in that header.

BUG=None
TEST=ninja -C out/Debug still compiles everything.
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47919004

Patch from Thiago Farina <tfarina@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#8921}
This commit is contained in:
Thiago Farina
2015-04-02 09:59:15 +00:00
committed by Tommi
parent 0dd58026a8
commit cb76b89572
4 changed files with 23 additions and 9 deletions

View File

@@ -283,7 +283,7 @@ void Conductor::OnMessageFromPeer(int peer_id, const std::string& message) {
std::string type;
std::string json_object;
GetStringFromJsonObject(jmessage, kSessionDescriptionTypeName, &type);
rtc::GetStringFromJsonObject(jmessage, kSessionDescriptionTypeName, &type);
if (!type.empty()) {
if (type == "offer-loopback") {
// This is a loopback call.
@@ -297,7 +297,8 @@ void Conductor::OnMessageFromPeer(int peer_id, const std::string& message) {
}
std::string sdp;
if (!GetStringFromJsonObject(jmessage, kSessionDescriptionSdpName, &sdp)) {
if (!rtc::GetStringFromJsonObject(jmessage, kSessionDescriptionSdpName,
&sdp)) {
LOG(WARNING) << "Can't parse received session description message.";
return;
}
@@ -319,10 +320,11 @@ void Conductor::OnMessageFromPeer(int peer_id, const std::string& message) {
std::string sdp_mid;
int sdp_mlineindex = 0;
std::string sdp;
if (!GetStringFromJsonObject(jmessage, kCandidateSdpMidName, &sdp_mid) ||
!GetIntFromJsonObject(jmessage, kCandidateSdpMlineIndexName,
&sdp_mlineindex) ||
!GetStringFromJsonObject(jmessage, kCandidateSdpName, &sdp)) {
if (!rtc::GetStringFromJsonObject(jmessage, kCandidateSdpMidName,
&sdp_mid) ||
!rtc::GetIntFromJsonObject(jmessage, kCandidateSdpMlineIndexName,
&sdp_mlineindex) ||
!rtc::GetStringFromJsonObject(jmessage, kCandidateSdpName, &sdp)) {
LOG(WARNING) << "Can't parse received message.";
return;
}