Revert of ui: Clean up damaged rects and clear them after painting. (patchset #2...
[chromium-blink-merge.git] / components / metrics / net / wifi_access_point_info_provider_chromeos.h
blobfc6fbab4b5548254ae62b0264ab96722818635f8
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_
6 #define COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/values.h"
13 #include "chromeos/network/network_state_handler_observer.h"
14 #include "components/metrics/net/wifi_access_point_info_provider.h"
16 namespace metrics {
18 // WifiAccessPointInfoProviderChromeos provides the connected wifi
19 // acccess point information for chromeos.
20 class WifiAccessPointInfoProviderChromeos
21 : public WifiAccessPointInfoProvider,
22 public chromeos::NetworkStateHandlerObserver,
23 public base::SupportsWeakPtr<WifiAccessPointInfoProviderChromeos> {
24 public:
25 WifiAccessPointInfoProviderChromeos();
26 ~WifiAccessPointInfoProviderChromeos() override;
28 // WifiAccessPointInfoProvider:
29 bool GetInfo(WifiAccessPointInfo* info) override;
31 // NetworkStateHandlerObserver:
32 void DefaultNetworkChanged(
33 const chromeos::NetworkState* default_network) override;
35 private:
36 // Callback from Shill.Service.GetProperties. Parses |properties| to obtain
37 // the wifi access point information.
38 void ParseInfo(const std::string& service_path,
39 const base::DictionaryValue& properties);
41 WifiAccessPointInfo wifi_access_point_info_;
43 DISALLOW_COPY_AND_ASSIGN(WifiAccessPointInfoProviderChromeos);
46 } // namespace metrics
48 #endif // COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_