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

Side by Side Diff: components/wifi/wifi_service.h

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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 unified diff | Download patch
« no previous file with comments | « components/wifi/fake_wifi_service.cc ('k') | components/wifi/wifi_service_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 5 #ifndef CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
6 #define CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 6 #define CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/message_loop/message_loop_proxy.h"
16 #include "base/threading/sequenced_worker_pool.h" 15 #include "base/threading/sequenced_worker_pool.h"
17 #include "base/values.h" 16 #include "base/values.h"
18 #include "components/wifi/wifi_export.h" 17 #include "components/wifi/wifi_export.h"
19 18
20 namespace wifi { 19 namespace wifi {
21 20
22 // WiFiService interface used by implementation of chrome.networkingPrivate 21 // WiFiService interface used by implementation of chrome.networkingPrivate
23 // JavaScript extension API. All methods should be called on worker thread. 22 // JavaScript extension API. All methods should be called on worker thread.
24 // It could be created on any (including UI) thread, so nothing expensive should 23 // It could be created on any (including UI) thread, so nothing expensive should
25 // be done in the constructor. See |NetworkingPrivateService| for wrapper 24 // be done in the constructor. See |NetworkingPrivateService| for wrapper
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 100
102 // Get WiFi Key for network identified by |network_guid| from the 101 // Get WiFi Key for network identified by |network_guid| from the
103 // system (if it has one) and store it in |key_data|. User privilege elevation 102 // system (if it has one) and store it in |key_data|. User privilege elevation
104 // may be required, and function will fail if user privileges are not 103 // may be required, and function will fail if user privileges are not
105 // sufficient. Populates |error| on failure. 104 // sufficient. Populates |error| on failure.
106 virtual void GetKeyFromSystem(const std::string& network_guid, 105 virtual void GetKeyFromSystem(const std::string& network_guid,
107 std::string* key_data, 106 std::string* key_data,
108 std::string* error) = 0; 107 std::string* error) = 0;
109 108
110 // Set observers to run when |NetworksChanged| and |NetworksListChanged| 109 // Set observers to run when |NetworksChanged| and |NetworksListChanged|
111 // events needs to be sent. Notifications are posted on |message_loop_proxy|. 110 // events needs to be sent. Notifications are posted on |task_runner|.
112 virtual void SetEventObservers( 111 virtual void SetEventObservers(
113 scoped_refptr<base::MessageLoopProxy> message_loop_proxy, 112 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
114 const NetworkGuidListCallback& networks_changed_observer, 113 const NetworkGuidListCallback& networks_changed_observer,
115 const NetworkGuidListCallback& network_list_changed_observer) = 0; 114 const NetworkGuidListCallback& network_list_changed_observer) = 0;
116 115
117 // Request update of Connected Network information. Send |NetworksChanged| 116 // Request update of Connected Network information. Send |NetworksChanged|
118 // event on completion. 117 // event on completion.
119 virtual void RequestConnectedNetworkUpdate() = 0; 118 virtual void RequestConnectedNetworkUpdate() = 0;
120 119
121 // Get the SSID of the currently connected network, if any. 120 // Get the SSID of the currently connected network, if any.
122 virtual void GetConnectedNetworkSSID(std::string* ssid, 121 virtual void GetConnectedNetworkSSID(std::string* ssid,
123 std::string* error) = 0; 122 std::string* error) = 0;
(...skipping 11 matching lines...) Expand all
135 static const char kErrorScanForNetworksWithName[]; 134 static const char kErrorScanForNetworksWithName[];
136 static const char kErrorWiFiService[]; 135 static const char kErrorWiFiService[];
137 136
138 private: 137 private:
139 DISALLOW_COPY_AND_ASSIGN(WiFiService); 138 DISALLOW_COPY_AND_ASSIGN(WiFiService);
140 }; 139 };
141 140
142 } // namespace wifi 141 } // namespace wifi
143 142
144 #endif // CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 143 #endif // CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
OLDNEW
« no previous file with comments | « components/wifi/fake_wifi_service.cc ('k') | components/wifi/wifi_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698