summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
Diffstat (limited to 'remoting')
-rw-r--r--remoting/base/vlog_net_log.cc2
-rw-r--r--remoting/client/plugin/chromoting_instance.cc8
-rw-r--r--remoting/host/cast_extension_session.cc20
-rw-r--r--remoting/host/gnubby_auth_handler_posix.cc2
-rw-r--r--remoting/host/host_config.cc2
-rw-r--r--remoting/host/it2me/it2me_native_messaging_host.cc2
-rw-r--r--remoting/host/it2me/it2me_native_messaging_host_unittest.cc2
-rw-r--r--remoting/host/native_messaging/native_messaging_pipe.cc2
-rw-r--r--remoting/host/native_messaging/native_messaging_writer.cc2
-rw-r--r--remoting/host/policy_watcher_unittest.cc4
-rw-r--r--remoting/host/setup/daemon_controller_delegate_win.cc6
-rw-r--r--remoting/host/setup/me2me_native_messaging_host_unittest.cc2
-rw-r--r--remoting/host/setup/service_client.cc2
-rw-r--r--remoting/host/token_validator_factory_impl_unittest.cc4
-rw-r--r--remoting/host/video_frame_recorder_host_extension.cc2
15 files changed, 31 insertions, 31 deletions
diff --git a/remoting/base/vlog_net_log.cc b/remoting/base/vlog_net_log.cc
index 39a388a..bfcea02 100644
--- a/remoting/base/vlog_net_log.cc
+++ b/remoting/base/vlog_net_log.cc
@@ -35,7 +35,7 @@ void VlogNetLog::Observer::OnAddEntry(const net::NetLog::Entry& entry) {
if (VLOG_IS_ON(4)) {
scoped_ptr<base::Value> value(entry.ToValue());
std::string json;
- base::JSONWriter::Write(value.get(), &json);
+ base::JSONWriter::Write(*value, &json);
VLOG(4) << json;
}
}
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 3faab96..a3544aa 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -1016,12 +1016,12 @@ void ChromotingInstance::PostChromotingMessage(const std::string& method,
void ChromotingInstance::PostLegacyJsonMessage(
const std::string& method,
scoped_ptr<base::DictionaryValue> data) {
- scoped_ptr<base::DictionaryValue> message(new base::DictionaryValue());
- message->SetString("method", method);
- message->Set("data", data.release());
+ base::DictionaryValue message;
+ message.SetString("method", method);
+ message.Set("data", data.release());
std::string message_json;
- base::JSONWriter::Write(message.get(), &message_json);
+ base::JSONWriter::Write(message, &message_json);
PostMessage(pp::Var(message_json));
}
diff --git a/remoting/host/cast_extension_session.cc b/remoting/host/cast_extension_session.cc
index 9bceaa6..843a79d 100644
--- a/remoting/host/cast_extension_session.cc
+++ b/remoting/host/cast_extension_session.cc
@@ -202,15 +202,15 @@ void CastExtensionSession::OnCreateSessionDescription(
peer_connection_->SetLocalDescription(
CastSetSessionDescriptionObserver::Create(), desc);
- scoped_ptr<base::DictionaryValue> json(new base::DictionaryValue());
- json->SetString(kWebRtcSessionDescType, desc->type());
+ base::DictionaryValue json;
+ json.SetString(kWebRtcSessionDescType, desc->type());
std::string subject =
(desc->type() == "offer") ? kSubjectOffer : kSubjectAnswer;
std::string desc_str;
desc->ToString(&desc_str);
- json->SetString(kWebRtcSessionDescSDP, desc_str);
+ json.SetString(kWebRtcSessionDescSDP, desc_str);
std::string json_str;
- if (!base::JSONWriter::Write(json.get(), &json_str)) {
+ if (!base::JSONWriter::Write(json, &json_str)) {
LOG(ERROR) << "Failed to serialize sdp message.";
return;
}
@@ -420,7 +420,7 @@ bool CastExtensionSession::SendMessageToClient(const std::string& subject,
message_dict.SetString(kTopLevelData, data);
std::string message_json;
- if (!base::JSONWriter::Write(&message_dict, &message_json)) {
+ if (!base::JSONWriter::Write(message_dict, &message_json)) {
LOG(ERROR) << "Failed to serialize JSON message.";
return false;
}
@@ -647,12 +647,12 @@ void CastExtensionSession::OnIceCandidate(
LOG(ERROR) << "PeerConnectionObserver: failed to serialize candidate.";
return;
}
- scoped_ptr<base::DictionaryValue> json(new base::DictionaryValue());
- json->SetString(kWebRtcSDPMid, candidate->sdp_mid());
- json->SetInteger(kWebRtcSDPMLineIndex, candidate->sdp_mline_index());
- json->SetString(kWebRtcCandidate, candidate_str);
+ base::DictionaryValue json;
+ json.SetString(kWebRtcSDPMid, candidate->sdp_mid());
+ json.SetInteger(kWebRtcSDPMLineIndex, candidate->sdp_mline_index());
+ json.SetString(kWebRtcCandidate, candidate_str);
std::string json_str;
- if (!base::JSONWriter::Write(json.get(), &json_str)) {
+ if (!base::JSONWriter::Write(json, &json_str)) {
LOG(ERROR) << "Failed to serialize candidate message.";
return;
}
diff --git a/remoting/host/gnubby_auth_handler_posix.cc b/remoting/host/gnubby_auth_handler_posix.cc
index 13c8f41..4639f01 100644
--- a/remoting/host/gnubby_auth_handler_posix.cc
+++ b/remoting/host/gnubby_auth_handler_posix.cc
@@ -174,7 +174,7 @@ void GnubbyAuthHandlerPosix::DeliverHostDataMessage(
request.Set(kDataPayload, bytes);
std::string request_json;
- if (!base::JSONWriter::Write(&request, &request_json)) {
+ if (!base::JSONWriter::Write(request, &request_json)) {
LOG(ERROR) << "Failed to create request json";
return;
}
diff --git a/remoting/host/host_config.cc b/remoting/host/host_config.cc
index 40ae940..2250d6f 100644
--- a/remoting/host/host_config.cc
+++ b/remoting/host/host_config.cc
@@ -28,7 +28,7 @@ scoped_ptr<base::DictionaryValue> HostConfigFromJson(
std::string HostConfigToJson(const base::DictionaryValue& host_config) {
std::string data;
- base::JSONWriter::Write(&host_config, &data);
+ base::JSONWriter::Write(host_config, &data);
return data;
}
diff --git a/remoting/host/it2me/it2me_native_messaging_host.cc b/remoting/host/it2me/it2me_native_messaging_host.cc
index 7af2db74..441224e 100644
--- a/remoting/host/it2me/it2me_native_messaging_host.cc
+++ b/remoting/host/it2me/it2me_native_messaging_host.cc
@@ -121,7 +121,7 @@ void It2MeNativeMessagingHost::SendMessageToClient(
scoped_ptr<base::DictionaryValue> message) const {
DCHECK(task_runner()->BelongsToCurrentThread());
std::string message_json;
- base::JSONWriter::Write(message.get(), &message_json);
+ base::JSONWriter::Write(*message, &message_json);
client_->PostMessageFromNativeHost(message_json);
}
diff --git a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
index a6c6724..cfe66bb 100644
--- a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
+++ b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
@@ -291,7 +291,7 @@ It2MeNativeMessagingHostTest::ReadMessageFromOutputPipe() {
void It2MeNativeMessagingHostTest::WriteMessageToInputPipe(
const base::Value& message) {
std::string message_json;
- base::JSONWriter::Write(&message, &message_json);
+ base::JSONWriter::Write(message, &message_json);
uint32 length = message_json.length();
input_write_file_.WriteAtCurrentPos(reinterpret_cast<char*>(&length),
diff --git a/remoting/host/native_messaging/native_messaging_pipe.cc b/remoting/host/native_messaging/native_messaging_pipe.cc
index 8521472..da204d1 100644
--- a/remoting/host/native_messaging/native_messaging_pipe.cc
+++ b/remoting/host/native_messaging/native_messaging_pipe.cc
@@ -27,7 +27,7 @@ void NativeMessagingPipe::Start(
void NativeMessagingPipe::OnMessage(scoped_ptr<base::Value> message) {
std::string message_json;
- base::JSONWriter::Write(message.get(), &message_json);
+ base::JSONWriter::Write(*message, &message_json);
host_->OnMessage(message_json);
}
diff --git a/remoting/host/native_messaging/native_messaging_writer.cc b/remoting/host/native_messaging/native_messaging_writer.cc
index 3266fdb7..030cfd3 100644
--- a/remoting/host/native_messaging/native_messaging_writer.cc
+++ b/remoting/host/native_messaging/native_messaging_writer.cc
@@ -44,7 +44,7 @@ bool NativeMessagingWriter::WriteMessage(const base::Value& message) {
}
std::string message_json;
- base::JSONWriter::Write(&message, &message_json);
+ base::JSONWriter::Write(message, &message_json);
CHECK_LE(message_json.length(), kMaximumMessageSize);
diff --git a/remoting/host/policy_watcher_unittest.cc b/remoting/host/policy_watcher_unittest.cc
index 1d683cb..b9cbefd 100644
--- a/remoting/host/policy_watcher_unittest.cc
+++ b/remoting/host/policy_watcher_unittest.cc
@@ -27,11 +27,11 @@ MATCHER_P(IsPolicies, dict, "") {
if (!equal) {
std::string actual_value;
base::JSONWriter::WriteWithOptions(
- arg, base::JSONWriter::OPTIONS_PRETTY_PRINT, &actual_value);
+ *arg, base::JSONWriter::OPTIONS_PRETTY_PRINT, &actual_value);
std::string expected_value;
base::JSONWriter::WriteWithOptions(
- dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &expected_value);
+ *dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &expected_value);
*result_listener << "Policies are not equal. ";
*result_listener << "Expected policy: " << expected_value << ". ";
diff --git a/remoting/host/setup/daemon_controller_delegate_win.cc b/remoting/host/setup/daemon_controller_delegate_win.cc
index 0dcae69..1795110 100644
--- a/remoting/host/setup/daemon_controller_delegate_win.cc
+++ b/remoting/host/setup/daemon_controller_delegate_win.cc
@@ -186,7 +186,7 @@ bool WriteConfig(const std::string& content) {
}
}
std::string unprivileged_config_str;
- base::JSONWriter::Write(&unprivileged_config_dict, &unprivileged_config_str);
+ base::JSONWriter::Write(unprivileged_config_dict, &unprivileged_config_str);
// Write the full configuration file to a temporary location.
base::FilePath full_config_file_path =
@@ -413,7 +413,7 @@ void DaemonControllerDelegateWin::UpdateConfig(
// Write the updated config.
std::string config_updated_str;
- base::JSONWriter::Write(config_old.get(), &config_updated_str);
+ base::JSONWriter::Write(*config_old, &config_updated_str);
bool result = WriteConfig(config_updated_str);
InvokeCompletionCallback(done, result);
@@ -458,7 +458,7 @@ void DaemonControllerDelegateWin::SetConfigAndStart(
// Set the configuration.
std::string config_str;
- base::JSONWriter::Write(config.release(), &config_str);
+ base::JSONWriter::Write(*config, &config_str);
// Determine the config directory path and create it if necessary.
base::FilePath config_dir = remoting::GetConfigDir();
diff --git a/remoting/host/setup/me2me_native_messaging_host_unittest.cc b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
index bdd6daf..b44c2bd 100644
--- a/remoting/host/setup/me2me_native_messaging_host_unittest.cc
+++ b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
@@ -409,7 +409,7 @@ Me2MeNativeMessagingHostTest::ReadMessageFromOutputPipe() {
void Me2MeNativeMessagingHostTest::WriteMessageToInputPipe(
const base::Value& message) {
std::string message_json;
- base::JSONWriter::Write(&message, &message_json);
+ base::JSONWriter::Write(message, &message_json);
uint32 length = message_json.length();
input_write_file_.WriteAtCurrentPos(reinterpret_cast<char*>(&length),
diff --git a/remoting/host/setup/service_client.cc b/remoting/host/setup/service_client.cc
index 260f762..f99f6a6 100644
--- a/remoting/host/setup/service_client.cc
+++ b/remoting/host/setup/service_client.cc
@@ -83,7 +83,7 @@ void ServiceClient::Core::RegisterHost(
if (!host_client_id.empty())
url_suffix = "?hostClientId=" + host_client_id;
std::string post_body_str;
- base::JSONWriter::Write(&post_body, &post_body_str);
+ base::JSONWriter::Write(post_body, &post_body_str);
MakeChromotingRequest(net::URLFetcher::POST,
url_suffix,
post_body_str,
diff --git a/remoting/host/token_validator_factory_impl_unittest.cc b/remoting/host/token_validator_factory_impl_unittest.cc
index bfbed9f..aa5a024 100644
--- a/remoting/host/token_validator_factory_impl_unittest.cc
+++ b/remoting/host/token_validator_factory_impl_unittest.cc
@@ -108,7 +108,7 @@ class TokenValidatorFactoryImplTest : public testing::Test {
response_dict.SetString("token_type", "shared_secret");
response_dict.SetString("scope", scope);
std::string response;
- base::JSONWriter::Write(&response_dict, &response);
+ base::JSONWriter::Write(response_dict, &response);
return response;
}
@@ -116,7 +116,7 @@ class TokenValidatorFactoryImplTest : public testing::Test {
base::DictionaryValue response_dict;
response_dict.SetString("error", error);
std::string response;
- base::JSONWriter::Write(&response_dict, &response);
+ base::JSONWriter::Write(response_dict, &response);
return response;
}
diff --git a/remoting/host/video_frame_recorder_host_extension.cc b/remoting/host/video_frame_recorder_host_extension.cc
index 61bd746..efa110e 100644
--- a/remoting/host/video_frame_recorder_host_extension.cc
+++ b/remoting/host/video_frame_recorder_host_extension.cc
@@ -159,7 +159,7 @@ void VideoFrameRecorderHostExtensionSession::OnNextFrame(
// Note that JSONWriter::Write() can only fail due to invalid inputs, and will
// DCHECK in Debug builds in that case.
std::string reply_json;
- if (!base::JSONWriter::Write(&reply_message, &reply_json)) {
+ if (!base::JSONWriter::Write(reply_message, &reply_json)) {
return;
}