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

Side by Side Diff: chrome/browser/extensions/api/system_network/system_network_api.cc

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 6 years, 7 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 | Annotate | Revision Log
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 #include "chrome/browser/extensions/api/system_network/system_network_api.h" 5 #include "chrome/browser/extensions/api/system_network/system_network_api.h"
6 6
7 namespace { 7 namespace {
8 const char kNetworkListError[] = "Network lookup failed or unsupported"; 8 const char kNetworkListError[] = "Network lookup failed or unsupported";
9 } // namespace 9 } // namespace
10 10
11 namespace extensions { 11 namespace extensions {
12 namespace api { 12 namespace api {
13 13
14 SystemNetworkGetNetworkInterfacesFunction:: 14 SystemNetworkGetNetworkInterfacesFunction::
15 SystemNetworkGetNetworkInterfacesFunction() {} 15 SystemNetworkGetNetworkInterfacesFunction() {}
16 16
17 SystemNetworkGetNetworkInterfacesFunction:: 17 SystemNetworkGetNetworkInterfacesFunction::
18 ~SystemNetworkGetNetworkInterfacesFunction() {} 18 ~SystemNetworkGetNetworkInterfacesFunction() {}
19 19
20 bool SystemNetworkGetNetworkInterfacesFunction::RunImpl() { 20 bool SystemNetworkGetNetworkInterfacesFunction::RunAsync() {
21 content::BrowserThread::PostTask(content::BrowserThread::FILE, FROM_HERE, 21 content::BrowserThread::PostTask(content::BrowserThread::FILE, FROM_HERE,
22 base::Bind(&SystemNetworkGetNetworkInterfacesFunction:: 22 base::Bind(&SystemNetworkGetNetworkInterfacesFunction::
23 GetListOnFileThread, 23 GetListOnFileThread,
24 this)); 24 this));
25 return true; 25 return true;
26 } 26 }
27 27
28 void SystemNetworkGetNetworkInterfacesFunction::GetListOnFileThread() { 28 void SystemNetworkGetNetworkInterfacesFunction::GetListOnFileThread() {
29 net::NetworkInterfaceList interface_list; 29 net::NetworkInterfaceList interface_list;
30 if (net::GetNetworkList( 30 if (net::GetNetworkList(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 create_arg.push_back(info); 65 create_arg.push_back(info);
66 } 66 }
67 67
68 results_ = api::system_network::GetNetworkInterfaces::Results::Create( 68 results_ = api::system_network::GetNetworkInterfaces::Results::Create(
69 create_arg); 69 create_arg);
70 SendResponse(true); 70 SendResponse(true);
71 } 71 }
72 72
73 } // namespace api 73 } // namespace api
74 } // namespace extensions 74 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698