diff options
author | zelidrag <zelidrag@chromium.org> | 2014-11-13 20:05:53 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-14 04:06:10 +0000 |
commit | 459b11b10f0f18c4111bcfa973be5244171f1412 (patch) | |
tree | 9fbaf5f612ccf17981138a87fc11e989494bc486 /chromeos/dbus/debug_daemon_client.h | |
parent | 04a9958219dd71e823dc04819abe75b5f9eb7e38 (diff) | |
download | chromium_src-459b11b10f0f18c4111bcfa973be5244171f1412.zip chromium_src-459b11b10f0f18c4111bcfa973be5244171f1412.tar.gz chromium_src-459b11b10f0f18c4111bcfa973be5244171f1412.tar.bz2 |
Added UI to enable debugging features on CrOS
BUG=403165
TEST=EnableDebuggingNonDevTest.NoShowInNonDevMode, EnableDebuggingTest.ShowAndCancelRemoveProtection, EnableDebuggingTest.ShowAndRemoveProtection, EnableDebuggingTest.ShowSetup, WizardControllerEnableDebuggingTest.ShowAndCancelEnableDebugging
TBR=mnissler
Review URL: https://codereview.chromium.org/539273002
Cr-Commit-Position: refs/heads/master@{#304161}
Diffstat (limited to 'chromeos/dbus/debug_daemon_client.h')
-rw-r--r-- | chromeos/dbus/debug_daemon_client.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h index 36ef3b2..fd8bc83 100644 --- a/chromeos/dbus/debug_daemon_client.h +++ b/chromeos/dbus/debug_daemon_client.h @@ -145,6 +145,46 @@ class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient { const std::map<std::string, std::string>& options, const TestICMPCallback& callback) = 0; + // Called once EnableDebuggingFeatures() is complete. |succeeded| will be true + // if debugging features have been successfully enabled. + typedef base::Callback<void(bool succeeded)> EnableDebuggingCallback; + + // Enables debugging features (sshd, boot from USB). |password| is a new + // password for root user. Can be only called in dev mode. + virtual void EnableDebuggingFeatures( + const std::string& password, + const EnableDebuggingCallback& callback) = 0; + + enum DebuggingFeature { + DEV_FEATURE_NONE = 0, + DEV_FEATURES_DISABLED = 1 << 0, + DEV_FEATURE_ROOTFS_VERIFICATION_REMOVED = 1 << 1, + DEV_FEATURE_BOOT_FROM_USB_ENABLED = 1 << 2, + DEV_FEATURE_SSH_SERVER_CONFIGURED = 1 << 3, + DEV_FEATURE_DEV_MODE_ROOT_PASSWORD_SET = 1 << 4, + DEV_FEATURE_SYSTEM_ROOT_PASSWORD_SET = 1 << 5, + DEV_FEATURE_ALL_ENABLED = + DEV_FEATURE_ROOTFS_VERIFICATION_REMOVED | + DEV_FEATURE_BOOT_FROM_USB_ENABLED | + DEV_FEATURE_SSH_SERVER_CONFIGURED | + DEV_FEATURE_DEV_MODE_ROOT_PASSWORD_SET | + DEV_FEATURE_DEV_MODE_ROOT_PASSWORD_SET, + }; + + // Called once QueryDebuggingFeatures() is complete. |succeeded| will be true + // if debugging features have been successfully enabled. |feature_mask| is a + // bitmask made out of DebuggingFeature enum values. + typedef base::Callback<void(bool succeeded, + int feature_mask)> QueryDevFeaturesCallback; + // Checks which debugging features have been already enabled. + virtual void QueryDebuggingFeatures( + const QueryDevFeaturesCallback& callback) = 0; + + // Removes rootfs verification from the file system. Can be only called in + // dev mode. + virtual void RemoveRootfsVerification( + const EnableDebuggingCallback& callback) = 0; + // Trigger uploading of crashes. virtual void UploadCrashes() = 0; |