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

Side by Side Diff: extensions/browser/api/system_network/system_network_api.h

Issue 2975153002: Convert FILE thread usage in system_network_api.cc to TaskScheduler. (Closed)
Patch Set: GetListOnBlockingTaskRunner Created 3 years, 5 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 | « no previous file | extensions/browser/api/system_network/system_network_api.cc » ('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 EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_
6 #define EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ 6 #define EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_
7 7
8 #include <memory>
9
8 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
9 #include "extensions/common/api/system_network.h" 11 #include "extensions/common/api/system_network.h"
10 #include "net/base/network_interfaces.h" 12 #include "net/base/network_interfaces.h"
11 13
12 namespace extensions { 14 namespace extensions {
13 namespace api { 15 namespace api {
14 16
15 class SystemNetworkGetNetworkInterfacesFunction 17 class SystemNetworkGetNetworkInterfacesFunction
16 : public UIThreadExtensionFunction { 18 : public UIThreadExtensionFunction {
17 public: 19 public:
18 DECLARE_EXTENSION_FUNCTION("system.network.getNetworkInterfaces", 20 DECLARE_EXTENSION_FUNCTION("system.network.getNetworkInterfaces",
19 SYSTEM_NETWORK_GETNETWORKINTERFACES) 21 SYSTEM_NETWORK_GETNETWORKINTERFACES)
20 22
21 SystemNetworkGetNetworkInterfacesFunction(); 23 SystemNetworkGetNetworkInterfacesFunction();
22 24
23 protected: 25 protected:
24 ~SystemNetworkGetNetworkInterfacesFunction() override; 26 ~SystemNetworkGetNetworkInterfacesFunction() override;
25 27
26 // ExtensionFunction: 28 // ExtensionFunction:
27 ResponseAction Run() override; 29 ResponseAction Run() override;
28 30
29 private: 31 private:
30 void GetListOnFileThread(); 32 void SendResponseOnUIThread(
31 void HandleGetListError(); 33 std::unique_ptr<net::NetworkInterfaceList> interface_list);
32 void SendResponseOnUIThread(const net::NetworkInterfaceList& interface_list);
33 }; 34 };
34 35
35 } // namespace api 36 } // namespace api
36 } // namespace extensions 37 } // namespace extensions
37 38
38 #endif // EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ 39 #endif // EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/api/system_network/system_network_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698