|
| 1 | +Index: extensions/browser/api/networking_private/networking_private_linux.cc |
| 2 | +=================================================================== |
| 3 | +--- a/extensions/browser/api/networking_private/networking_private_linux.cc.orig 2016-05-05 03:01:50.000000000 +0200 |
| 4 | ++++ b/extensions/browser/api/networking_private/networking_private_linux.cc 2016-05-10 16:16:42.431052917 +0200 |
| 5 | +@@ -215,12 +215,14 @@ void NetworkingPrivateLinux::GetState( |
| 6 | + std::unique_ptr<base::DictionaryValue> network_properties( |
| 7 | + new base::DictionaryValue); |
| 8 | + |
| 9 | ++ std::string* erp = error.get(); |
| 10 | ++ base::DictionaryValue* npp = network_properties.get(); |
| 11 | + // Runs GetCachedNetworkProperties on |dbus_thread|. |
| 12 | + dbus_thread_.task_runner()->PostTaskAndReply( |
| 13 | + FROM_HERE, base::Bind(&NetworkingPrivateLinux::GetCachedNetworkProperties, |
| 14 | + base::Unretained(this), guid, |
| 15 | +- base::Unretained(network_properties.get()), |
| 16 | +- base::Unretained(error.get())), |
| 17 | ++ base::Unretained(npp), |
| 18 | ++ base::Unretained(erp)), |
| 19 | + base::Bind(&GetCachedNetworkPropertiesCallback, base::Passed(&error), |
| 20 | + base::Passed(&network_properties), success_callback, |
| 21 | + failure_callback)); |
| 22 | +@@ -301,11 +303,12 @@ void NetworkingPrivateLinux::GetNetworks |
| 23 | + |
| 24 | + // Runs GetAllWiFiAccessPoints on the dbus_thread and returns the |
| 25 | + // results back to OnAccessPointsFound where the callback is fired. |
| 26 | ++ NetworkMap* nmp = network_map.get(); |
| 27 | + dbus_thread_.task_runner()->PostTaskAndReply( |
| 28 | + FROM_HERE, |
| 29 | + base::Bind(&NetworkingPrivateLinux::GetAllWiFiAccessPoints, |
| 30 | + base::Unretained(this), configured_only, visible_only, limit, |
| 31 | +- base::Unretained(network_map.get())), |
| 32 | ++ base::Unretained(nmp)), |
| 33 | + base::Bind(&NetworkingPrivateLinux::OnAccessPointsFound, |
| 34 | + base::Unretained(this), base::Passed(&network_map), |
| 35 | + success_callback, failure_callback)); |
| 36 | +@@ -321,11 +324,12 @@ bool NetworkingPrivateLinux::GetNetworks |
| 37 | + // Runs GetAllWiFiAccessPoints on the dbus_thread and returns the |
| 38 | + // results back to SendNetworkListChangedEvent to fire the event. No |
| 39 | + // callbacks are used in this case. |
| 40 | ++ NetworkMap* nmp = network_map.get(); |
| 41 | + dbus_thread_.task_runner()->PostTaskAndReply( |
| 42 | + FROM_HERE, base::Bind(&NetworkingPrivateLinux::GetAllWiFiAccessPoints, |
| 43 | + base::Unretained(this), false /* configured_only */, |
| 44 | + false /* visible_only */, 0 /* limit */, |
| 45 | +- base::Unretained(network_map.get())), |
| 46 | ++ base::Unretained(nmp)), |
| 47 | + base::Bind(&NetworkingPrivateLinux::OnAccessPointsFoundViaScan, |
| 48 | + base::Unretained(this), base::Passed(&network_map))); |
| 49 | + |
| 50 | +@@ -506,11 +510,12 @@ void NetworkingPrivateLinux::StartConnec |
| 51 | + |
| 52 | + std::unique_ptr<std::string> error(new std::string); |
| 53 | + |
| 54 | ++ std::string* erp = error.get(); |
| 55 | + // Runs ConnectToNetwork on |dbus_thread|. |
| 56 | + dbus_thread_.task_runner()->PostTaskAndReply( |
| 57 | + FROM_HERE, |
| 58 | + base::Bind(&NetworkingPrivateLinux::ConnectToNetwork, |
| 59 | +- base::Unretained(this), guid, base::Unretained(error.get())), |
| 60 | ++ base::Unretained(this), guid, base::Unretained(erp)), |
| 61 | + base::Bind(&OnNetworkConnectOperationCompleted, base::Passed(&error), |
| 62 | + success_callback, failure_callback)); |
| 63 | + } |
| 64 | +@@ -524,11 +529,12 @@ void NetworkingPrivateLinux::StartDiscon |
| 65 | + |
| 66 | + std::unique_ptr<std::string> error(new std::string); |
| 67 | + |
| 68 | ++ std::string* erp = error.get(); |
| 69 | + // Runs DisconnectFromNetwork on |dbus_thread|. |
| 70 | + dbus_thread_.task_runner()->PostTaskAndReply( |
| 71 | + FROM_HERE, |
| 72 | + base::Bind(&NetworkingPrivateLinux::DisconnectFromNetwork, |
| 73 | +- base::Unretained(this), guid, base::Unretained(error.get())), |
| 74 | ++ base::Unretained(this), guid, base::Unretained(erp)), |
| 75 | + base::Bind(&OnNetworkConnectOperationCompleted, base::Passed(&error), |
| 76 | + success_callback, failure_callback)); |
| 77 | + } |
0 commit comments