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 |
184 void ArcSessionManager::RegisterLocalStatePrefs(PrefRegistrySimple* registry) { | |
185 registry->RegisterIntegerPref(prefs::kArcCompatibleFilesystemChosen, | |
186 kFileSystemIncompatible); | |
xiyuan
2017/04/13 16:35:59
You don't need to do this for using known_user bec
kinaba
2017/04/14 04:33:55
Oh, I didn't know the way it works. Thanks, remove
| |
187 } | |
188 | |
189 // static | |
185 bool ArcSessionManager::IsOobeOptInActive() { | 190 bool ArcSessionManager::IsOobeOptInActive() { |
186 // ARC OOBE OptIn is optional for now. Test if it exists and login host is | 191 // ARC OOBE OptIn is optional for now. Test if it exists and login host is |
187 // active. | 192 // active. |
188 if (!user_manager::UserManager::Get()->IsCurrentUserNew()) | 193 if (!user_manager::UserManager::Get()->IsCurrentUserNew()) |
189 return false; | 194 return false; |
190 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 195 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
191 chromeos::switches::kEnableArcOOBEOptIn)) | 196 chromeos::switches::kEnableArcOOBEOptIn)) |
192 return false; | 197 return false; |
193 if (!chromeos::LoginDisplayHost::default_host()) | 198 if (!chromeos::LoginDisplayHost::default_host()) |
194 return false; | 199 return false; |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1047 | 1052 |
1048 #undef MAP_STATE | 1053 #undef MAP_STATE |
1049 | 1054 |
1050 // Some compilers report an error even if all values of an enum-class are | 1055 // Some compilers report an error even if all values of an enum-class are |
1051 // covered exhaustively in a switch statement. | 1056 // covered exhaustively in a switch statement. |
1052 NOTREACHED() << "Invalid value " << static_cast<int>(state); | 1057 NOTREACHED() << "Invalid value " << static_cast<int>(state); |
1053 return os; | 1058 return os; |
1054 } | 1059 } |
1055 | 1060 |
1056 } // namespace arc | 1061 } // namespace arc |
OLD | NEW |