Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: chromeos/dbus/debug_daemon_client.h

Issue 539273002: Added UI to enable debugging features on CrOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/debug_daemon_client.h
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h
index 36ef3b2201124c1b60547c9ab437f42baedfec1b..8e639b5883c0e1c4b400daa06811a104c5f0c3ea 100644
--- a/chromeos/dbus/debug_daemon_client.h
+++ b/chromeos/dbus/debug_daemon_client.h
@@ -145,6 +145,45 @@ 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 = 0x0000,
+ DEV_FEATURE_ROOTFS_VERIFICATION_REMOVED = 0x0001,
+ DEV_FEATURE_BOOT_FROM_USB_ENABLED = 0x0002,
+ DEV_FEATURE_SSH_SERVER_CONFIGURED = 0x0004,
+ DEV_FEATURE_DEV_MODE_ROOT_PASSWORD_SET = 0x0008,
+ DEV_FEATURE_SYSTEM_ROOT_PASSWORD_SET = 0x0010,
+ 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,
dpursell 2014/11/04 19:33:00 You may want DEV_FEATURES_SYSTEM_ROOT_PASSWORD_SET
zel 2014/11/11 01:02:28 Should I then add both DEV_FEATURES_SYSTEM_ROOT_PA
dpursell 2014/11/11 22:53:49 Yeah that would be my recommendation, that way we
zel 2014/11/12 16:04:40 Done.
+ DEV_FEATURES_DISABLED = -1,
+ };
+
+ // 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;

Powered by Google App Engine
This is Rietveld 408576698