| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/arc/arc_session_manager.h" | 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/shelf/shelf_delegate.h" | 9 #include "ash/shelf/shelf_delegate.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // Note that ArcBackupRestoreEnabled and ArcLocationServiceEnabled prefs have | 171 // Note that ArcBackupRestoreEnabled and ArcLocationServiceEnabled prefs have |
| 172 // to be off by default, until an explicit gesture from the user to enable | 172 // to be off by default, until an explicit gesture from the user to enable |
| 173 // them is received. This is crucial in the cases when these prefs transition | 173 // them is received. This is crucial in the cases when these prefs transition |
| 174 // from a previous managed state to the unmanaged. | 174 // from a previous managed state to the unmanaged. |
| 175 registry->RegisterBooleanPref(prefs::kArcBackupRestoreEnabled, false); | 175 registry->RegisterBooleanPref(prefs::kArcBackupRestoreEnabled, false); |
| 176 registry->RegisterBooleanPref(prefs::kArcLocationServiceEnabled, false); | 176 registry->RegisterBooleanPref(prefs::kArcLocationServiceEnabled, false); |
| 177 // This is used to delete the Play user ID if ARC is disabled for an | 177 // This is used to delete the Play user ID if ARC is disabled for an |
| 178 // AD-managed device. | 178 // AD-managed device. |
| 179 registry->RegisterStringPref(prefs::kArcActiveDirectoryPlayUserId, | 179 registry->RegisterStringPref(prefs::kArcActiveDirectoryPlayUserId, |
| 180 std::string()); | 180 std::string()); |
| 181 registry->RegisterBooleanPref(prefs::kArcCompatibleFilesystemChosen, false); | |
| 182 } | 181 } |
| 183 | 182 |
| 184 // static | 183 // static |
| 185 bool ArcSessionManager::IsOobeOptInActive() { | 184 bool ArcSessionManager::IsOobeOptInActive() { |
| 186 // ARC OOBE OptIn is optional for now. Test if it exists and login host is | 185 // ARC OOBE OptIn is optional for now. Test if it exists and login host is |
| 187 // active. | 186 // active. |
| 188 if (!user_manager::UserManager::Get()->IsCurrentUserNew()) | 187 if (!user_manager::UserManager::Get()->IsCurrentUserNew()) |
| 189 return false; | 188 return false; |
| 190 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 189 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 191 chromeos::switches::kEnableArcOOBEOptIn)) | 190 chromeos::switches::kEnableArcOOBEOptIn)) |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 | 1046 |
| 1048 #undef MAP_STATE | 1047 #undef MAP_STATE |
| 1049 | 1048 |
| 1050 // Some compilers report an error even if all values of an enum-class are | 1049 // Some compilers report an error even if all values of an enum-class are |
| 1051 // covered exhaustively in a switch statement. | 1050 // covered exhaustively in a switch statement. |
| 1052 NOTREACHED() << "Invalid value " << static_cast<int>(state); | 1051 NOTREACHED() << "Invalid value " << static_cast<int>(state); |
| 1053 return os; | 1052 return os; |
| 1054 } | 1053 } |
| 1055 | 1054 |
| 1056 } // namespace arc | 1055 } // namespace arc |
| OLD | NEW |