OLD | NEW |
---|---|
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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1027 data->SetDouble("maxRoundtripLatency", perf_tracker_.round_trip_ms().Max()); | 1027 data->SetDouble("maxRoundtripLatency", perf_tracker_.round_trip_ms().Max()); |
1028 PostLegacyJsonMessage("onPerfStats", std::move(data)); | 1028 PostLegacyJsonMessage("onPerfStats", std::move(data)); |
1029 } | 1029 } |
1030 | 1030 |
1031 // static | 1031 // static |
1032 void ChromotingInstance::RegisterLogMessageHandler() { | 1032 void ChromotingInstance::RegisterLogMessageHandler() { |
1033 base::AutoLock lock(g_logging_lock.Get()); | 1033 base::AutoLock lock(g_logging_lock.Get()); |
1034 | 1034 |
1035 // Set up log message handler. | 1035 // Set up log message handler. |
1036 // This is not thread-safe so we need it within our lock. | 1036 // This is not thread-safe so we need it within our lock. |
1037 logging::SetLogMessageHandler(&LogToUI); | 1037 logging::PushLogMessageHandler(&LogToUI); |
Dan Beam
2016/06/09 18:52:50
does this call ever need to be balanced by a PopLo
wychen
2016/06/09 21:04:17
I was a bit curious when I changed this. The handl
| |
1038 } | 1038 } |
1039 | 1039 |
1040 void ChromotingInstance::RegisterLoggingInstance() { | 1040 void ChromotingInstance::RegisterLoggingInstance() { |
1041 base::AutoLock lock(g_logging_lock.Get()); | 1041 base::AutoLock lock(g_logging_lock.Get()); |
1042 g_logging_instance = pp_instance(); | 1042 g_logging_instance = pp_instance(); |
1043 } | 1043 } |
1044 | 1044 |
1045 void ChromotingInstance::UnregisterLoggingInstance() { | 1045 void ChromotingInstance::UnregisterLoggingInstance() { |
1046 base::AutoLock lock(g_logging_lock.Get()); | 1046 base::AutoLock lock(g_logging_lock.Get()); |
1047 | 1047 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1118 if (is_custom_counts_histogram) { | 1118 if (is_custom_counts_histogram) { |
1119 uma.HistogramCustomCounts(histogram_name, value, histogram_min, | 1119 uma.HistogramCustomCounts(histogram_name, value, histogram_min, |
1120 histogram_max, histogram_buckets); | 1120 histogram_max, histogram_buckets); |
1121 } else { | 1121 } else { |
1122 uma.HistogramCustomTimes(histogram_name, value, histogram_min, | 1122 uma.HistogramCustomTimes(histogram_name, value, histogram_min, |
1123 histogram_max, histogram_buckets); | 1123 histogram_max, histogram_buckets); |
1124 } | 1124 } |
1125 } | 1125 } |
1126 | 1126 |
1127 } // namespace remoting | 1127 } // namespace remoting |
OLD | NEW |