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

Side by Side Diff: chrome/browser/extensions/api/feedback_private/feedback_private_api.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
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_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_
7 7
8 #include "chrome/browser/extensions/chrome_extension_function.h" 8 #include "chrome/browser/extensions/chrome_extension_function.h"
9 #include "chrome/browser/feedback/system_logs/system_logs_fetcher_base.h"
9 #include "chrome/common/extensions/api/feedback_private.h" 10 #include "chrome/common/extensions/api/feedback_private.h"
10 #include "extensions/browser/browser_context_keyed_api_factory.h" 11 #include "extensions/browser/browser_context_keyed_api_factory.h"
11 #include "extensions/browser/extension_function.h" 12 #include "extensions/browser/extension_function.h"
12 #include "ui/gfx/geometry/rect.h" 13 #include "ui/gfx/geometry/rect.h"
13 14
14 namespace extensions { 15 namespace extensions {
15 16
16 class FeedbackService; 17 class FeedbackService;
17 18
18 class FeedbackPrivateAPI : public BrowserContextKeyedAPI { 19 class FeedbackPrivateAPI : public BrowserContextKeyedAPI {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 public: 75 public:
75 DECLARE_EXTENSION_FUNCTION("feedbackPrivate.getUserEmail", 76 DECLARE_EXTENSION_FUNCTION("feedbackPrivate.getUserEmail",
76 FEEDBACKPRIVATE_GETUSEREMAIL); 77 FEEDBACKPRIVATE_GETUSEREMAIL);
77 78
78 protected: 79 protected:
79 ~FeedbackPrivateGetUserEmailFunction() override {} 80 ~FeedbackPrivateGetUserEmailFunction() override {}
80 ResponseAction Run() override; 81 ResponseAction Run() override;
81 }; 82 };
82 83
83 class FeedbackPrivateGetSystemInformationFunction 84 class FeedbackPrivateGetSystemInformationFunction
84 : public ChromeAsyncExtensionFunction { 85 : public UIThreadExtensionFunction {
85 public: 86 public:
86 DECLARE_EXTENSION_FUNCTION("feedbackPrivate.getSystemInformation", 87 DECLARE_EXTENSION_FUNCTION("feedbackPrivate.getSystemInformation",
87 FEEDBACKPRIVATE_GETSYSTEMINFORMATION); 88 FEEDBACKPRIVATE_GETSYSTEMINFORMATION);
88 89
89 protected: 90 protected:
90 ~FeedbackPrivateGetSystemInformationFunction() override {} 91 ~FeedbackPrivateGetSystemInformationFunction() override {}
91 bool RunAsync() override; 92 ResponseAction Run() override;
92 93
93 private: 94 private:
94 void OnCompleted( 95 void OnCompleted(std::unique_ptr<system_logs::SystemLogsResponse> sys_info);
95 const std::vector<api::feedback_private::SystemInformation>& sys_info);
96 }; 96 };
97 97
98 class FeedbackPrivateSendFeedbackFunction 98 class FeedbackPrivateSendFeedbackFunction
99 : public ChromeAsyncExtensionFunction { 99 : public ChromeAsyncExtensionFunction {
100 public: 100 public:
101 DECLARE_EXTENSION_FUNCTION("feedbackPrivate.sendFeedback", 101 DECLARE_EXTENSION_FUNCTION("feedbackPrivate.sendFeedback",
102 FEEDBACKPRIVATE_SENDFEEDBACK); 102 FEEDBACKPRIVATE_SENDFEEDBACK);
103 103
104 protected: 104 protected:
105 ~FeedbackPrivateSendFeedbackFunction() override {} 105 ~FeedbackPrivateSendFeedbackFunction() override {}
(...skipping 10 matching lines...) Expand all
116 FEEDBACKPRIVATE_LOGSRTPROMPTRESULT); 116 FEEDBACKPRIVATE_LOGSRTPROMPTRESULT);
117 117
118 protected: 118 protected:
119 ~FeedbackPrivateLogSrtPromptResultFunction() override {} 119 ~FeedbackPrivateLogSrtPromptResultFunction() override {}
120 AsyncExtensionFunction::ResponseAction Run() override; 120 AsyncExtensionFunction::ResponseAction Run() override;
121 }; 121 };
122 122
123 } // namespace extensions 123 } // namespace extensions
124 124
125 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H _ 125 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H _
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/feedback_util.cc ('k') | chrome/browser/extensions/api/feedback_private/feedback_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698