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

Unified Diff: chromeos/network/network_change_notifier_chromeos.h

Issue 328793002: Add wifi AP info to system profile metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/network_change_notifier_chromeos.h
diff --git a/chromeos/network/network_change_notifier_chromeos.h b/chromeos/network/network_change_notifier_chromeos.h
index d70386e168c509d8aa28987960e1e0394dece442..4d1ace9fc4cfe431fee3417ae6a4aae919c1f35e 100644
--- a/chromeos/network/network_change_notifier_chromeos.h
+++ b/chromeos/network/network_change_notifier_chromeos.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/values.h"
#include "chromeos/chromeos_export.h"
#include "chromeos/dbus/power_manager_client.h"
#include "chromeos/network/network_state_handler_observer.h"
@@ -20,7 +21,8 @@ namespace chromeos {
class CHROMEOS_EXPORT NetworkChangeNotifierChromeos
: public net::NetworkChangeNotifier,
public chromeos::PowerManagerClient::Observer,
- public chromeos::NetworkStateHandlerObserver {
+ public chromeos::NetworkStateHandlerObserver,
+ public base::SupportsWeakPtr<NetworkChangeNotifierChromeos> {
public:
NetworkChangeNotifierChromeos();
virtual ~NetworkChangeNotifierChromeos();
@@ -34,6 +36,7 @@ class CHROMEOS_EXPORT NetworkChangeNotifierChromeos
// NetworkChangeNotifier overrides.
virtual net::NetworkChangeNotifier::ConnectionType
GetCurrentConnectionType() const OVERRIDE;
+ virtual bool GetCurrentWifiApInfo(WifiApInfo &info) OVERRIDE;
// PowerManagerClient::Observer overrides.
virtual void SuspendDone(const base::TimeDelta& sleep_duration) OVERRIDE;
@@ -59,6 +62,17 @@ class CHROMEOS_EXPORT NetworkChangeNotifierChromeos
bool* ip_address_changed,
bool* dns_changed);
+ // Callback from Shill.Service.GetProperties. Parses |properties| to obtain
+ // the wifi AP information.
+ void ParseWifiApInfo(const std::string& service_path,
+ const base::DictionaryValue& properties);
+
+ // Error callback from Shill.Service.GetProperties, most likely the network
+ // service is removed before the properties can be retrieved.
+ void GetPropertiesFailedHandler(
+ const std::string& error_name,
+ scoped_ptr<base::DictionaryValue> error_data);
+
// Maps the shill network type and technology to its NetworkChangeNotifier
// equivalent.
static net::NetworkChangeNotifier::ConnectionType
@@ -71,6 +85,8 @@ class CHROMEOS_EXPORT NetworkChangeNotifierChromeos
NetworkChangeCalculatorParamsChromeos();
NetworkChangeNotifier::ConnectionType connection_type_;
+ // Wifi AP info.
+ NetworkChangeNotifier::WifiApInfo wifi_ap_info_;
// IP address for the current default network.
std::string ip_address_;
// DNS servers for the current default network.

Powered by Google App Engine
This is Rietveld 408576698