| Index: chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc
|
| diff --git a/chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc b/chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..66774070810a5a81fac6c36b8a4336b1d5b2c8ae
|
| --- /dev/null
|
| +++ b/chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h"
|
| +
|
| +#include <string.h>
|
| +#include <sys/ioctl.h>
|
| +#include <sys/socket.h>
|
| +#include <sys/types.h>
|
| +
|
| +#include <linux/wireless.h>
|
| +
|
| +#include "base/logging.h"
|
| +#include "net/base/network_interfaces_linux.h"
|
| +
|
| +bool MaybeGetWifiSSID(const char* if_name, std::string* ssid) {
|
| + DCHECK(if_name);
|
| +
|
| + auto maybe_ssid = net::internal::GetInterfaceSSID(if_name);
|
| + if (maybe_ssid.size() > 0) {
|
| + *ssid = std::move(maybe_ssid);
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
|
|