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

Unified Diff: chromeos/network/network_connection_handler.cc

Issue 22611005: Switch over MobileActivator to use Network*Handler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add activation handler files Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/network_connection_handler.cc
diff --git a/chromeos/network/network_connection_handler.cc b/chromeos/network/network_connection_handler.cc
index 08d233e19557e4b37564746528961a99d4384868..e6dfe688122c50e823ed5950bb9edbb9c2d4cafb 100644
--- a/chromeos/network/network_connection_handler.cc
+++ b/chromeos/network/network_connection_handler.cc
@@ -320,21 +320,6 @@ void NetworkConnectionHandler::DisconnectNetwork(
CallShillDisconnect(service_path, success_callback, error_callback);
}
armansito 2013/08/14 00:49:51 A small suggestion: now that there is a NetworkAct
gauravsh 2013/08/14 21:42:29 NetworkRequiresActivation() is used by ConnectToNe
armansito 2013/08/14 22:46:34 sgtm.
-void NetworkConnectionHandler::ActivateNetwork(
- const std::string& service_path,
- const std::string& carrier,
- const base::Closure& success_callback,
- const network_handler::ErrorCallback& error_callback) {
- NET_LOG_USER("DisconnectNetwork", service_path);
- const NetworkState* network =
- network_state_handler_->GetNetworkState(service_path);
- if (!network) {
- InvokeErrorCallback(service_path, error_callback, kErrorNotFound);
- return;
- }
- CallShillActivate(service_path, carrier, success_callback, error_callback);
-}
-
bool NetworkConnectionHandler::HasConnectingNetwork(
const std::string& service_path) {
return pending_requests_.count(service_path) != 0;
@@ -667,29 +652,4 @@ void NetworkConnectionHandler::HandleShillDisconnectSuccess(
success_callback.Run();
}
-// Activate
-
-void NetworkConnectionHandler::CallShillActivate(
- const std::string& service_path,
- const std::string& carrier,
- const base::Closure& success_callback,
- const network_handler::ErrorCallback& error_callback) {
- NET_LOG_USER("Activate Request", service_path + ": '" + carrier + "'");
- DBusThreadManager::Get()->GetShillServiceClient()->ActivateCellularModem(
- dbus::ObjectPath(service_path),
- carrier,
- base::Bind(&NetworkConnectionHandler::HandleShillActivateSuccess,
- AsWeakPtr(), service_path, success_callback),
- base::Bind(&network_handler::ShillErrorCallbackFunction,
- kErrorShillError, service_path, error_callback));
-}
-
-void NetworkConnectionHandler::HandleShillActivateSuccess(
- const std::string& service_path,
- const base::Closure& success_callback) {
- NET_LOG_EVENT("Activate Request Sent", service_path);
- if (!success_callback.is_null())
- success_callback.Run();
-}
-
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698