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

Side by Side Diff: remoting/ios/facade/host_info.cc

Issue 2910513002: [CRD iOS] Fix telemetry issues (Closed)
Patch Set: Resolve feedback Created 3 years, 7 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 | « remoting/ios/facade/host_info.h ('k') | remoting/ios/facade/remoting_service.mm » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/ios/facade/host_info.h" 5 #include "remoting/ios/facade/host_info.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace remoting { 9 namespace remoting {
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 if (!host_info.GetString("hostId", &host_id)) { 44 if (!host_info.GetString("hostId", &host_id)) {
45 LOG(ERROR) << "hostId was not found in host_info"; 45 LOG(ERROR) << "hostId was not found in host_info";
46 return false; 46 return false;
47 } 47 }
48 48
49 if (!host_info.GetString("hostName", &host_name)) { 49 if (!host_info.GetString("hostName", &host_name)) {
50 LOG(ERROR) << "hostName was not found in host_info"; 50 LOG(ERROR) << "hostName was not found in host_info";
51 return false; 51 return false;
52 } 52 }
53 53
54 if (!host_info.GetString("hostOS", &host_os)) {
55 LOG(ERROR) << "hostOS was not found in host_info";
56 return false;
57 }
58
59 if (!host_info.GetString("hostOsVersion", &host_os_version)) {
60 LOG(ERROR) << "hostOsVersion was not found in host_info";
61 return false;
62 }
63
64 if (!host_info.GetString("hostVersion", &host_version)) {
65 LOG(ERROR) << "hostVersion was not found in host_info";
66 return false;
67 }
68
54 if (!host_info.GetString("publicKey", &public_key)) { 69 if (!host_info.GetString("publicKey", &public_key)) {
55 LOG(ERROR) << "publicKey was not found for " << host_name; 70 LOG(ERROR) << "publicKey was not found for " << host_name;
56 return false; 71 return false;
57 } 72 }
58 73
59 // If the host entry was created but the host was never online, then the jid 74 // If the host entry was created but the host was never online, then the jid
60 // is never set. 75 // is never set.
61 if (!host_info.GetString("jabberId", &host_jid) && 76 if (!host_info.GetString("jabberId", &host_jid) &&
62 status == kHostStatusOnline) { 77 status == kHostStatusOnline) {
63 LOG(ERROR) << host_name << " is online but is missing a jabberId"; 78 LOG(ERROR) << host_name << " is online but is missing a jabberId";
64 return false; 79 return false;
65 } 80 }
66 81
67 host_info.GetString("hostOfflineReason", &offline_reason); 82 host_info.GetString("hostOfflineReason", &offline_reason);
68 83
69 return true; 84 return true;
70 } 85 }
71 86
72 bool HostInfo::IsReadyForConnection() const { 87 bool HostInfo::IsReadyForConnection() const {
73 return !host_jid.empty() && status == kHostStatusOnline; 88 return !host_jid.empty() && status == kHostStatusOnline;
74 } 89 }
75 90
76 } // namespace remoting 91 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/ios/facade/host_info.h ('k') | remoting/ios/facade/remoting_service.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698