| 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 "chromeos/chromeos_switches.h" | 5 #include "chromeos/chromeos_switches.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Please keep the order of these switches synchronized with the header file | 31 // Please keep the order of these switches synchronized with the header file |
| 32 // (i.e. in alphabetical order). | 32 // (i.e. in alphabetical order). |
| 33 | 33 |
| 34 const char kAggressiveCacheDiscardThreshold[] = "aggressive-cache-discard"; | 34 const char kAggressiveCacheDiscardThreshold[] = "aggressive-cache-discard"; |
| 35 | 35 |
| 36 const char kAggressiveTabDiscardThreshold[] = "aggressive-tab-discard"; | 36 const char kAggressiveTabDiscardThreshold[] = "aggressive-tab-discard"; |
| 37 | 37 |
| 38 const char kAggressiveThreshold[] = "aggressive"; | 38 const char kAggressiveThreshold[] = "aggressive"; |
| 39 | 39 |
| 40 // If this flag is set, enable data roaming in the cellular network by default | |
| 41 // upon system start if it's an unmanaged device. This flag is used by Rialto | |
| 42 // device to obtain device policy during OOBE since the Rialto device has no | |
| 43 // display and and only connects over cell. | |
| 44 const char kAllowDataRoamingByDefault[] = "allow-data-roaming-by-default"; | |
| 45 | |
| 46 // If this flag is passed, failed policy fetches will not cause profile | 40 // If this flag is passed, failed policy fetches will not cause profile |
| 47 // initialization to fail. This is useful for tests because it means that | 41 // initialization to fail. This is useful for tests because it means that |
| 48 // tests don't have to mock out the policy infrastructure. | 42 // tests don't have to mock out the policy infrastructure. |
| 49 const char kAllowFailedPolicyFetchForTest[] = | 43 const char kAllowFailedPolicyFetchForTest[] = |
| 50 "allow-failed-policy-fetch-for-test"; | 44 "allow-failed-policy-fetch-for-test"; |
| 51 | 45 |
| 52 // Allows remote attestation (RA) in dev mode for testing purpose. Usually RA | 46 // Allows remote attestation (RA) in dev mode for testing purpose. Usually RA |
| 53 // is disabled in dev mode because it will always fail. However, there are cases | 47 // is disabled in dev mode because it will always fail. However, there are cases |
| 54 // in testing where we do want to go through the permission flow even in dev | 48 // in testing where we do want to go through the permission flow even in dev |
| 55 // mode. This can be enabled by this flag. | 49 // mode. This can be enabled by this flag. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 81 const char kArcAvailable[] = "arc-available"; | 75 const char kArcAvailable[] = "arc-available"; |
| 82 | 76 |
| 83 // Screenshot testing: specifies the directoru where artifacts will be stored. | 77 // Screenshot testing: specifies the directoru where artifacts will be stored. |
| 84 const char kArtifactsDir[] = "artifacts-dir"; | 78 const char kArtifactsDir[] = "artifacts-dir"; |
| 85 | 79 |
| 86 // When wallpaper boot animation is not disabled this switch | 80 // When wallpaper boot animation is not disabled this switch |
| 87 // is used to override OOBE/sign in WebUI init type. | 81 // is used to override OOBE/sign in WebUI init type. |
| 88 // Possible values: parallel|postpone. Default: parallel. | 82 // Possible values: parallel|postpone. Default: parallel. |
| 89 const char kAshWebUIInit[] = "ash-webui-init"; | 83 const char kAshWebUIInit[] = "ash-webui-init"; |
| 90 | 84 |
| 85 // If this flag is set, it indicates that this device is a "Cellular First" |
| 86 // device. Cellular First devices use cellular telephone data networks as |
| 87 // their primary means of connecting to the internet. |
| 88 // Setting this flag has two consequences: |
| 89 // 1. Cellular data roaming will be enabled by default. |
| 90 // 2. UpdateEngine will be instructed to allow auto-updating over cellular |
| 91 // data connections. |
| 92 const char kCellularFirst[] = "cellular-first"; |
| 93 |
| 91 // Default large wallpaper to use for kids accounts (as path to trusted, | 94 // Default large wallpaper to use for kids accounts (as path to trusted, |
| 92 // non-user-writable JPEG file). | 95 // non-user-writable JPEG file). |
| 93 const char kChildWallpaperLarge[] = "child-wallpaper-large"; | 96 const char kChildWallpaperLarge[] = "child-wallpaper-large"; |
| 94 | 97 |
| 95 // Default small wallpaper to use for kids accounts (as path to trusted, | 98 // Default small wallpaper to use for kids accounts (as path to trusted, |
| 96 // non-user-writable JPEG file). | 99 // non-user-writable JPEG file). |
| 97 const char kChildWallpaperSmall[] = "child-wallpaper-small"; | 100 const char kChildWallpaperSmall[] = "child-wallpaper-small"; |
| 98 | 101 |
| 99 const char kConservativeThreshold[] = "conservative"; | 102 const char kConservativeThreshold[] = "conservative"; |
| 100 | 103 |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 504 |
| 502 bool IsGaiaIdMigrationStarted() { | 505 bool IsGaiaIdMigrationStarted() { |
| 503 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 506 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 504 if (!command_line->HasSwitch(kTestCrosGaiaIdMigration)) | 507 if (!command_line->HasSwitch(kTestCrosGaiaIdMigration)) |
| 505 return false; | 508 return false; |
| 506 | 509 |
| 507 return command_line->GetSwitchValueASCII(kTestCrosGaiaIdMigration) == | 510 return command_line->GetSwitchValueASCII(kTestCrosGaiaIdMigration) == |
| 508 kTestCrosGaiaIdMigrationStarted; | 511 kTestCrosGaiaIdMigrationStarted; |
| 509 } | 512 } |
| 510 | 513 |
| 514 bool IsCellularFirstDevice() { |
| 515 return base::CommandLine::ForCurrentProcess()->HasSwitch(kCellularFirst); |
| 516 } |
| 517 |
| 511 } // namespace switches | 518 } // namespace switches |
| 512 } // namespace chromeos | 519 } // namespace chromeos |
| OLD | NEW |