OLD | NEW |
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/setup/me2me_native_messaging_host.h" | 5 #include "remoting/host/setup/me2me_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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 channel_->SendMessage(std::move(response)); | 254 channel_->SendMessage(std::move(response)); |
255 } | 255 } |
256 | 256 |
257 void Me2MeNativeMessagingHost::ProcessGetPinHash( | 257 void Me2MeNativeMessagingHost::ProcessGetPinHash( |
258 scoped_ptr<base::DictionaryValue> message, | 258 scoped_ptr<base::DictionaryValue> message, |
259 scoped_ptr<base::DictionaryValue> response) { | 259 scoped_ptr<base::DictionaryValue> response) { |
260 DCHECK(thread_checker_.CalledOnValidThread()); | 260 DCHECK(thread_checker_.CalledOnValidThread()); |
261 | 261 |
262 std::string host_id; | 262 std::string host_id; |
263 if (!message->GetString("hostId", &host_id)) { | 263 if (!message->GetString("hostId", &host_id)) { |
264 LOG(ERROR) << "'hostId' not found: " << message; | 264 LOG(ERROR) << "'hostId' not found: " << message.get(); |
265 OnError(); | 265 OnError(); |
266 return; | 266 return; |
267 } | 267 } |
268 std::string pin; | 268 std::string pin; |
269 if (!message->GetString("pin", &pin)) { | 269 if (!message->GetString("pin", &pin)) { |
270 LOG(ERROR) << "'pin' not found: " << message; | 270 LOG(ERROR) << "'pin' not found: " << message.get(); |
271 OnError(); | 271 OnError(); |
272 return; | 272 return; |
273 } | 273 } |
274 response->SetString("hash", MakeHostPinHash(host_id, pin)); | 274 response->SetString("hash", MakeHostPinHash(host_id, pin)); |
275 channel_->SendMessage(std::move(response)); | 275 channel_->SendMessage(std::move(response)); |
276 } | 276 } |
277 | 277 |
278 void Me2MeNativeMessagingHost::ProcessGenerateKeyPair( | 278 void Me2MeNativeMessagingHost::ProcessGenerateKeyPair( |
279 scoped_ptr<base::DictionaryValue> message, | 279 scoped_ptr<base::DictionaryValue> message, |
280 scoped_ptr<base::DictionaryValue> response) { | 280 scoped_ptr<base::DictionaryValue> response) { |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 | 745 |
746 bool Me2MeNativeMessagingHost::DelegateToElevatedHost( | 746 bool Me2MeNativeMessagingHost::DelegateToElevatedHost( |
747 scoped_ptr<base::DictionaryValue> message) { | 747 scoped_ptr<base::DictionaryValue> message) { |
748 NOTREACHED(); | 748 NOTREACHED(); |
749 return false; | 749 return false; |
750 } | 750 } |
751 | 751 |
752 #endif // !defined(OS_WIN) | 752 #endif // !defined(OS_WIN) |
753 | 753 |
754 } // namespace remoting | 754 } // namespace remoting |
OLD | NEW |