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

Side by Side Diff: remoting/host/setup/me2me_native_messaging_host.cc

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698