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

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, 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
« no previous file with comments | « chromeos/dbus/fake_debug_daemon_client.h ('k') | ui/login/display_manager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..22837bc81442a1bd06fc42c525af1db68b94324c 100644
--- a/chromeos/dbus/fake_debug_daemon_client.cc
+++ b/chromeos/dbus/fake_debug_daemon_client.cc
@@ -10,12 +10,16 @@
#include "base/bind.h"
#include "base/callback.h"
+#include "base/command_line.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
+#include "chromeos/chromeos_switches.h"
namespace chromeos {
-FakeDebugDaemonClient::FakeDebugDaemonClient() {}
+FakeDebugDaemonClient::FakeDebugDaemonClient()
+ : featues_mask_(DebugDaemonClient::DEV_FEATURE_NONE) {
+}
FakeDebugDaemonClient::~FakeDebugDaemonClient() {}
@@ -120,4 +124,34 @@ 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::SetDebuggingFeaturesStatus(int featues_mask) {
+ featues_mask_ = featues_mask;
+}
+
+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 ? featues_mask_ :
+ DebugDaemonClient::DEV_FEATURES_DISABLED)));
+}
+
+void FakeDebugDaemonClient::RemoveRootfsVerification(
+ const DebugDaemonClient::EnableDebuggingCallback& callback) {
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback, true));
+}
+
} // namespace chromeos
« no previous file with comments | « chromeos/dbus/fake_debug_daemon_client.h ('k') | ui/login/display_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698