Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_DEBUGD_LOG_FETCHER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_DEBUGD_LOG_FETCHER_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 | |
| 12 | |
| 13 #include "base/memory/weak_ptr.h" | |
| 14 #include "chrome/browser/chromeos/system/syslogs_fetcher.h" | |
| 15 | |
| 16 namespace chromeos { | |
| 17 namespace system { | |
| 18 | |
| 19 class DebugDaemonLogFetcher : public SysLogsInterface { | |
| 20 public: | |
| 21 DebugDaemonLogFetcher(); | |
| 22 ~DebugDaemonLogFetcher(); | |
| 23 | |
| 24 // Fetches logs from the daemon over dbus. After the fetch is complete, the | |
| 25 // results will be forwarded to the request supplied to the constructor and | |
| 26 // this instance will free itself. | |
| 27 void Fetch(SysLogsFetcherCallback); | |
| 28 | |
| 29 private: | |
| 30 // Callbacks | |
| 31 void GotRoutes(bool succeeded, const std::vector<std::string>& routes); | |
| 32 void GotNetworkStatus(bool succeeded, const std::string& status); | |
| 33 void GotModemStatus(bool succeeded, const std::string& status); | |
| 34 void GotLogs(bool succeeded, const std::map<std::string, std::string>& logs); | |
|
rkc1
2012/08/04 01:15:05
std::string,std::string
tudalex(Chromium)
2012/08/05 01:15:12
Done.
| |
| 35 void RequestCompleted(); | |
| 36 | |
| 37 SysInfoResponse* response_; | |
| 38 SysLogsFetcherCallback request_; | |
| 39 int pending_requests_; | |
| 40 base::WeakPtrFactory<DebugDaemonLogFetcher> weak_ptr_factory_; | |
| 41 }; | |
| 42 | |
| 43 } // namespace system | |
| 44 } // namespace chromeos | |
| 45 | |
| 46 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_DEBUGD_LOG_FETCHER_H_ | |
| OLD | NEW |