OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/webui/chromeos/mobile_setup_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 } | 1120 } |
1121 } | 1121 } |
1122 break; | 1122 break; |
1123 case PLAN_ACTIVATION_RECONNECTING_OTASP_TRY: | 1123 case PLAN_ACTIVATION_RECONNECTING_OTASP_TRY: |
1124 case PLAN_ACTIVATION_RECONNECTING: | 1124 case PLAN_ACTIVATION_RECONNECTING: |
1125 case PLAN_ACTIVATION_RECONNECTING_OTASP: { | 1125 case PLAN_ACTIVATION_RECONNECTING_OTASP: { |
1126 // Start reconnect timer. This will ensure that we are not left in | 1126 // Start reconnect timer. This will ensure that we are not left in |
1127 // limbo by the network library. | 1127 // limbo by the network library. |
1128 if (!reconnect_timer_.IsRunning()) { | 1128 if (!reconnect_timer_.IsRunning()) { |
1129 reconnect_timer_.Start( | 1129 reconnect_timer_.Start( |
1130 FROM_HERE, | |
1131 base::TimeDelta::FromMilliseconds(kReconnectTimerDelayMS), | 1130 base::TimeDelta::FromMilliseconds(kReconnectTimerDelayMS), |
1132 this, &MobileSetupHandler::ReconnectTimerFired); | 1131 this, &MobileSetupHandler::ReconnectTimerFired); |
1133 } | 1132 } |
1134 // Reset connection metrics and try to connect. | 1133 // Reset connection metrics and try to connect. |
1135 reconnect_wait_count_ = 0; | 1134 reconnect_wait_count_ = 0; |
1136 connection_retry_count_ = 0; | 1135 connection_retry_count_ = 0; |
1137 connection_start_time_ = base::Time::Now(); | 1136 connection_start_time_ = base::Time::Now(); |
1138 ConnectToNetwork(network, kReconnectDelayMS); | 1137 ConnectToNetwork(network, kReconnectDelayMS); |
1139 break; | 1138 break; |
1140 } | 1139 } |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 MobileSetupHandler* handler = new MobileSetupHandler(service_path); | 1325 MobileSetupHandler* handler = new MobileSetupHandler(service_path); |
1327 AddMessageHandler((handler)->Attach(this)); | 1326 AddMessageHandler((handler)->Attach(this)); |
1328 handler->Init(contents); | 1327 handler->Init(contents); |
1329 MobileSetupUIHTMLSource* html_source = | 1328 MobileSetupUIHTMLSource* html_source = |
1330 new MobileSetupUIHTMLSource(service_path); | 1329 new MobileSetupUIHTMLSource(service_path); |
1331 | 1330 |
1332 // Set up the chrome://mobilesetup/ source. | 1331 // Set up the chrome://mobilesetup/ source. |
1333 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 1332 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
1334 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 1333 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
1335 } | 1334 } |
OLD | NEW |