| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/system_logs/touch_log_source.h" | 5 #include "chrome/browser/chromeos/system_logs/touch_log_source.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/touch/touch_observer_hud.h" | 8 #include "ash/touch/touch_observer_hud.h" |
| 9 #include "chrome/browser/feedback/feedback_util.h" | 9 #include "chrome/browser/feedback/feedback_util.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 11 | 11 |
| 12 const char kHUDLogDataKey[] = "hud_log"; |
| 13 |
| 12 namespace chromeos { | 14 namespace chromeos { |
| 13 | 15 |
| 14 TouchLogSource::TouchLogSource() { | 16 TouchLogSource::TouchLogSource() { |
| 15 } | 17 } |
| 16 | 18 |
| 17 TouchLogSource::~TouchLogSource() { | 19 TouchLogSource::~TouchLogSource() { |
| 18 } | 20 } |
| 19 | 21 |
| 20 void TouchLogSource::Fetch(const SysLogsSourceCallback& callback) { | 22 void TouchLogSource::Fetch(const SysLogsSourceCallback& callback) { |
| 21 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 23 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 22 DCHECK(!callback.is_null()); | 24 DCHECK(!callback.is_null()); |
| 23 | 25 |
| 24 SystemLogsResponse response; | 26 SystemLogsResponse response; |
| 25 if (ash::Shell::GetInstance()->touch_observer_hud()) { | 27 if (ash::Shell::GetInstance()->touch_observer_hud()) { |
| 26 response[kHUDLogDataKey] = | 28 response[kHUDLogDataKey] = |
| 27 ash::Shell::GetInstance()->touch_observer_hud()->GetLogAsString(); | 29 ash::Shell::GetInstance()->touch_observer_hud()->GetLogAsString(); |
| 28 } | 30 } |
| 29 callback.Run(&response); | 31 callback.Run(&response); |
| 30 } | 32 } |
| 31 | 33 |
| 32 } // namespace chromeos | 34 } // namespace chromeos |
| OLD | NEW |