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

Unified Diff: chrome/browser/chromeos/system_logs/touch_log_source_ozone.cc

Issue 794943003: Separate X11 implementation of touch log source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot rebase Created 6 years 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: chrome/browser/chromeos/system_logs/touch_log_source_ozone.cc
diff --git a/chrome/browser/chromeos/system_logs/touch_log_source.cc b/chrome/browser/chromeos/system_logs/touch_log_source_ozone.cc
similarity index 57%
copy from chrome/browser/chromeos/system_logs/touch_log_source.cc
copy to chrome/browser/chromeos/system_logs/touch_log_source_ozone.cc
index 1f322b1fec1fe0b78ff411aba59db13962e701a6..3e9f16524ca3b09afa34f637be703fbd256ced40 100644
--- a/chrome/browser/chromeos/system_logs/touch_log_source.cc
+++ b/chrome/browser/chromeos/system_logs/touch_log_source_ozone.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/json/json_string_value_serializer.h"
+#include "base/logging.h"
#include "base/process/launch.h"
#include "components/feedback/feedback_util.h"
#include "content/public/browser/browser_thread.h"
@@ -18,7 +19,7 @@ namespace {
const char kHUDLogDataKey[] = "hud_log";
-void GetTouchLogs(system_logs::SystemLogsResponse* response) {
+void GetTouchLogsOzone(system_logs::SystemLogsResponse* response) {
scoped_ptr<base::DictionaryValue> dictionary =
ash::TouchHudDebug::GetAllAsDictionary();
if (!dictionary->empty()) {
@@ -29,46 +30,22 @@ void GetTouchLogs(system_logs::SystemLogsResponse* response) {
(*response)[kHUDLogDataKey] = touch_log;
}
- std::vector<std::pair<std::string, CommandLine> > commands;
- CommandLine command =
- CommandLine(base::FilePath("/opt/google/input/inputcontrol"));
- command.AppendArg("--status");
- commands.push_back(std::make_pair("hack-33025-touchpad", command));
-
- command =
- CommandLine(base::FilePath("/opt/google/input/cmt_feedback"));
- commands.push_back(std::make_pair("hack-33025-touchpad_activity", command));
-
- command = CommandLine(
- base::FilePath("/opt/google/input/evdev_feedback"));
- commands.push_back(
- std::make_pair("hack-33025-touchscreen_activity", command));
-
- for (size_t i = 0; i < commands.size(); ++i) {
- std::string output;
- base::GetAppOutput(commands[i].second, &output);
- (*response)[commands[i].first] = output;
- }
+ // TODO(sheckylin): Add ozone touch log collection implementation. See
+ // http://crbug.com/400022.
+ NOTIMPLEMENTED();
}
} // namespace
namespace system_logs {
-TouchLogSource::TouchLogSource() : SystemLogsSource("Touch") {
-}
-
-TouchLogSource::~TouchLogSource() {
-}
-
void TouchLogSource::Fetch(const SysLogsSourceCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
SystemLogsResponse* response = new SystemLogsResponse;
BrowserThread::PostBlockingPoolTaskAndReply(
- FROM_HERE,
- base::Bind(&GetTouchLogs, response),
+ FROM_HERE, base::Bind(&GetTouchLogsOzone, response),
base::Bind(callback, base::Owned(response)));
}
« no previous file with comments | « chrome/browser/chromeos/system_logs/touch_log_source.cc ('k') | chrome/browser/chromeos/system_logs/touch_log_source_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698