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

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

Issue 143303007: Enable pairing registry in me2me native messaging host on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pairing
Patch Set: Created 6 years, 10 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 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 daemon_controller_->GetConfig( 282 daemon_controller_->GetConfig(
283 base::Bind(&Me2MeNativeMessagingHost::SendConfigResponse, weak_ptr_, 283 base::Bind(&Me2MeNativeMessagingHost::SendConfigResponse, weak_ptr_,
284 base::Passed(&response))); 284 base::Passed(&response)));
285 } 285 }
286 286
287 void Me2MeNativeMessagingHost::ProcessGetPairedClients( 287 void Me2MeNativeMessagingHost::ProcessGetPairedClients(
288 scoped_ptr<base::DictionaryValue> message, 288 scoped_ptr<base::DictionaryValue> message,
289 scoped_ptr<base::DictionaryValue> response) { 289 scoped_ptr<base::DictionaryValue> response) {
290 DCHECK(thread_checker_.CalledOnValidThread()); 290 DCHECK(thread_checker_.CalledOnValidThread());
291 291
292 if (needs_elevation_) {
293 DelegateToElevatedHost(message.Pass(), response.Pass());
294 return;
295 }
296
297 if (pairing_registry_) { 292 if (pairing_registry_) {
298 pairing_registry_->GetAllPairings( 293 pairing_registry_->GetAllPairings(
299 base::Bind(&Me2MeNativeMessagingHost::SendPairedClientsResponse, 294 base::Bind(&Me2MeNativeMessagingHost::SendPairedClientsResponse,
300 weak_ptr_, base::Passed(&response))); 295 weak_ptr_, base::Passed(&response)));
301 } else { 296 } else {
302 scoped_ptr<base::ListValue> no_paired_clients(new base::ListValue); 297 scoped_ptr<base::ListValue> no_paired_clients(new base::ListValue);
303 SendPairedClientsResponse(response.Pass(), no_paired_clients.Pass()); 298 SendPairedClientsResponse(response.Pass(), no_paired_clients.Pass());
304 } 299 }
305 } 300 }
306 301
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 667
673 void Me2MeNativeMessagingHost::DelegateToElevatedHost( 668 void Me2MeNativeMessagingHost::DelegateToElevatedHost(
674 scoped_ptr<base::DictionaryValue> message, 669 scoped_ptr<base::DictionaryValue> message,
675 scoped_ptr<base::DictionaryValue> response) { 670 scoped_ptr<base::DictionaryValue> response) {
676 NOTREACHED(); 671 NOTREACHED();
677 } 672 }
678 673
679 #endif // !defined(OS_WIN) 674 #endif // !defined(OS_WIN)
680 675
681 } // namespace remoting 676 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698