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

Side by Side Diff: chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc

Issue 2750453002: Add DiscoveryNetworkMonitor implementation (Closed)
Patch Set: Respond to mfoltz' and imcheng's comments Created 3 years, 8 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
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h"
6
7 #include <string.h>
8 #include <sys/ioctl.h>
9 #include <sys/socket.h>
10 #include <sys/types.h>
11
12 #include <linux/wireless.h>
13
14 #include "base/logging.h"
15 #include "net/base/network_interfaces_linux.h"
16
17 bool MaybeGetWifiSSID(const char* if_name, std::string* ssid) {
18 DCHECK(if_name);
19
20 auto maybe_ssid = net::internal::GetInterfaceSSID(if_name);
21 if (maybe_ssid.size() > 0) {
22 *ssid = std::move(maybe_ssid);
23 return true;
24 }
25 return false;
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698