Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/stringprintf.h" | 15 #include "base/stringprintf.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 18 #include "chrome/browser/browser_shutdown.h" | 18 #include "chrome/browser/browser_shutdown.h" |
| 19 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 19 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 20 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 20 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 21 #include "chrome/browser/chromeos/cros/cros_library.h" | |
| 22 #include "chrome/browser/chromeos/cros/network_library.h" | |
| 23 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 21 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
| 24 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 22 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 25 #include "chrome/browser/chromeos/login/hwid_checker.h" | 23 #include "chrome/browser/chromeos/login/hwid_checker.h" |
| 26 #include "chrome/browser/chromeos/login/login_display_host_impl.h" | 24 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
| 27 #include "chrome/browser/chromeos/login/screen_locker.h" | 25 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 28 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" | 26 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" |
| 29 #include "chrome/browser/chromeos/login/user.h" | 27 #include "chrome/browser/chromeos/login/user.h" |
| 30 #include "chrome/browser/chromeos/login/webui_login_display.h" | 28 #include "chrome/browser/chromeos/login/webui_login_display.h" |
| 31 #include "chrome/browser/chromeos/login/wizard_controller.h" | 29 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 32 #include "chrome/browser/chromeos/net/network_portal_detector.h" | 30 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
| 33 #include "chrome/browser/chromeos/settings/cros_settings.h" | 31 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 34 #include "chrome/browser/io_thread.h" | 32 #include "chrome/browser/io_thread.h" |
| 35 #include "chrome/browser/policy/browser_policy_connector.h" | 33 #include "chrome/browser/policy/browser_policy_connector.h" |
| 36 #include "chrome/browser/profiles/profile.h" | 34 #include "chrome/browser/profiles/profile.h" |
| 37 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" | 35 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" |
| 38 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" | 36 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" |
| 39 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 37 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 40 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 38 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 41 #include "chrome/common/chrome_notification_types.h" | 39 #include "chrome/common/chrome_notification_types.h" |
| 42 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
| 43 #include "chrome/common/pref_names.h" | 41 #include "chrome/common/pref_names.h" |
| 44 #include "chrome/common/url_constants.h" | 42 #include "chrome/common/url_constants.h" |
| 45 #include "chromeos/chromeos_switches.h" | 43 #include "chromeos/chromeos_switches.h" |
| 46 #include "chromeos/dbus/dbus_thread_manager.h" | 44 #include "chromeos/dbus/dbus_thread_manager.h" |
| 47 #include "chromeos/dbus/power_manager_client.h" | 45 #include "chromeos/dbus/power_manager_client.h" |
| 48 #include "chromeos/ime/input_method_manager.h" | 46 #include "chromeos/ime/input_method_manager.h" |
| 49 #include "chromeos/ime/xkeyboard.h" | 47 #include "chromeos/ime/xkeyboard.h" |
| 48 #include "chromeos/network/network_state.h" | |
| 49 #include "chromeos/network/network_state_handler.h" | |
| 50 #include "content/public/browser/render_view_host.h" | 50 #include "content/public/browser/render_view_host.h" |
| 51 #include "content/public/browser/web_contents.h" | 51 #include "content/public/browser/web_contents.h" |
| 52 #include "google_apis/gaia/gaia_auth_util.h" | 52 #include "google_apis/gaia/gaia_auth_util.h" |
| 53 #include "google_apis/gaia/gaia_switches.h" | 53 #include "google_apis/gaia/gaia_switches.h" |
| 54 #include "google_apis/gaia/gaia_urls.h" | 54 #include "google_apis/gaia/gaia_urls.h" |
| 55 #include "grit/chromium_strings.h" | 55 #include "grit/chromium_strings.h" |
| 56 #include "grit/generated_resources.h" | 56 #include "grit/generated_resources.h" |
| 57 #include "third_party/cros_system_api/dbus/service_constants.h" | |
| 57 #include "ui/base/l10n/l10n_util.h" | 58 #include "ui/base/l10n/l10n_util.h" |
| 58 | 59 |
| 59 #if defined(USE_AURA) | 60 #if defined(USE_AURA) |
| 60 #include "ash/shell.h" | 61 #include "ash/shell.h" |
| 61 #include "ash/wm/session_state_controller.h" | 62 #include "ash/wm/session_state_controller.h" |
| 62 #endif | 63 #endif |
| 63 | 64 |
| 64 using content::BrowserThread; | 65 using content::BrowserThread; |
| 65 using content::RenderViewHost; | 66 using content::RenderViewHost; |
| 66 | 67 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 screen == OobeUI::SCREEN_ACCOUNT_PICKER; | 168 screen == OobeUI::SCREEN_ACCOUNT_PICKER; |
| 168 } | 169 } |
| 169 | 170 |
| 170 bool IsSigninScreenError(ErrorScreen::ErrorState error_state) { | 171 bool IsSigninScreenError(ErrorScreen::ErrorState error_state) { |
| 171 return error_state == ErrorScreen::ERROR_STATE_PORTAL || | 172 return error_state == ErrorScreen::ERROR_STATE_PORTAL || |
| 172 error_state == ErrorScreen::ERROR_STATE_OFFLINE || | 173 error_state == ErrorScreen::ERROR_STATE_OFFLINE || |
| 173 error_state == ErrorScreen::ERROR_STATE_PROXY || | 174 error_state == ErrorScreen::ERROR_STATE_PROXY || |
| 174 error_state == ErrorScreen::ERROR_STATE_AUTH_EXT_TIMEOUT; | 175 error_state == ErrorScreen::ERROR_STATE_AUTH_EXT_TIMEOUT; |
| 175 } | 176 } |
| 176 | 177 |
| 177 // Returns a pointer to a Network instance by service path or NULL if | |
| 178 // network can not be found. | |
| 179 Network* FindNetworkByPath(const std::string& service_path) { | |
| 180 CrosLibrary* cros = CrosLibrary::Get(); | |
| 181 if (!cros) | |
| 182 return NULL; | |
| 183 NetworkLibrary* network_library = cros->GetNetworkLibrary(); | |
| 184 if (!network_library) | |
| 185 return NULL; | |
| 186 return network_library->FindNetworkByPath(service_path); | |
| 187 } | |
| 188 | |
| 189 // Returns network name by service path. | 178 // Returns network name by service path. |
| 190 std::string GetNetworkName(const std::string& service_path) { | 179 std::string GetNetworkName(const std::string& service_path) { |
| 191 Network* network = FindNetworkByPath(service_path); | 180 const NetworkState* network = |
| 181 NetworkStateHandler::Get()->GetNetworkState(service_path); | |
| 192 if (!network) | 182 if (!network) |
| 193 return std::string(); | 183 return std::string(); |
| 194 return network->name(); | 184 return network->name(); |
| 195 } | 185 } |
| 196 | 186 |
| 197 // Returns network unique id by service path. | 187 // Returns network unique id by service path. |
| 198 std::string GetNetworkUniqueId(const std::string& service_path) { | 188 std::string GetNetworkUniqueId(const std::string& service_path) { |
| 199 Network* network = FindNetworkByPath(service_path); | 189 const NetworkState* network = |
| 190 NetworkStateHandler::Get()->GetNetworkState(service_path); | |
| 200 if (!network) | 191 if (!network) |
| 201 return std::string(); | 192 return std::string(); |
| 202 return network->unique_id(); | 193 return network->guid(); |
| 203 } | 194 } |
| 204 | 195 |
| 205 // Returns captive portal state for a network by its service path. | 196 // Returns captive portal state for a network by its service path. |
| 206 NetworkPortalDetector::CaptivePortalState GetCaptivePortalState( | 197 NetworkPortalDetector::CaptivePortalState GetCaptivePortalState( |
| 207 const std::string& service_path) { | 198 const std::string& service_path) { |
| 208 NetworkPortalDetector* detector = NetworkPortalDetector::GetInstance(); | 199 NetworkPortalDetector* detector = NetworkPortalDetector::GetInstance(); |
| 209 Network* network = FindNetworkByPath(service_path); | 200 const NetworkState* network = |
| 201 NetworkStateHandler::Get()->GetNetworkState(service_path); | |
| 210 if (!detector || !network) | 202 if (!detector || !network) |
| 211 return NetworkPortalDetector::CaptivePortalState(); | 203 return NetworkPortalDetector::CaptivePortalState(); |
| 212 return detector->GetCaptivePortalState(network); | 204 return detector->GetCaptivePortalState(network); |
| 213 } | 205 } |
| 214 | 206 |
| 215 void RecordDiscrepancyWithShill( | 207 void RecordDiscrepancyWithShill( |
| 216 const Network* network, | 208 const NetworkState* network, |
| 217 const NetworkPortalDetector::CaptivePortalStatus status) { | 209 const NetworkPortalDetector::CaptivePortalStatus status) { |
| 218 if (network->online()) { | 210 if (network->connection_state() == flimflam::kStateOnline) { |
| 219 UMA_HISTOGRAM_ENUMERATION( | 211 UMA_HISTOGRAM_ENUMERATION( |
| 220 "CaptivePortal.OOBE.DiscrepancyWithShill_Online", | 212 "CaptivePortal.OOBE.DiscrepancyWithShill_Online", |
| 221 status, | 213 status, |
| 222 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT); | 214 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT); |
| 223 } else if (network->restricted_pool()) { | 215 } else if (network->connection_state() == flimflam::kStatePortal) { |
| 224 UMA_HISTOGRAM_ENUMERATION( | 216 UMA_HISTOGRAM_ENUMERATION( |
| 225 "CaptivePortal.OOBE.DiscrepancyWithShill_RestrictedPool", | 217 "CaptivePortal.OOBE.DiscrepancyWithShill_RestrictedPool", |
| 226 status, | 218 status, |
| 227 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT); | 219 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT); |
| 228 } else { | 220 } else { |
| 229 UMA_HISTOGRAM_ENUMERATION( | 221 UMA_HISTOGRAM_ENUMERATION( |
| 230 "CaptivePortal.OOBE.DiscrepancyWithShill_Offline", | 222 "CaptivePortal.OOBE.DiscrepancyWithShill_Offline", |
| 231 status, | 223 status, |
| 232 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT); | 224 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT); |
| 233 } | 225 } |
| 234 } | 226 } |
| 235 | 227 |
| 236 // Record state and descripancies with shill (e.g. shill thinks that | 228 // Record state and descripancies with shill (e.g. shill thinks that |
| 237 // network is online but NetworkPortalDetector claims that it's behind | 229 // network is online but NetworkPortalDetector claims that it's behind |
| 238 // portal) for the network identified by |service_path|. | 230 // portal) for the network identified by |service_path|. |
| 239 void RecordNetworkPortalDetectorStats(const std::string& service_path) { | 231 void RecordNetworkPortalDetectorStats(const std::string& service_path) { |
| 240 const Network* network = FindNetworkByPath(service_path); | 232 const NetworkState* network = |
| 233 NetworkStateHandler::Get()->GetNetworkState(service_path); | |
| 241 if (!network) | 234 if (!network) |
| 242 return; | 235 return; |
| 243 NetworkPortalDetector::CaptivePortalState state = | 236 NetworkPortalDetector::CaptivePortalState state = |
| 244 GetCaptivePortalState(service_path); | 237 GetCaptivePortalState(service_path); |
| 245 if (state.status == NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN) | 238 if (state.status == NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN) |
| 246 return; | 239 return; |
| 247 | 240 |
| 248 UMA_HISTOGRAM_ENUMERATION("CaptivePortal.OOBE.DetectionResult", | 241 UMA_HISTOGRAM_ENUMERATION("CaptivePortal.OOBE.DetectionResult", |
| 249 state.status, | 242 state.status, |
| 250 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT); | 243 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT); |
| 251 | 244 |
| 252 switch (state.status) { | 245 switch (state.status) { |
| 253 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN: | 246 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN: |
| 254 NOTREACHED(); | 247 NOTREACHED(); |
| 255 break; | 248 break; |
| 256 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_OFFLINE: | 249 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_OFFLINE: |
| 257 if (network->online() || network->restricted_pool()) | 250 if (network->connection_state() == flimflam::kStateOnline || |
| 251 network->connection_state() == flimflam::kStatePortal) | |
| 258 RecordDiscrepancyWithShill(network, state.status); | 252 RecordDiscrepancyWithShill(network, state.status); |
| 259 break; | 253 break; |
| 260 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE: | 254 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE: |
| 261 if (!network->online()) | 255 if (network->connection_state() != flimflam::kStateOnline) |
| 262 RecordDiscrepancyWithShill(network, state.status); | 256 RecordDiscrepancyWithShill(network, state.status); |
| 263 break; | 257 break; |
| 264 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL: | 258 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL: |
| 265 if (!network->restricted_pool()) | 259 if (network->connection_state() != flimflam::kStatePortal) |
| 266 RecordDiscrepancyWithShill(network, state.status); | 260 RecordDiscrepancyWithShill(network, state.status); |
| 267 break; | 261 break; |
| 268 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED: | 262 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED: |
| 269 if (!network->online()) | 263 if (network->connection_state() != flimflam::kStateOnline) |
| 270 RecordDiscrepancyWithShill(network, state.status); | 264 RecordDiscrepancyWithShill(network, state.status); |
| 271 break; | 265 break; |
| 272 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT: | 266 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT: |
| 273 NOTREACHED(); | 267 NOTREACHED(); |
| 274 break; | 268 break; |
| 275 } | 269 } |
| 276 } | 270 } |
| 277 | 271 |
| 278 } // namespace | 272 } // namespace |
| 279 | 273 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 441 NativeWindowDelegate* native_window_delegate) { | 435 NativeWindowDelegate* native_window_delegate) { |
| 442 native_window_delegate_ = native_window_delegate; | 436 native_window_delegate_ = native_window_delegate; |
| 443 } | 437 } |
| 444 | 438 |
| 445 void SigninScreenHandler::OnNetworkReady() { | 439 void SigninScreenHandler::OnNetworkReady() { |
| 446 MaybePreloadAuthExtension(); | 440 MaybePreloadAuthExtension(); |
| 447 } | 441 } |
| 448 | 442 |
| 449 void SigninScreenHandler::UpdateState(NetworkStateInformer::State state, | 443 void SigninScreenHandler::UpdateState(NetworkStateInformer::State state, |
| 450 const std::string& service_path, | 444 const std::string& service_path, |
| 451 ConnectionType connection_type, | 445 const std::string& connection_type, |
| 452 const std::string& reason) { | 446 const std::string& reason) { |
| 453 UpdateStateInternal(state, service_path, connection_type, reason, false); | 447 UpdateStateInternal(state, service_path, connection_type, reason, false); |
| 454 } | 448 } |
| 455 | 449 |
| 456 // SigninScreenHandler, private: ----------------------------------------------- | 450 // SigninScreenHandler, private: ----------------------------------------------- |
| 457 | 451 |
| 458 void SigninScreenHandler::UpdateUIState(UIState ui_state, | 452 void SigninScreenHandler::UpdateUIState(UIState ui_state, |
| 459 DictionaryValue* params) { | 453 DictionaryValue* params) { |
| 460 switch (ui_state) { | 454 switch (ui_state) { |
| 461 case UI_STATE_GAIA_SIGNIN: | 455 case UI_STATE_GAIA_SIGNIN: |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 472 break; | 466 break; |
| 473 default: | 467 default: |
| 474 NOTREACHED(); | 468 NOTREACHED(); |
| 475 break; | 469 break; |
| 476 } | 470 } |
| 477 } | 471 } |
| 478 | 472 |
| 479 // TODO (ygorshenin@): split this method into small parts. | 473 // TODO (ygorshenin@): split this method into small parts. |
| 480 void SigninScreenHandler::UpdateStateInternal( | 474 void SigninScreenHandler::UpdateStateInternal( |
| 481 NetworkStateInformer::State state, | 475 NetworkStateInformer::State state, |
| 482 const std::string service_path, | 476 const std::string& service_path, |
| 483 ConnectionType connection_type, | 477 const std::string& connection_type, |
| 484 std::string reason, | 478 const std::string& reason, |
| 485 bool force_update) { | 479 bool force_update) { |
| 486 // Skip "update" notification about OFFLINE state from | 480 // Skip "update" notification about OFFLINE state from |
| 487 // NetworkStateInformer if previous notification already was | 481 // NetworkStateInformer if previous notification already was |
| 488 // delayed. | 482 // delayed. |
| 489 if (state == NetworkStateInformer::OFFLINE && | 483 if (state == NetworkStateInformer::OFFLINE && |
| 490 reason == ErrorScreenActor::kErrorReasonUpdate && | 484 reason == ErrorScreenActor::kErrorReasonUpdate && |
| 491 !update_state_closure_.IsCancelled()) { | 485 !update_state_closure_.IsCancelled()) { |
| 492 return; | 486 return; |
| 493 } | 487 } |
| 494 | 488 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 593 is_gaia_loading_timeout); | 587 is_gaia_loading_timeout); |
| 594 } else { | 588 } else { |
| 595 HideOfflineMessage(state, service_path, reason, is_gaia_signin, | 589 HideOfflineMessage(state, service_path, reason, is_gaia_signin, |
| 596 is_gaia_reloaded); | 590 is_gaia_reloaded); |
| 597 } | 591 } |
| 598 } | 592 } |
| 599 | 593 |
| 600 void SigninScreenHandler::SetupAndShowOfflineMessage( | 594 void SigninScreenHandler::SetupAndShowOfflineMessage( |
| 601 NetworkStateInformer:: State state, | 595 NetworkStateInformer:: State state, |
| 602 const std::string& service_path, | 596 const std::string& service_path, |
| 603 ConnectionType connection_type, | 597 const std::string& connection_type, |
| 604 const std::string& reason, | 598 const std::string& reason, |
| 605 bool is_proxy_error, | 599 bool is_proxy_error, |
| 606 bool is_under_captive_portal, | 600 bool is_under_captive_portal, |
| 607 bool is_gaia_loading_timeout) { | 601 bool is_gaia_loading_timeout) { |
| 608 std::string network_id = GetNetworkUniqueId(service_path); | 602 std::string network_id = GetNetworkUniqueId(service_path); |
| 609 LOG(WARNING) << "Show offline message: " | 603 LOG(WARNING) << "Show offline message: " |
| 610 << "state=" << NetworkStateStatusString(state) << ", " | 604 << "state=" << NetworkStateStatusString(state) << ", " |
| 611 << "network_id=" << network_id << ", " | 605 << "network_id=" << network_id << ", " |
| 612 << "reason=" << reason << ", " | 606 << "reason=" << reason << ", " |
| 613 << "is_under_captive_portal=" << is_under_captive_portal; | 607 << "is_under_captive_portal=" << is_under_captive_portal; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 645 error_screen_actor_->AllowGuestSignin(guest_signin_allowed); | 639 error_screen_actor_->AllowGuestSignin(guest_signin_allowed); |
| 646 | 640 |
| 647 bool offline_login_allowed = IsOfflineLoginAllowed() && | 641 bool offline_login_allowed = IsOfflineLoginAllowed() && |
| 648 IsSigninScreenError(error_screen_actor_->error_state()) && | 642 IsSigninScreenError(error_screen_actor_->error_state()) && |
| 649 error_screen_actor_->error_state() != | 643 error_screen_actor_->error_state() != |
| 650 ErrorScreen::ERROR_STATE_AUTH_EXT_TIMEOUT; | 644 ErrorScreen::ERROR_STATE_AUTH_EXT_TIMEOUT; |
| 651 error_screen_actor_->AllowOfflineLogin(offline_login_allowed); | 645 error_screen_actor_->AllowOfflineLogin(offline_login_allowed); |
| 652 | 646 |
| 653 if (GetCurrentScreen() != OobeUI::SCREEN_ERROR_MESSAGE) { | 647 if (GetCurrentScreen() != OobeUI::SCREEN_ERROR_MESSAGE) { |
| 654 DictionaryValue params; | 648 DictionaryValue params; |
| 655 params.SetInteger("lastNetworkType", static_cast<int>(connection_type)); | 649 params.SetString("lastNetworkType", connection_type); |
|
ygorshenin1
2013/05/06 09:14:39
As you're passing connection_type as string instea
gauravsh
2013/05/07 23:38:10
Actually, NetworkDropdown doesn't implement SetLas
ygorshenin1
2013/05/08 08:03:24
Yes, lastNetworkType is not used, but we have inco
| |
| 656 error_screen_actor_->SetUIState(ErrorScreen::UI_STATE_SIGNIN); | 650 error_screen_actor_->SetUIState(ErrorScreen::UI_STATE_SIGNIN); |
| 657 error_screen_actor_->Show(OobeUI::SCREEN_GAIA_SIGNIN, ¶ms); | 651 error_screen_actor_->Show(OobeUI::SCREEN_GAIA_SIGNIN, ¶ms); |
| 658 } | 652 } |
| 659 } | 653 } |
| 660 | 654 |
| 661 void SigninScreenHandler::HideOfflineMessage(NetworkStateInformer::State state, | 655 void SigninScreenHandler::HideOfflineMessage(NetworkStateInformer::State state, |
| 662 const std::string& service_path, | 656 const std::string& service_path, |
| 663 const std::string& reason, | 657 const std::string& reason, |
| 664 bool is_gaia_signin, | 658 bool is_gaia_signin, |
| 665 bool is_gaia_reloaded) { | 659 bool is_gaia_reloaded) { |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1548 if (!cros_settings) | 1542 if (!cros_settings) |
| 1549 return false; | 1543 return false; |
| 1550 | 1544 |
| 1551 // Offline login is allowed only when user pods are hidden. | 1545 // Offline login is allowed only when user pods are hidden. |
| 1552 bool show_pods; | 1546 bool show_pods; |
| 1553 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods); | 1547 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods); |
| 1554 return !show_pods; | 1548 return !show_pods; |
| 1555 } | 1549 } |
| 1556 | 1550 |
| 1557 } // namespace chromeos | 1551 } // namespace chromeos |
| OLD | NEW |