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

Unified Diff: chromeos/network/network_connection_handler.cc

Issue 23532065: Add NetworkState::RequiresActivation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 dfcba54c2f219f3bc980787e23475a167308bd80..58cd30843e20a5bed102e90a54bcdcef547da57c 100644
--- a/chromeos/network/network_connection_handler.cc
+++ b/chromeos/network/network_connection_handler.cc
@@ -12,6 +12,7 @@
#include "chromeos/dbus/shill_manager_client.h"
#include "chromeos/dbus/shill_service_client.h"
#include "chromeos/network/client_cert_util.h"
+#include "chromeos/network/network_activation_handler.h"
#include "chromeos/network/network_configuration_handler.h"
#include "chromeos/network/network_event_log.h"
#include "chromeos/network/network_handler_callbacks.h"
@@ -47,12 +48,6 @@ bool IsAuthenticationError(const std::string& error) {
error == shill::kErrorEapAuthenticationFailed);
}
-bool NetworkRequiresActivation(const NetworkState* network) {
- return (network->type() == flimflam::kTypeCellular &&
- ((network->activation_state() != flimflam::kActivationStateActivated &&
- network->activation_state() != flimflam::kActivationStateUnknown)));
-}
-
bool VPNIsConfigured(const std::string& service_path,
const std::string& provider_type,
const base::DictionaryValue& provider_properties) {
@@ -232,7 +227,7 @@ void NetworkConnectionHandler::ConnectToNetwork(
InvokeErrorCallback(service_path, error_callback, kErrorConnecting);
return;
}
- if (NetworkRequiresActivation(network)) {
+ if (NetworkActivationHandler::NetworkRequiresActivation(network)) {
InvokeErrorCallback(service_path, error_callback,
kErrorActivationRequired);
return;

Powered by Google App Engine
This is Rietveld 408576698