| OLD | NEW |
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "chrome/browser/extensions/blob_reader.h" | 16 #include "chrome/browser/extensions/blob_reader.h" |
| 17 #include "chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h" | 17 #include "chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h" |
| 18 #include "chrome/common/extensions/api/feedback_private.h" | 18 #include "chrome/common/extensions/api/feedback_private.h" |
| 19 #include "components/feedback/feedback_data.h" | 19 #include "components/feedback/feedback_data.h" |
| 20 | 20 |
| 21 class Profile; | 21 class Profile; |
| 22 | 22 |
| 23 using extensions::api::feedback_private::SystemInformation; | |
| 24 | |
| 25 namespace extensions { | 23 namespace extensions { |
| 26 | 24 |
| 27 using SystemInformationList = std::vector<linked_ptr<SystemInformation>>; | 25 using SystemInformationList = |
| 26 std::vector<api::feedback_private::SystemInformation>; |
| 28 | 27 |
| 29 // The feedback service provides the ability to gather the various pieces of | 28 // The feedback service provides the ability to gather the various pieces of |
| 30 // data needed to send a feedback report and then send the report once all | 29 // data needed to send a feedback report and then send the report once all |
| 31 // the pieces are available. | 30 // the pieces are available. |
| 32 class FeedbackService : public base::SupportsWeakPtr<FeedbackService> { | 31 class FeedbackService : public base::SupportsWeakPtr<FeedbackService> { |
| 33 public: | 32 public: |
| 34 using SendFeedbackCallback = base::Callback<void(bool)>; | 33 using SendFeedbackCallback = base::Callback<void(bool)>; |
| 35 using GetSystemInformationCallback = | 34 using GetSystemInformationCallback = |
| 36 base::Callback<void(const SystemInformationList&)>; | 35 base::Callback<void(const SystemInformationList&)>; |
| 37 | 36 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 66 // data object once all the requisite data has been populated. | 65 // data object once all the requisite data has been populated. |
| 67 void CompleteSendFeedback(scoped_refptr<feedback::FeedbackData> feedback_data, | 66 void CompleteSendFeedback(scoped_refptr<feedback::FeedbackData> feedback_data, |
| 68 const SendFeedbackCallback& callback); | 67 const SendFeedbackCallback& callback); |
| 69 | 68 |
| 70 DISALLOW_COPY_AND_ASSIGN(FeedbackService); | 69 DISALLOW_COPY_AND_ASSIGN(FeedbackService); |
| 71 }; | 70 }; |
| 72 | 71 |
| 73 } // namespace extensions | 72 } // namespace extensions |
| 74 | 73 |
| 75 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_SERVICE_H_ | 74 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_SERVICE_H_ |
| OLD | NEW |