| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_util.h" | 5 #include "chrome/browser/chromeos/arc/arc_util.h" |
| 6 | 6 |
| 7 #include <linux/magic.h> | 7 #include <linux/magic.h> |
| 8 #include <sys/statfs.h> | 8 #include <sys/statfs.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "components/arc/arc_util.h" | 22 #include "components/arc/arc_util.h" |
| 23 #include "components/prefs/pref_service.h" | 23 #include "components/prefs/pref_service.h" |
| 24 #include "components/user_manager/known_user.h" | 24 #include "components/user_manager/known_user.h" |
| 25 #include "components/user_manager/user.h" | 25 #include "components/user_manager/user.h" |
| 26 #include "components/user_manager/user_manager.h" | 26 #include "components/user_manager/user_manager.h" |
| 27 | 27 |
| 28 namespace arc { | 28 namespace arc { |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 constexpr char kLsbReleaseArcVersionKey[] = "CHROMEOS_ARC_ANDROID_SDK_VERSION"; | |
| 33 constexpr char kAndroidMSdkVersion[] = "23"; | |
| 34 | |
| 35 // Let IsAllowedForProfile() return "false" for any profile. | 32 // Let IsAllowedForProfile() return "false" for any profile. |
| 36 bool g_disallow_for_testing = false; | 33 bool g_disallow_for_testing = false; |
| 37 | 34 |
| 38 // Returns whether ARC can run on the filesystem mounted at |path|. | 35 // Returns whether ARC can run on the filesystem mounted at |path|. |
| 39 // This function should run only on threads where IO operations are allowed. | 36 // This function should run only on threads where IO operations are allowed. |
| 40 bool IsArcCompatibleFilesystem(const base::FilePath& path) { | 37 bool IsArcCompatibleFilesystem(const base::FilePath& path) { |
| 41 base::ThreadRestrictions::AssertIOAllowed(); | 38 base::ThreadRestrictions::AssertIOAllowed(); |
| 42 | 39 |
| 43 // If it can be verified it is not on ecryptfs, then it is ok. | 40 // If it can be verified it is not on ecryptfs, then it is ok. |
| 44 struct statfs statfs_buf; | 41 struct statfs statfs_buf; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 base::TaskTraits() | 200 base::TaskTraits() |
| 204 .WithShutdownBehavior( | 201 .WithShutdownBehavior( |
| 205 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) | 202 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) |
| 206 .WithPriority(base::TaskPriority::USER_BLOCKING) | 203 .WithPriority(base::TaskPriority::USER_BLOCKING) |
| 207 .MayBlock(), | 204 .MayBlock(), |
| 208 base::Bind(&IsArcCompatibleFilesystem, profile_path), | 205 base::Bind(&IsArcCompatibleFilesystem, profile_path), |
| 209 base::Bind(&StoreCompatibilityCheckResult, account_id, callback)); | 206 base::Bind(&StoreCompatibilityCheckResult, account_id, callback)); |
| 210 } | 207 } |
| 211 | 208 |
| 212 } // namespace arc | 209 } // namespace arc |
| OLD | NEW |