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

Side by Side Diff: chrome/browser/extensions/api/feedback_private/feedback_service.h

Issue 55363003: Send compressed histograms with system logs when sending feedback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 1 month 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
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_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_SERVICE_H_
7 7
8 #include <vector> 8 #include <vector>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 26 matching lines...) Expand all
37 const std::string& value); 37 const std::string& value);
38 38
39 virtual ~FeedbackService(); 39 virtual ~FeedbackService();
40 40
41 // Sends a feedback report. 41 // Sends a feedback report.
42 virtual void SendFeedback(Profile* profile, 42 virtual void SendFeedback(Profile* profile,
43 scoped_refptr<FeedbackData> feedback_data, 43 scoped_refptr<FeedbackData> feedback_data,
44 const SendFeedbackCallback& callback); 44 const SendFeedbackCallback& callback);
45 45
46 // Platform specific methods: 46 // Platform specific methods:
47 // Get's the email address of the logged in user. 47 // Gets the email address of the logged in user.
48 virtual std::string GetUserEmail() = 0; 48 virtual std::string GetUserEmail() = 0;
49 49
50 // Start to gather system information. 50 // Start to gather system information.
51 // The |callback| will be invoked once the query is completed. 51 // The |callback| will be invoked once the query is completed.
52 virtual void GetSystemInformation( 52 virtual void GetSystemInformation(
53 const GetSystemInformationCallback& callback) = 0; 53 const GetSystemInformationCallback& callback) = 0;
54 54
55 // Gets the histograms in JSON.
56 virtual void GetHistograms(std::string* histograms) = 0;
57
55 protected: 58 protected:
56 FeedbackService(); 59 FeedbackService();
57 60
58 // Used to get a weak ptr for a derived class instance. 61 // Used to get a weak ptr for a derived class instance.
59 virtual base::WeakPtr<FeedbackService> GetWeakPtr() = 0; 62 virtual base::WeakPtr<FeedbackService> GetWeakPtr() = 0;
60 63
61 // Callbacks to receive blob data. 64 // Callbacks to receive blob data.
62 void AttachedFileCallback(scoped_ptr<std::string> data); 65 void AttachedFileCallback(scoped_ptr<std::string> data);
63 void ScreenshotCallback(scoped_ptr<std::string> data); 66 void ScreenshotCallback(scoped_ptr<std::string> data);
64 67
65 // Checks if we have read all the blobs we need to; signals the feedback 68 // Checks if we have read all the blobs we need to; signals the feedback
66 // data object once all the requisite data has been populated. 69 // data object once all the requisite data has been populated.
67 void CompleteSendFeedback(); 70 void CompleteSendFeedback();
68 71
69 GetSystemInformationCallback system_information_callback_; 72 GetSystemInformationCallback system_information_callback_;
70 SendFeedbackCallback send_feedback_callback_; 73 SendFeedbackCallback send_feedback_callback_;
71 74
72 scoped_refptr<FeedbackData> feedback_data_; 75 scoped_refptr<FeedbackData> feedback_data_;
73 76
74 DISALLOW_COPY_AND_ASSIGN(FeedbackService); 77 DISALLOW_COPY_AND_ASSIGN(FeedbackService);
75 }; 78 };
76 79
77 } // namespace extensions 80 } // namespace extensions
78 81
79 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_SERVICE_H_ 82 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698