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

Unified Diff: chromeos/dbus/fake_debug_daemon_client.cc

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, 2 months 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/fake_debug_daemon_client.cc
diff --git a/chromeos/dbus/fake_debug_daemon_client.cc b/chromeos/dbus/fake_debug_daemon_client.cc
index a1d75f6275558f1ff88c0916101e6e0100652b9b..551a116fba09a80becb6b72e3f056c41596c1512 100644
--- a/chromeos/dbus/fake_debug_daemon_client.cc
+++ b/chromeos/dbus/fake_debug_daemon_client.cc
@@ -8,10 +8,12 @@
#include <string>
#include <vector>
+#include "base/command_line.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
+#include "chromeos/chromeos_switches.h"
namespace chromeos {
@@ -120,4 +122,30 @@ void FakeDebugDaemonClient::TestICMPWithOptions(
void FakeDebugDaemonClient::UploadCrashes() {
}
+void FakeDebugDaemonClient::EnableDebuggingFeatures(
+ const std::string& password,
+ const DebugDaemonClient::EnableDebuggingCallback& callback) {
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback, true));
+}
+
+void FakeDebugDaemonClient::QueryDebuggingFeatures(
+ const DebugDaemonClient::QueryDevFeaturesCallback& callback) {
+ bool supported = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kSystemDevMode);
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(callback,
+ true,
+ static_cast<int>(
+ supported ? DebugDaemonClient::DEV_FEATURE_ROOTFS_VERIFICATION_REMOVED :
xiyuan 2014/10/31 03:36:01 nit: line too long.
zel 2014/10/31 23:23:43 Done.
+ DebugDaemonClient::DEV_FEATURES_DISABLED)));
+}
+
+void FakeDebugDaemonClient::RemoveRootfsVerification(
+ const DebugDaemonClient::EnableDebuggingCallback& callback) {
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback, true));
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698