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

Unified Diff: remoting/host/setup/daemon_controller_delegate_win.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix platform specific stuff Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/setup/daemon_controller_delegate_win.cc
diff --git a/remoting/host/setup/daemon_controller_delegate_win.cc b/remoting/host/setup/daemon_controller_delegate_win.cc
index 0dcae69204b9b79c0c95aa7d309ffa582e94d85f..1795110f202e5bfc3e06d8a3e93b109cd47e80d7 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);
Evan Stade 2015/05/12 16:40:12 caught a leak
+ base::JSONWriter::Write(*config, &config_str);
// Determine the config directory path and create it if necessary.
base::FilePath config_dir = remoting::GetConfigDir();
« no previous file with comments | « remoting/host/policy_watcher_unittest.cc ('k') | remoting/host/setup/me2me_native_messaging_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698