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

Side by Side Diff: chrome/browser/chromeos/system/sysinfo_provider.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
« no previous file with comments | « no previous file | chrome/browser/chromeos/system/sysinfo_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SYSINFO_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_SYSINFO_PROVIDER_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "chrome/browser/cancelable_request.h"
12
13 class CancelableRequestConsumerBase;
14
15 namespace chromeos {
16 namespace system {
17
18 typedef std::map<std::string, std::string> SysInfoResponse;
19
20 // Provides CancelableRequests for fetching system info (network state, etc)
21 // from the ChromeOS debug daemon.
22 class SysInfoProvider : public CancelableRequestProvider {
23 public:
24 // Allocates a new SysInfoProvider and returns it.
25 static SysInfoProvider* Create();
26 virtual ~SysInfoProvider() {}
27
28 typedef base::Callback<void(SysInfoResponse*)> FetchCompleteCallback;
29
30 // Fetches system info from the debug daemon, attributing the request to
31 // |consumer|. Calls |callback| when all information has been fetched.
32 virtual Handle Fetch(CancelableRequestConsumerBase* consumer,
33 const FetchCompleteCallback& callback) = 0;
34 };
35
36 } // namespace system
37 } // namespace chromeos
38
39 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_SYSINFO_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/system/sysinfo_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698