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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 2747743004: Fix crash when user disconnects It2Me host (Closed)
Patch Set: Fix Client breakage Created 3 years, 9 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
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_native_messaging_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/client/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <nacl_io/nacl_io.h> 7 #include <nacl_io/nacl_io.h>
8 #include <sys/mount.h> 8 #include <sys/mount.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 void ChromotingInstance::HandleOnIncomingIq(const base::DictionaryValue& data) { 725 void ChromotingInstance::HandleOnIncomingIq(const base::DictionaryValue& data) {
726 std::string iq; 726 std::string iq;
727 if (!data.GetString("iq", &iq)) { 727 if (!data.GetString("iq", &iq)) {
728 LOG(ERROR) << "Invalid incomingIq() data."; 728 LOG(ERROR) << "Invalid incomingIq() data.";
729 return; 729 return;
730 } 730 }
731 731
732 // Just ignore the message if it's received before Connect() is called. It's 732 // Just ignore the message if it's received before Connect() is called. It's
733 // likely to be a leftover from a previous session, so it's safe to ignore it. 733 // likely to be a leftover from a previous session, so it's safe to ignore it.
734 if (signal_strategy_) 734 if (signal_strategy_)
735 signal_strategy_->OnIncomingMessage(iq); 735 signal_strategy_->GetIncomingMessageCallback().Run(iq);
736 } 736 }
737 737
738 void ChromotingInstance::HandleReleaseAllKeys( 738 void ChromotingInstance::HandleReleaseAllKeys(
739 const base::DictionaryValue& data) { 739 const base::DictionaryValue& data) {
740 if (IsConnected()) 740 if (IsConnected())
741 input_tracker_.ReleaseAll(); 741 input_tracker_.ReleaseAll();
742 } 742 }
743 743
744 void ChromotingInstance::HandleInjectKeyEvent( 744 void ChromotingInstance::HandleInjectKeyEvent(
745 const base::DictionaryValue& data) { 745 const base::DictionaryValue& data) {
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 if (is_custom_counts_histogram) { 1131 if (is_custom_counts_histogram) {
1132 uma.HistogramCustomCounts(histogram_name, value, histogram_min, 1132 uma.HistogramCustomCounts(histogram_name, value, histogram_min,
1133 histogram_max, histogram_buckets); 1133 histogram_max, histogram_buckets);
1134 } else { 1134 } else {
1135 uma.HistogramCustomTimes(histogram_name, value, histogram_min, 1135 uma.HistogramCustomTimes(histogram_name, value, histogram_min,
1136 histogram_max, histogram_buckets); 1136 histogram_max, histogram_buckets);
1137 } 1137 }
1138 } 1138 }
1139 1139
1140 } // namespace remoting 1140 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_native_messaging_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698