| 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/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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
| 13 #include "base/task.h" | 13 #include "base/task.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/chromeos/cros/cros_library.h" | 17 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 18 #include "chrome/browser/chromeos/cros/network_library.h" | 18 #include "chrome/browser/chromeos/cros/network_library.h" |
| 19 #include "chrome/browser/chromeos/cros/power_library.h" | 19 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 20 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 20 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 21 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 21 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
| 22 #include "chrome/browser/chromeos/login/screen_locker.h" | 22 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 23 #include "chrome/browser/chromeos/login/user.h" | 23 #include "chrome/browser/chromeos/login/user.h" |
| 24 #include "chrome/browser/chromeos/login/webui_login_display.h" | 24 #include "chrome/browser/chromeos/login/webui_login_display.h" |
| 25 #include "chrome/browser/chromeos/user_cros_settings_provider.h" | 25 #include "chrome/browser/chromeos/user_cros_settings_provider.h" |
| 26 #include "chrome/browser/io_thread.h" | 26 #include "chrome/browser/io_thread.h" |
| 27 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/common/chrome_notification_types.h" | 28 #include "chrome/common/chrome_notification_types.h" |
| 29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 void SigninScreenHandler::HandleLaunchIncognito(const base::ListValue* args) { | 532 void SigninScreenHandler::HandleLaunchIncognito(const base::ListValue* args) { |
| 533 delegate_->LoginAsGuest(); | 533 delegate_->LoginAsGuest(); |
| 534 } | 534 } |
| 535 | 535 |
| 536 void SigninScreenHandler::HandleFixCaptivePortal(const base::ListValue* args) { | 536 void SigninScreenHandler::HandleFixCaptivePortal(const base::ListValue* args) { |
| 537 delegate_->FixCaptivePortal(); | 537 delegate_->FixCaptivePortal(); |
| 538 } | 538 } |
| 539 | 539 |
| 540 void SigninScreenHandler::HandleShutdownSystem(const base::ListValue* args) { | 540 void SigninScreenHandler::HandleShutdownSystem(const base::ListValue* args) { |
| 541 DCHECK(CrosLibrary::Get()->EnsureLoaded()); | 541 DCHECK(CrosLibrary::Get()->EnsureLoaded()); |
| 542 CrosLibrary::Get()->GetPowerLibrary()->RequestShutdown(); | 542 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); |
| 543 } | 543 } |
| 544 | 544 |
| 545 void SigninScreenHandler::HandleRemoveUser(const base::ListValue* args) { | 545 void SigninScreenHandler::HandleRemoveUser(const base::ListValue* args) { |
| 546 std::string email; | 546 std::string email; |
| 547 if (!args->GetString(0, &email)) { | 547 if (!args->GetString(0, &email)) { |
| 548 NOTREACHED(); | 548 NOTREACHED(); |
| 549 return; | 549 return; |
| 550 } | 550 } |
| 551 | 551 |
| 552 delegate_->RemoveUser(email); | 552 delegate_->RemoveUser(email); |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 | 738 |
| 739 cookie_remover_ = new BrowsingDataRemover( | 739 cookie_remover_ = new BrowsingDataRemover( |
| 740 Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()), | 740 Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()), |
| 741 BrowsingDataRemover::EVERYTHING, | 741 BrowsingDataRemover::EVERYTHING, |
| 742 base::Time()); | 742 base::Time()); |
| 743 cookie_remover_->AddObserver(this); | 743 cookie_remover_->AddObserver(this); |
| 744 cookie_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA); | 744 cookie_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA); |
| 745 } | 745 } |
| 746 | 746 |
| 747 } // namespace chromeos | 747 } // namespace chromeos |
| OLD | NEW |