OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_ARC_ARC_UTIL_H_ |
| 6 #define COMPONENTS_ARC_ARC_UTIL_H_ |
| 7 |
| 8 // This file contains utility to see ARC functionality status controlled by |
| 9 // outside of ARC, e.g. CommandLine flag, attribute of global data/state, |
| 10 // users' preferences, and FeatureList. |
| 11 |
| 12 namespace base { |
| 13 class CommandLine; |
| 14 } // namespace base |
| 15 |
| 16 namespace arc { |
| 17 |
| 18 // Returns true if ARC is installed and the current device is officially |
| 19 // supported to run ARC. |
| 20 // Note that, to run ARC practically, it is necessary to meet more conditions, |
| 21 // e.g., ARC supports only on Primary User Profile. To see if ARC can actually |
| 22 // run for the profile etc., arc::ArcSessionManager::IsAllowedForProfile() is |
| 23 // the function for that purpose. Please see also its comment, too. |
| 24 // Also note that, ARC singleton classes (e.g. ArcSessionManager, |
| 25 // ArcServiceManager, ArcServiceLauncher) are instantiated regardless of this |
| 26 // check, so it is ok to access them directly. |
| 27 bool IsArcAvailable(); |
| 28 |
| 29 // For testing ARC in browser tests, this function should be called in |
| 30 // SetUpCommandLine(), and its argument should be passed to this function. |
| 31 // Also, in unittests, this can be called in SetUp() with |
| 32 // base::CommandLine::ForCurrentProcess(). |
| 33 // |command_line| must not be nullptr. |
| 34 void SetArcAvailableCommandLineForTesting(base::CommandLine* command_line); |
| 35 |
| 36 } // namespace arc |
| 37 |
| 38 #endif // COMPONENTS_ARC_ARC_UTIL_H_ |
OLD | NEW |