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

Side by Side Diff: remoting/host/it2me/it2me_native_messaging_host.cc

Issue 1945443002: Convert callers of base::DeepCopy() to base::CreateDeepCopy() in //remoting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 3 more Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/host/policy_watcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "remoting/host/it2me/it2me_native_messaging_host.h" 5 #include "remoting/host/it2me/it2me_native_messaging_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return; 80 return;
81 } 81 }
82 82
83 std::unique_ptr<base::DictionaryValue> message_dict( 83 std::unique_ptr<base::DictionaryValue> message_dict(
84 static_cast<base::DictionaryValue*>(message_value.release())); 84 static_cast<base::DictionaryValue*>(message_value.release()));
85 85
86 // If the client supplies an ID, it will expect it in the response. This 86 // If the client supplies an ID, it will expect it in the response. This
87 // might be a string or a number, so cope with both. 87 // might be a string or a number, so cope with both.
88 const base::Value* id; 88 const base::Value* id;
89 if (message_dict->Get("id", &id)) 89 if (message_dict->Get("id", &id))
90 response->Set("id", id->DeepCopy()); 90 response->Set("id", id->CreateDeepCopy());
91 91
92 std::string type; 92 std::string type;
93 if (!message_dict->GetString("type", &type)) { 93 if (!message_dict->GetString("type", &type)) {
94 SendErrorAndExit(std::move(response), "'type' not found in request."); 94 SendErrorAndExit(std::move(response), "'type' not found in request.");
95 return; 95 return;
96 } 96 }
97 97
98 response->SetString("type", type + "Response"); 98 response->SetString("type", type + "Response");
99 99
100 if (type == "hello") { 100 if (type == "hello") {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 return host_context_->ui_task_runner(); 321 return host_context_->ui_task_runner();
322 } 322 }
323 323
324 /* static */ 324 /* static */
325 std::string It2MeNativeMessagingHost::HostStateToString( 325 std::string It2MeNativeMessagingHost::HostStateToString(
326 It2MeHostState host_state) { 326 It2MeHostState host_state) {
327 return ValueToName(kIt2MeHostStates, host_state); 327 return ValueToName(kIt2MeHostStates, host_state);
328 } 328 }
329 329
330 } // namespace remoting 330 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/policy_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698