summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/feedback_private/feedback_service.h
diff options
context:
space:
mode:
authorrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 04:14:53 +0000
committerrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 04:14:53 +0000
commit032a8135b71b5d2f8d2560c615211252a5d13b9a (patch)
tree753041211d1cb78d47ae31b5de041bba247c9859 /chrome/browser/extensions/api/feedback_private/feedback_service.h
parent882f1f3ccf95c07ff30c6fac5dd2a40a89e20d2d (diff)
downloadchromium_src-032a8135b71b5d2f8d2560c615211252a5d13b9a.zip
chromium_src-032a8135b71b5d2f8d2560c615211252a5d13b9a.tar.gz
chromium_src-032a8135b71b5d2f8d2560c615211252a5d13b9a.tar.bz2
Enable gathering and sending system logs for Desktop Chrome.
Currently the system log gathering code is only limited to ChromeOS. Move the code out of ChromeOS so it can be used by regular Chrome. The code has been refactored to leave the ChromeOS specific logs gathering code under the c/b/chromeos directory while moving the general system logs code under the c/b/feedback directory. We didn't move system_logs directory under c/b/ since system logs are mostly related with feedback and to keep the c/b/ clutter low. Individual developers can add their own additional logs for Chrome under c/b/feedback/system_logs/log_sources following the *_log_source.* templates already there. R=asargent@chromium.org, xiyuan@chromium.org BUG=306532 Review URL: https://codereview.chromium.org/105873004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241477 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/feedback_private/feedback_service.h')
-rw-r--r--chrome/browser/extensions/api/feedback_private/feedback_service.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/chrome/browser/extensions/api/feedback_private/feedback_service.h b/chrome/browser/extensions/api/feedback_private/feedback_service.h
index 04acac4..9886149 100644
--- a/chrome/browser/extensions/api/feedback_private/feedback_service.h
+++ b/chrome/browser/extensions/api/feedback_private/feedback_service.h
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/extensions/blob_reader.h"
#include "chrome/browser/feedback/feedback_data.h"
+#include "chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h"
#include "chrome/common/extensions/api/feedback_private.h"
class Profile;
@@ -30,28 +31,22 @@ class FeedbackService {
// Creates a platform-specific FeedbackService instance.
static FeedbackService* CreateInstance();
- // Convenience method for populating a SystemInformationList structure
- // with a key/value pair.
- static void PopulateSystemInfo(SystemInformationList* sys_info_list,
- const std::string& key,
- const std::string& value);
virtual ~FeedbackService();
// Sends a feedback report.
- virtual void SendFeedback(Profile* profile,
- scoped_refptr<FeedbackData> feedback_data,
- const SendFeedbackCallback& callback);
+ void SendFeedback(Profile* profile,
+ scoped_refptr<FeedbackData> feedback_data,
+ const SendFeedbackCallback& callback);
+
+ // Start to gather system information.
+ // The |callback| will be invoked once the query is completed.
+ void GetSystemInformation(const GetSystemInformationCallback& callback);
// Platform specific methods:
// Gets the email address of the logged in user.
virtual std::string GetUserEmail() = 0;
- // Start to gather system information.
- // The |callback| will be invoked once the query is completed.
- virtual void GetSystemInformation(
- const GetSystemInformationCallback& callback) = 0;
-
// Gets the histograms in JSON.
virtual void GetHistograms(std::string* histograms) = 0;
@@ -69,6 +64,10 @@ class FeedbackService {
// data object once all the requisite data has been populated.
void CompleteSendFeedback();
+ private:
+ void OnSystemLogsFetchComplete(
+ scoped_ptr<system_logs::SystemLogsResponse> sys_info);
+
GetSystemInformationCallback system_information_callback_;
SendFeedbackCallback send_feedback_callback_;