| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/mobile/mobile_activator.h" | 5 #include "chrome/browser/chromeos/mobile/mobile_activator.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 network_handler::ErrorCallback()); | 617 network_handler::ErrorCallback()); |
| 618 return; | 618 return; |
| 619 } | 619 } |
| 620 // Stop this callback | 620 // Stop this callback |
| 621 continue_reconnect_timer_.Stop(); | 621 continue_reconnect_timer_.Stop(); |
| 622 EvaluateCellularNetwork(network); | 622 EvaluateCellularNetwork(network); |
| 623 } else { | 623 } else { |
| 624 LOG(WARNING) << "Connect failed, will try again in a little bit."; | 624 LOG(WARNING) << "Connect failed, will try again in a little bit."; |
| 625 if (network) { | 625 if (network) { |
| 626 VLOG(1) << "Connecting to: " << network->path(); | 626 VLOG(1) << "Connecting to: " << network->path(); |
| 627 ash::network_connect::ConnectToNetwork(network->path()); | 627 ash::NetworkConnect::Get()->ConnectToNetwork(network->path()); |
| 628 } | 628 } |
| 629 } | 629 } |
| 630 } | 630 } |
| 631 | 631 |
| 632 void MobileActivator::RefreshCellularNetworks() { | 632 void MobileActivator::RefreshCellularNetworks() { |
| 633 if (state_ == PLAN_ACTIVATION_PAGE_LOADING || | 633 if (state_ == PLAN_ACTIVATION_PAGE_LOADING || |
| 634 state_ == PLAN_ACTIVATION_DONE || | 634 state_ == PLAN_ACTIVATION_DONE || |
| 635 state_ == PLAN_ACTIVATION_ERROR) { | 635 state_ == PLAN_ACTIVATION_ERROR) { |
| 636 return; | 636 return; |
| 637 } | 637 } |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 cellular_plan_payment_time_ = base::Time::Now(); | 1163 cellular_plan_payment_time_ = base::Time::Now(); |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 bool MobileActivator::HasRecentCellularPlanPayment() const { | 1166 bool MobileActivator::HasRecentCellularPlanPayment() const { |
| 1167 const int kRecentPlanPaymentHours = 6; | 1167 const int kRecentPlanPaymentHours = 6; |
| 1168 return (base::Time::Now() - | 1168 return (base::Time::Now() - |
| 1169 cellular_plan_payment_time_).InHours() < kRecentPlanPaymentHours; | 1169 cellular_plan_payment_time_).InHours() < kRecentPlanPaymentHours; |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 } // namespace chromeos | 1172 } // namespace chromeos |
| OLD | NEW |