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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 switch (result) { | 498 switch (result) { |
499 case DaemonController::RESULT_OK: | 499 case DaemonController::RESULT_OK: |
500 response->SetString("result", "OK"); | 500 response->SetString("result", "OK"); |
501 break; | 501 break; |
502 case DaemonController::RESULT_FAILED: | 502 case DaemonController::RESULT_FAILED: |
503 response->SetString("result", "FAILED"); | 503 response->SetString("result", "FAILED"); |
504 break; | 504 break; |
505 case DaemonController::RESULT_CANCELLED: | 505 case DaemonController::RESULT_CANCELLED: |
506 response->SetString("result", "CANCELLED"); | 506 response->SetString("result", "CANCELLED"); |
507 break; | 507 break; |
508 case DaemonController::RESULT_FAILED_DIRECTORY: | |
509 response->SetString("result", "FAILED_DIRECTORY"); | |
510 break; | |
511 } | 508 } |
512 channel_->SendMessage(std::move(response)); | 509 channel_->SendMessage(std::move(response)); |
513 } | 510 } |
514 | 511 |
515 void Me2MeNativeMessagingHost::SendBooleanResult( | 512 void Me2MeNativeMessagingHost::SendBooleanResult( |
516 scoped_ptr<base::DictionaryValue> response, bool result) { | 513 scoped_ptr<base::DictionaryValue> response, bool result) { |
517 DCHECK(thread_checker_.CalledOnValidThread()); | 514 DCHECK(thread_checker_.CalledOnValidThread()); |
518 | 515 |
519 response->SetBoolean("result", result); | 516 response->SetBoolean("result", result); |
520 channel_->SendMessage(std::move(response)); | 517 channel_->SendMessage(std::move(response)); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 | 742 |
746 bool Me2MeNativeMessagingHost::DelegateToElevatedHost( | 743 bool Me2MeNativeMessagingHost::DelegateToElevatedHost( |
747 scoped_ptr<base::DictionaryValue> message) { | 744 scoped_ptr<base::DictionaryValue> message) { |
748 NOTREACHED(); | 745 NOTREACHED(); |
749 return false; | 746 return false; |
750 } | 747 } |
751 | 748 |
752 #endif // !defined(OS_WIN) | 749 #endif // !defined(OS_WIN) |
753 | 750 |
754 } // namespace remoting | 751 } // namespace remoting |
OLD | NEW |