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

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

Issue 794943003: Separate X11 implementation of touch log source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_x11.cc
diff --git a/chrome/browser/chromeos/system_logs/touch_log_source.cc b/chrome/browser/chromeos/system_logs/touch_log_source_x11.cc
similarity index 74%
copy from chrome/browser/chromeos/system_logs/touch_log_source.cc
copy to chrome/browser/chromeos/system_logs/touch_log_source_x11.cc
index 1f322b1fec1fe0b78ff411aba59db13962e701a6..b50f9d030f48c6863776e7f62b547732d7c48203 100644
--- a/chrome/browser/chromeos/system_logs/touch_log_source.cc
+++ b/chrome/browser/chromeos/system_logs/touch_log_source_x11.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
achuithb 2014/12/11 20:19:08 same as before
Shecky Lin 2014/12/12 08:31:22 Done.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -18,7 +18,7 @@ namespace {
const char kHUDLogDataKey[] = "hud_log";
-void GetTouchLogs(system_logs::SystemLogsResponse* response) {
+void GetTouchLogsX11(system_logs::SystemLogsResponse* response) {
scoped_ptr<base::DictionaryValue> dictionary =
ash::TouchHudDebug::GetAllAsDictionary();
if (!dictionary->empty()) {
@@ -29,18 +29,16 @@ void GetTouchLogs(system_logs::SystemLogsResponse* response) {
(*response)[kHUDLogDataKey] = touch_log;
}
- std::vector<std::pair<std::string, CommandLine> > commands;
+ std::vector<std::pair<std::string, CommandLine>> commands;
CommandLine command =
- CommandLine(base::FilePath("/opt/google/input/inputcontrol"));
+ 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"));
+ 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"));
+ command = CommandLine(base::FilePath("/opt/google/input/evdev_feedback"));
commands.push_back(
std::make_pair("hack-33025-touchscreen_activity", command));
@@ -55,20 +53,13 @@ void GetTouchLogs(system_logs::SystemLogsResponse* response) {
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(&GetTouchLogsX11, response),
base::Bind(callback, base::Owned(response)));
}

Powered by Google App Engine
This is Rietveld 408576698