| Index: chrome/browser/chromeos/login/oauth2_login_verifier.cc
|
| diff --git a/chrome/browser/chromeos/login/oauth2_login_verifier.cc b/chrome/browser/chromeos/login/oauth2_login_verifier.cc
|
| index ab82a377e73c76eb883e2c37ed30a0585b59c5be..70bfc5cb15199104f4003c94fee92bc974d0dcca 100644
|
| --- a/chrome/browser/chromeos/login/oauth2_login_verifier.cc
|
| +++ b/chrome/browser/chromeos/login/oauth2_login_verifier.cc
|
| @@ -11,12 +11,15 @@
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/time/time.h"
|
| -#include "chrome/browser/chromeos/net/connectivity_state_helper.h"
|
| #include "chrome/browser/signin/profile_oauth2_token_service.h"
|
| #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
|
| +#include "chromeos/network/network_handler.h"
|
| +#include "chromeos/network/network_state.h"
|
| +#include "chromeos/network/network_state_handler.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "google_apis/gaia/gaia_constants.h"
|
| #include "google_apis/gaia/gaia_urls.h"
|
| +#include "third_party/cros_system_api/dbus/service_constants.h"
|
|
|
| using content::BrowserThread;
|
|
|
| @@ -50,8 +53,10 @@ void OAuth2LoginVerifier::VerifyProfileTokens(Profile* profile) {
|
|
|
| // Delay the verification if the network is not connected or on a captive
|
| // portal.
|
| - ConnectivityStateHelper* csh = ConnectivityStateHelper::Get();
|
| - if (!csh->DefaultNetworkOnline()) {
|
| + const NetworkState* default_network =
|
| + NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
|
| + if (!default_network ||
|
| + default_network->connection_state() == flimflam::kStatePortal) {
|
| // If network is offline, defer the token fetching until online.
|
| VLOG(1) << "Network is offline. Deferring OAuth2 access token fetch.";
|
| BrowserThread::PostDelayedTask(
|
|
|