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

Side by Side Diff: components/metrics/net/wifi_access_point_info_provider_chromeos.h

Issue 636363004: Make remaining parts of components/metrics use metrics namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ 5 #ifndef COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_
6 #define COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ 6 #define COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_
7 7
8 #include <string>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
10 #include "base/values.h" 12 #include "base/values.h"
11 #include "chromeos/network/network_state_handler_observer.h" 13 #include "chromeos/network/network_state_handler_observer.h"
12 #include "components/metrics/net/wifi_access_point_info_provider.h" 14 #include "components/metrics/net/wifi_access_point_info_provider.h"
13 15
14 // WifiAccessPointInfoProviderChromeos provides the connected wifi 16 // WifiAccessPointInfoProviderChromeos provides the connected wifi
15 // acccess point information for chromeos. 17 // acccess point information for chromeos.
16 class WifiAccessPointInfoProviderChromeos 18 class WifiAccessPointInfoProviderChromeos
17 : public WifiAccessPointInfoProvider, 19 : public WifiAccessPointInfoProvider,
18 public chromeos::NetworkStateHandlerObserver, 20 public chromeos::NetworkStateHandlerObserver,
19 public base::SupportsWeakPtr<WifiAccessPointInfoProviderChromeos> { 21 public base::SupportsWeakPtr<WifiAccessPointInfoProviderChromeos> {
20 public: 22 public:
21 WifiAccessPointInfoProviderChromeos(); 23 WifiAccessPointInfoProviderChromeos();
22 virtual ~WifiAccessPointInfoProviderChromeos(); 24 virtual ~WifiAccessPointInfoProviderChromeos();
23 25
24 // WifiAccessPointInfoProvider 26 // WifiAccessPointInfoProvider:
25 virtual bool GetInfo(WifiAccessPointInfo* info) override; 27 bool GetInfo(WifiAccessPointInfo* info) override;
26 28
27 // NetworkStateHandlerObserver overrides. 29 // NetworkStateHandlerObserver:
28 virtual void DefaultNetworkChanged( 30 void DefaultNetworkChanged(
29 const chromeos::NetworkState* default_network) override; 31 const chromeos::NetworkState* default_network) override;
30 32
31 private: 33 private:
32 // Callback from Shill.Service.GetProperties. Parses |properties| to obtain 34 // Callback from Shill.Service.GetProperties. Parses |properties| to obtain
33 // the wifi access point information. 35 // the wifi access point information.
34 void ParseInfo(const std::string& service_path, 36 void ParseInfo(const std::string& service_path,
35 const base::DictionaryValue& properties); 37 const base::DictionaryValue& properties);
36 38
37 WifiAccessPointInfo wifi_access_point_info_; 39 WifiAccessPointInfo wifi_access_point_info_;
38 40
39 DISALLOW_COPY_AND_ASSIGN(WifiAccessPointInfoProviderChromeos); 41 DISALLOW_COPY_AND_ASSIGN(WifiAccessPointInfoProviderChromeos);
40 }; 42 };
41 43
42 #endif // COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ 44 #endif // COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698