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

Side by Side Diff: chrome/browser/chromeos/system_logs/debug_daemon_log_source.h

Issue 22532012: Use scrubbed logs for sending with feedback reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_DAEMON_LOG_SOURCE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_DAEMON_LOG_SOURCE_H_
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_DAEMON_LOG_SOURCE_H_ 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_DAEMON_LOG_SOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/chromeos/system_logs/system_logs_fetcher.h" 13 #include "chrome/browser/chromeos/system_logs/system_logs_fetcher_base.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 // Gathers log data from Debug Daemon. 17 // Gathers log data from Debug Daemon.
18 class DebugDaemonLogSource : public SystemLogsSource { 18 class DebugDaemonLogSource : public SystemLogsSource {
19 public: 19 public:
20 DebugDaemonLogSource(); 20 explicit DebugDaemonLogSource(bool scrub);
21 virtual ~DebugDaemonLogSource(); 21 virtual ~DebugDaemonLogSource();
22 22
23 // SystemLogsSource override: 23 // SystemLogsSource override:
24 // Fetches logs from the daemon over dbus. After the fetch is complete, the 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 25 // results will be forwarded to the request supplied to the constructor and
26 // this instance will free itself. 26 // this instance will free itself.
27 virtual void Fetch(const SysLogsSourceCallback& callback) OVERRIDE; 27 virtual void Fetch(const SysLogsSourceCallback& callback) OVERRIDE;
28 28
29 private: 29 private:
30 typedef std::map<std::string, std::string> KeyValueMap; 30 typedef std::map<std::string, std::string> KeyValueMap;
(...skipping 11 matching lines...) Expand all
42 // Read the contents of the specified user logs files and adds it to 42 // Read the contents of the specified user logs files and adds it to
43 // the response. 43 // the response.
44 void ReadUserLogFiles(const KeyValueMap& user_log_files); 44 void ReadUserLogFiles(const KeyValueMap& user_log_files);
45 45
46 // Sends the data to the callback_ when all the requests are completed 46 // Sends the data to the callback_ when all the requests are completed
47 void RequestCompleted(); 47 void RequestCompleted();
48 48
49 scoped_ptr<SystemLogsResponse> response_; 49 scoped_ptr<SystemLogsResponse> response_;
50 SysLogsSourceCallback callback_; 50 SysLogsSourceCallback callback_;
51 int num_pending_requests_; 51 int num_pending_requests_;
52 bool scrub_;
52 base::WeakPtrFactory<DebugDaemonLogSource> weak_ptr_factory_; 53 base::WeakPtrFactory<DebugDaemonLogSource> weak_ptr_factory_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(DebugDaemonLogSource); 55 DISALLOW_COPY_AND_ASSIGN(DebugDaemonLogSource);
55 }; 56 };
56 57
57 58
58 } // namespace chromeos 59 } // namespace chromeos
59 60
60 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_DAEMON_LOG_SOURCE_H_ 61 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_DAEMON_LOG_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system_logs/dbus_log_source.cc ('k') | chrome/browser/chromeos/system_logs/debug_daemon_log_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698