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

Side by Side Diff: chrome/browser/chromeos/system/debugd_log_fetcher.h

Issue 10827130: Refactoring the SysInfoProvider. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months 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 unified diff | Download patch
OLDNEW
(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 typedef
22 scoped_refptr<CancelableRequest<SysInfoProvider::FetchCompleteCallback> >
23 Request;
24
25 DebugDaemonLogFetcher();
26 ~DebugDaemonLogFetcher();
27
28 // Fetches logs from the daemon over dbus. After the fetch is complete, the
29 // results will be forwarded to the request supplied to the constructor and
30 // this instance will free itself.
31 void Fetch(SysLogsFetcherCallback);
32
33 private:
34 // Callbacks
35 void GotRoutes(bool succeeded, const std::vector<std::string>& routes);
36 void GotNetworkStatus(bool succeeded, const std::string& status);
37 void GotModemStatus(bool succeeded, const std::string& status);
38 void GotLogs(bool succeeded, const std::map<std::string, std::string>& logs);
39 void RequestCompleted();
40
41 SysInfoResponse* response_;
42 SysLogsFetcherCallback request_;
43 int pending_requests_;
44 base::WeakPtrFactory<DebugDaemonLogFetcher> weak_ptr_factory_;
45 };
46
47 } // namespace system
48 } // namespace chromeos
49
50 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_DEBUGD_LOG_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/system/debugd_log_fetcher.cc » ('j') | chrome/browser/chromeos/system/sysinfo_provider.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698