| 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/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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/hash_tables.h" | 11 #include "base/hash_tables.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/browser_shutdown.h" | 16 #include "chrome/browser/browser_shutdown.h" |
| 17 #include "chrome/browser/browsing_data_helper.h" |
| 18 #include "chrome/browser/browsing_data_remover.h" |
| 17 #include "chrome/browser/chromeos/cros/cros_library.h" | 19 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 18 #include "chrome/browser/chromeos/cros/network_library.h" | 20 #include "chrome/browser/chromeos/cros/network_library.h" |
| 19 #include "chrome/browser/chromeos/cros_settings.h" | 21 #include "chrome/browser/chromeos/cros_settings.h" |
| 20 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 22 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 21 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 23 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
| 22 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 24 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 23 #include "chrome/browser/chromeos/login/authenticator.h" | 25 #include "chrome/browser/chromeos/login/authenticator.h" |
| 24 #include "chrome/browser/chromeos/login/base_login_display_host.h" | 26 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| 25 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" | 27 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" |
| 26 #include "chrome/browser/chromeos/login/screen_locker.h" | 28 #include "chrome/browser/chromeos/login/screen_locker.h" |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 void SigninScreenHandler::StartClearingCookies() { | 1033 void SigninScreenHandler::StartClearingCookies() { |
| 1032 cookies_cleared_ = false; | 1034 cookies_cleared_ = false; |
| 1033 if (cookie_remover_) | 1035 if (cookie_remover_) |
| 1034 cookie_remover_->RemoveObserver(this); | 1036 cookie_remover_->RemoveObserver(this); |
| 1035 | 1037 |
| 1036 cookie_remover_ = new BrowsingDataRemover( | 1038 cookie_remover_ = new BrowsingDataRemover( |
| 1037 Profile::FromWebUI(web_ui()), | 1039 Profile::FromWebUI(web_ui()), |
| 1038 BrowsingDataRemover::EVERYTHING, | 1040 BrowsingDataRemover::EVERYTHING, |
| 1039 base::Time()); | 1041 base::Time()); |
| 1040 cookie_remover_->AddObserver(this); | 1042 cookie_remover_->AddObserver(this); |
| 1041 cookie_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA); | 1043 cookie_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA, |
| 1044 BrowsingDataHelper::UNPROTECTED_WEB); |
| 1042 } | 1045 } |
| 1043 | 1046 |
| 1044 void SigninScreenHandler::MaybePreloadAuthExtension() { | 1047 void SigninScreenHandler::MaybePreloadAuthExtension() { |
| 1045 // Fetching of the extension is not started before account picker page is | 1048 // Fetching of the extension is not started before account picker page is |
| 1046 // loaded because it can affect the loading speed. Also if |cookie_remover_| | 1049 // loaded because it can affect the loading speed. Also if |cookie_remover_| |
| 1047 // or |dns_clear_task_running_| then auth extension showing has already been | 1050 // or |dns_clear_task_running_| then auth extension showing has already been |
| 1048 // initiated and preloading is senseless. | 1051 // initiated and preloading is senseless. |
| 1049 // Do not load the extension for the screen locker, see crosbug.com/25018. | 1052 // Do not load the extension for the screen locker, see crosbug.com/25018. |
| 1050 if (is_account_picker_showing_first_time_ && | 1053 if (is_account_picker_showing_first_time_ && |
| 1051 !gaia_silent_load_ && | 1054 !gaia_silent_load_ && |
| 1052 !ScreenLocker::default_screen_locker() && | 1055 !ScreenLocker::default_screen_locker() && |
| 1053 !cookie_remover_ && | 1056 !cookie_remover_ && |
| 1054 !dns_clear_task_running_ && | 1057 !dns_clear_task_running_ && |
| 1055 network_state_informer_->is_online()) { | 1058 network_state_informer_->is_online()) { |
| 1056 gaia_silent_load_ = true; | 1059 gaia_silent_load_ = true; |
| 1057 gaia_silent_load_network_ = | 1060 gaia_silent_load_network_ = |
| 1058 network_state_informer_->active_network_service_path(); | 1061 network_state_informer_->active_network_service_path(); |
| 1059 LoadAuthExtension(true, true, false); | 1062 LoadAuthExtension(true, true, false); |
| 1060 } | 1063 } |
| 1061 } | 1064 } |
| 1062 | 1065 |
| 1063 } // namespace chromeos | 1066 } // namespace chromeos |
| OLD | NEW |