| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/syslogs_provider.h" | 5 #include "chrome/browser/chromeos/system/syslogs_provider.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/touch/touch_observer_hud.h" | |
| 9 #include "base/bind.h" | 8 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 11 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 12 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 13 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 14 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 15 #include "base/logging.h" | 14 #include "base/logging.h" |
| 16 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/singleton.h" | 16 #include "base/memory/singleton.h" |
| 18 #include "base/message_loop_proxy.h" | 17 #include "base/message_loop_proxy.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 // Include dbus statistics summary | 327 // Include dbus statistics summary |
| 329 (*logs)["dbus"] = dbus::statistics::GetAsString( | 328 (*logs)["dbus"] = dbus::statistics::GetAsString( |
| 330 dbus::statistics::SHOW_INTERFACE, | 329 dbus::statistics::SHOW_INTERFACE, |
| 331 dbus::statistics::FORMAT_ALL); | 330 dbus::statistics::FORMAT_ALL); |
| 332 | 331 |
| 333 // Include recent network log events | 332 // Include recent network log events |
| 334 (*logs)["network_event_log"] = chromeos::network_event_log::GetAsString( | 333 (*logs)["network_event_log"] = chromeos::network_event_log::GetAsString( |
| 335 chromeos::network_event_log::OLDEST_FIRST, | 334 chromeos::network_event_log::OLDEST_FIRST, |
| 336 chromeos::system::kFeedbackMaxLineCount); | 335 chromeos::system::kFeedbackMaxLineCount); |
| 337 | 336 |
| 338 if (ash::Shell::GetInstance()->touch_observer_hud()) { | |
| 339 (*logs)[kHUDLogDataKey] = | |
| 340 ash::Shell::GetInstance()->touch_observer_hud()->GetLogAsString(); | |
| 341 } | |
| 342 | |
| 343 // SyslogsMemoryHandler will clean itself up. | 337 // SyslogsMemoryHandler will clean itself up. |
| 344 // SyslogsMemoryHandler::OnDetailsAvailable() will modify |logs| and call | 338 // SyslogsMemoryHandler::OnDetailsAvailable() will modify |logs| and call |
| 345 // request->ForwardResult(logs, zip_content). | 339 // request->ForwardResult(logs, zip_content). |
| 346 scoped_refptr<SyslogsMemoryHandler> | 340 scoped_refptr<SyslogsMemoryHandler> |
| 347 handler(new SyslogsMemoryHandler(callback, logs, zip_content)); | 341 handler(new SyslogsMemoryHandler(callback, logs, zip_content)); |
| 348 // TODO(jamescook): Maybe we don't need to update histograms here? | 342 // TODO(jamescook): Maybe we don't need to update histograms here? |
| 349 handler->StartFetch(MemoryDetails::UPDATE_USER_METRICS); | 343 handler->StartFetch(MemoryDetails::UPDATE_USER_METRICS); |
| 350 } | 344 } |
| 351 | 345 |
| 352 void SyslogsProviderImpl::LoadCompressedLogs(const base::FilePath& zip_file, | 346 void SyslogsProviderImpl::LoadCompressedLogs(const base::FilePath& zip_file, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 return Singleton<SyslogsProviderImpl, | 396 return Singleton<SyslogsProviderImpl, |
| 403 DefaultSingletonTraits<SyslogsProviderImpl> >::get(); | 397 DefaultSingletonTraits<SyslogsProviderImpl> >::get(); |
| 404 } | 398 } |
| 405 | 399 |
| 406 SyslogsProvider* SyslogsProvider::GetInstance() { | 400 SyslogsProvider* SyslogsProvider::GetInstance() { |
| 407 return SyslogsProviderImpl::GetInstance(); | 401 return SyslogsProviderImpl::GetInstance(); |
| 408 } | 402 } |
| 409 | 403 |
| 410 } // namespace system | 404 } // namespace system |
| 411 } // namespace chromeos | 405 } // namespace chromeos |
| OLD | NEW |