| 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/it2me/it2me_native_messaging_host.h" | 5 #include "remoting/host/it2me/it2me_native_messaging_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 class MockIt2MeHost : public It2MeHost { | 69 class MockIt2MeHost : public It2MeHost { |
| 70 public: | 70 public: |
| 71 MockIt2MeHost(scoped_ptr<ChromotingHostContext> context, | 71 MockIt2MeHost(scoped_ptr<ChromotingHostContext> context, |
| 72 scoped_ptr<policy_hack::PolicyWatcher> policy_watcher, | 72 scoped_ptr<policy_hack::PolicyWatcher> policy_watcher, |
| 73 base::WeakPtr<It2MeHost::Observer> observer, | 73 base::WeakPtr<It2MeHost::Observer> observer, |
| 74 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, | 74 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
| 75 const std::string& directory_bot_jid) | 75 const std::string& directory_bot_jid) |
| 76 : It2MeHost(context.Pass(), | 76 : It2MeHost(context.Pass(), |
| 77 policy_watcher.Pass(), | 77 policy_watcher.Pass(), |
| 78 nullptr, |
| 78 observer, | 79 observer, |
| 79 xmpp_server_config, | 80 xmpp_server_config, |
| 80 directory_bot_jid) {} | 81 directory_bot_jid) {} |
| 81 | 82 |
| 82 // It2MeHost overrides | 83 // It2MeHost overrides |
| 83 void Connect() override; | 84 void Connect() override; |
| 84 void Disconnect() override; | 85 void Disconnect() override; |
| 85 void RequestNatPolicy() override; | 86 void RequestNatPolicy() override; |
| 86 | 87 |
| 87 private: | 88 private: |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 | 553 |
| 553 // Verify rejection if type is unrecognized. | 554 // Verify rejection if type is unrecognized. |
| 554 TEST_F(It2MeNativeMessagingHostTest, InvalidType) { | 555 TEST_F(It2MeNativeMessagingHostTest, InvalidType) { |
| 555 base::DictionaryValue message; | 556 base::DictionaryValue message; |
| 556 message.SetString("type", "xxx"); | 557 message.SetString("type", "xxx"); |
| 557 TestBadRequest(message, true); | 558 TestBadRequest(message, true); |
| 558 } | 559 } |
| 559 | 560 |
| 560 } // namespace remoting | 561 } // namespace remoting |
| 561 | 562 |
| OLD | NEW |