| OLD | NEW |
| 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_FEEDBACK_FEEDBACK_DATA_H_ | 5 #ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_ |
| 6 #define CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_ | 6 #define CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_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/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class FilePath; | 17 class FilePath; |
| 18 } | 18 } |
| 19 class Profile; | 19 class Profile; |
| 20 | 20 |
| 21 class FeedbackData : public base::RefCountedThreadSafe<FeedbackData> { | 21 class FeedbackData : public base::RefCountedThreadSafe<FeedbackData> { |
| 22 public: | 22 public: |
| 23 typedef std::map<std::string, std::string> SystemLogsMap; | 23 typedef std::map<std::string, std::string> SystemLogsMap; |
| 24 | 24 |
| 25 static const char kScreensizeHeightKey[]; | 25 static const char kScreensizeHeightKey[]; |
| 26 static const char kScreensizeWidthKey[]; | 26 static const char kScreensizeWidthKey[]; |
| 27 | 27 |
| 28 FeedbackData(); | 28 FeedbackData(); |
| 29 | 29 |
| 30 // Called once we've update all the data from the feedback page. | 30 // Called once we've updated all the data from the feedback page. |
| 31 void OnFeedbackPageDataComplete(); | 31 void OnFeedbackPageDataComplete(); |
| 32 | 32 |
| 33 // Called once we have read our system logs. | 33 // Called once we have compressed our system logs. |
| 34 void CompressSyslogs(scoped_ptr<SystemLogsMap> sys_info); | 34 void OnCompressLogsComplete(scoped_ptr<std::string> compressed_logs); |
| 35 | |
| 36 // Called once we have read and compressed our system logs. | |
| 37 void OnCompressLogsComplete(scoped_ptr<SystemLogsMap> sys_info, | |
| 38 scoped_ptr<std::string> compressed_logs); | |
| 39 | 35 |
| 40 // Returns true if we've completed all the tasks needed before we can send | 36 // Returns true if we've completed all the tasks needed before we can send |
| 41 // feedback - at this time this is includes getting the feedback page data | 37 // feedback - at this time this is includes getting the feedback page data |
| 42 // and compressing the system logs. | 38 // and compressing the system logs. |
| 43 bool IsDataComplete(); | 39 bool IsDataComplete(); |
| 44 | 40 |
| 45 // Sends the feedback report if we have all our data complete. | 41 // Sends the feedback report if we have all our data complete. |
| 46 void SendReport(); | 42 void SendReport(); |
| 47 | 43 |
| 48 // Starts reading the file to attach to this report into the string | 44 // Starts reading the file to attach to this report into the string |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 105 |
| 110 bool feedback_page_data_complete_; | 106 bool feedback_page_data_complete_; |
| 111 bool syslogs_compression_complete_; | 107 bool syslogs_compression_complete_; |
| 112 | 108 |
| 113 bool report_sent_; | 109 bool report_sent_; |
| 114 | 110 |
| 115 DISALLOW_COPY_AND_ASSIGN(FeedbackData); | 111 DISALLOW_COPY_AND_ASSIGN(FeedbackData); |
| 116 }; | 112 }; |
| 117 | 113 |
| 118 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_ | 114 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_ |
| OLD | NEW |