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

Side by Side Diff: components/arc/net/arc_net_host_impl.cc

Issue 1769083003: ARC: Add network GUID to the metadata that is sent to the Host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo in commit description. Created 4 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 | « components/arc/common/net.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/arc/net/arc_net_host_impl.h" 5 #include "components/arc/net/arc_net_host_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 base::DictionaryValue* network_dict = nullptr; 98 base::DictionaryValue* network_dict = nullptr;
99 value->GetAsDictionary(&network_dict); 99 value->GetAsDictionary(&network_dict);
100 DCHECK(network_dict); 100 DCHECK(network_dict);
101 101
102 // kName is a post-processed version of kHexSSID. 102 // kName is a post-processed version of kHexSSID.
103 std::string tmp; 103 std::string tmp;
104 network_dict->GetString(onc::network_config::kName, &tmp); 104 network_dict->GetString(onc::network_config::kName, &tmp);
105 DCHECK(!tmp.empty()); 105 DCHECK(!tmp.empty());
106 wc->ssid = tmp; 106 wc->ssid = tmp;
107 107
108 tmp.clear();
109 network_dict->GetString(onc::network_config::kGUID, &tmp);
110 DCHECK(!tmp.empty());
111 wc->guid = tmp;
112
108 base::DictionaryValue* wifi_dict = nullptr; 113 base::DictionaryValue* wifi_dict = nullptr;
109 network_dict->GetDictionary(onc::network_config::kWiFi, &wifi_dict); 114 network_dict->GetDictionary(onc::network_config::kWiFi, &wifi_dict);
110 DCHECK(wifi_dict); 115 DCHECK(wifi_dict);
111 116
112 if (!wifi_dict->GetInteger(onc::wifi::kFrequency, &wc->frequency)) 117 if (!wifi_dict->GetInteger(onc::wifi::kFrequency, &wc->frequency))
113 wc->frequency = 0; 118 wc->frequency = 0;
114 if (!wifi_dict->GetInteger(onc::wifi::kSignalStrength, 119 if (!wifi_dict->GetInteger(onc::wifi::kSignalStrength,
115 &wc->signal_strength)) 120 &wc->signal_strength))
116 wc->signal_strength = 0; 121 wc->signal_strength = 0;
117 122
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 155 }
151 156
152 arc_bridge_service()->net_instance()->ScanCompleted(); 157 arc_bridge_service()->net_instance()->ScanCompleted();
153 } 158 }
154 159
155 void ArcNetHostImpl::OnShuttingDown() { 160 void ArcNetHostImpl::OnShuttingDown() {
156 GetStateHandler()->RemoveObserver(this, FROM_HERE); 161 GetStateHandler()->RemoveObserver(this, FROM_HERE);
157 } 162 }
158 163
159 } // namespace arc 164 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/common/net.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698