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

Side by Side Diff: chrome/browser/feedback/system_logs/system_logs_fetcher_base.h

Issue 2635473003: Optimize sending sys info to the feedback app (Closed)
Patch Set: Xiyuan's comments Created 3 years, 11 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 | « chrome/browser/extensions/api/feedback_private/feedback_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SYSTEM_LOGS_FETCHER_BASE_H_ 5 #ifndef CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SYSTEM_LOGS_FETCHER_BASE_H_
6 #define CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SYSTEM_LOGS_FETCHER_BASE_H_ 6 #define CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SYSTEM_LOGS_FETCHER_BASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/scoped_vector.h" 16 #include "base/memory/scoped_vector.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "components/feedback/feedback_common.h"
18 19
19 namespace system_logs { 20 namespace system_logs {
20 21
21 typedef std::map<std::string, std::string> SystemLogsResponse; 22 using SystemLogsResponse = FeedbackCommon::SystemLogsMap;
22 23
23 // Callback that the data sources use to return data. 24 // Callback that the data sources use to return data.
24 typedef base::Callback<void(SystemLogsResponse* response)> 25 using SysLogsSourceCallback = base::Callback<void(SystemLogsResponse*)>;
25 SysLogsSourceCallback;
26 26
27 // Callback that the SystemLogsFetcherBase uses to return data. 27 // Callback that the SystemLogsFetcherBase uses to return data.
28 typedef base::Callback<void(std::unique_ptr<SystemLogsResponse> response)> 28 using SysLogsFetcherCallback =
29 SysLogsFetcherCallback; 29 base::Callback<void(std::unique_ptr<SystemLogsResponse>)>;
30 30
31 // The SystemLogsSource provides a interface for the data sources that 31 // The SystemLogsSource provides a interface for the data sources that
32 // the SystemLogsFetcherBase class uses to fetch logs and other 32 // the SystemLogsFetcherBase class uses to fetch logs and other
33 // information. 33 // information.
34 class SystemLogsSource { 34 class SystemLogsSource {
35 public: 35 public:
36 // |source_name| provides a descriptive identifier for debugging. 36 // |source_name| provides a descriptive identifier for debugging.
37 explicit SystemLogsSource(const std::string& source_name); 37 explicit SystemLogsSource(const std::string& source_name);
38 virtual ~SystemLogsSource(); 38 virtual ~SystemLogsSource();
39 39
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 size_t num_pending_requests_; // The number of callbacks it should get. 90 size_t num_pending_requests_; // The number of callbacks it should get.
91 91
92 private: 92 private:
93 93
94 DISALLOW_COPY_AND_ASSIGN(SystemLogsFetcherBase); 94 DISALLOW_COPY_AND_ASSIGN(SystemLogsFetcherBase);
95 }; 95 };
96 96
97 } // namespace system_logs 97 } // namespace system_logs
98 98
99 #endif // CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SYSTEM_LOGS_FETCHER_BASE_H_ 99 #endif // CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SYSTEM_LOGS_FETCHER_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/feedback_private/feedback_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698