| 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/login/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <utility> | 12 #include <utility> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/callback_helpers.h" | 16 #include "base/callback_helpers.h" |
| 17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 18 #include "base/location.h" | 18 #include "base/location.h" |
| 19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/macros.h" | 20 #include "base/macros.h" |
| 21 #include "base/metrics/histogram_macros.h" | 21 #include "base/metrics/histogram_macros.h" |
| 22 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
| 23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
| 24 #include "base/threading/thread_task_runner_handle.h" | 24 #include "base/threading/thread_task_runner_handle.h" |
| 25 #include "chrome/browser/browser_process.h" | 25 #include "chrome/browser/browser_process.h" |
| 26 #include "chrome/browser/browser_process_platform_part.h" | 26 #include "chrome/browser/browser_process_platform_part.h" |
| 27 #include "chrome/browser/chrome_notification_types.h" | 27 #include "chrome/browser/chrome_notification_types.h" |
| 28 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 28 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 29 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 29 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 30 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | 30 #include "chrome/browser/chromeos/arc/arc_util.h" |
| 31 #include "chrome/browser/chromeos/customization/customization_document.h" | 31 #include "chrome/browser/chromeos/customization/customization_document.h" |
| 32 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.
h" | 32 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.
h" |
| 33 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" | 33 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
| 34 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 34 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 35 #include "chrome/browser/chromeos/login/helper.h" | 35 #include "chrome/browser/chromeos/login/helper.h" |
| 36 #include "chrome/browser/chromeos/login/hwid_checker.h" | 36 #include "chrome/browser/chromeos/login/hwid_checker.h" |
| 37 #include "chrome/browser/chromeos/login/screens/arc_terms_of_service_screen.h" | 37 #include "chrome/browser/chromeos/login/screens/arc_terms_of_service_screen.h" |
| 38 #include "chrome/browser/chromeos/login/screens/device_disabled_screen.h" | 38 #include "chrome/browser/chromeos/login/screens/device_disabled_screen.h" |
| 39 #include "chrome/browser/chromeos/login/screens/enable_debugging_screen.h" | 39 #include "chrome/browser/chromeos/login/screens/enable_debugging_screen.h" |
| 40 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 40 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 const Profile* profile = ProfileManager::GetActiveUserProfile(); | 547 const Profile* profile = ProfileManager::GetActiveUserProfile(); |
| 548 | 548 |
| 549 const base::CommandLine* command_line = | 549 const base::CommandLine* command_line = |
| 550 base::CommandLine::ForCurrentProcess(); | 550 base::CommandLine::ForCurrentProcess(); |
| 551 if (!command_line->HasSwitch(chromeos::switches::kEnableArcOOBEOptIn)) { | 551 if (!command_line->HasSwitch(chromeos::switches::kEnableArcOOBEOptIn)) { |
| 552 VLOG(1) << "Skip Arc Terms of Service screen because Arc OOBE OptIn is " | 552 VLOG(1) << "Skip Arc Terms of Service screen because Arc OOBE OptIn is " |
| 553 << "disabled."; | 553 << "disabled."; |
| 554 } else if (!user_manager::UserManager::Get()->IsUserLoggedIn()) { | 554 } else if (!user_manager::UserManager::Get()->IsUserLoggedIn()) { |
| 555 VLOG(1) << "Skip Arc Terms of Service screen because user is not " | 555 VLOG(1) << "Skip Arc Terms of Service screen because user is not " |
| 556 << "logged in."; | 556 << "logged in."; |
| 557 } else if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) { | 557 } else if (!arc::IsArcAllowedForProfile(profile)) { |
| 558 VLOG(1) << "Skip Arc Terms of Service screen because Arc is not allowed."; | 558 VLOG(1) << "Skip Arc Terms of Service screen because Arc is not allowed."; |
| 559 } else if (profile->GetPrefs()->IsManagedPreference(prefs::kArcEnabled) && | 559 } else if (profile->GetPrefs()->IsManagedPreference(prefs::kArcEnabled) && |
| 560 !profile->GetPrefs()->GetBoolean(prefs::kArcEnabled)) { | 560 !profile->GetPrefs()->GetBoolean(prefs::kArcEnabled)) { |
| 561 VLOG(1) << "Skip Arc Terms of Service screen because Arc is disabled."; | 561 VLOG(1) << "Skip Arc Terms of Service screen because Arc is disabled."; |
| 562 } else { | 562 } else { |
| 563 show_arc_terms = true; | 563 show_arc_terms = true; |
| 564 } | 564 } |
| 565 | 565 |
| 566 if (show_arc_terms) { | 566 if (show_arc_terms) { |
| 567 VLOG(1) << "Showing Arc Terms of Service screen."; | 567 VLOG(1) << "Showing Arc Terms of Service screen."; |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; | 1492 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; |
| 1493 } | 1493 } |
| 1494 | 1494 |
| 1495 EnrollmentScreen* screen = EnrollmentScreen::Get(this); | 1495 EnrollmentScreen* screen = EnrollmentScreen::Get(this); |
| 1496 screen->SetParameters(effective_config, shark_controller_.get()); | 1496 screen->SetParameters(effective_config, shark_controller_.get()); |
| 1497 SetStatusAreaVisible(true); | 1497 SetStatusAreaVisible(true); |
| 1498 SetCurrentScreen(screen); | 1498 SetCurrentScreen(screen); |
| 1499 } | 1499 } |
| 1500 | 1500 |
| 1501 } // namespace chromeos | 1501 } // namespace chromeos |
| OLD | NEW |