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

Side by Side Diff: chrome/browser/feedback/feedback_data.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: Addressed feedback feedback 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 (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>
(...skipping 18 matching lines...) Expand all
29 29
30 FeedbackData(); 30 FeedbackData();
31 31
32 // Called once we've updated all the data from the feedback page. 32 // Called once we've updated all the data from the feedback page.
33 void OnFeedbackPageDataComplete(); 33 void OnFeedbackPageDataComplete();
34 34
35 // Sets the system information for this instance and kicks off its 35 // Sets the system information for this instance and kicks off its
36 // compression. 36 // compression.
37 void SetAndCompressSystemInfo(scoped_ptr<SystemLogsMap> sys_info); 37 void SetAndCompressSystemInfo(scoped_ptr<SystemLogsMap> sys_info);
38 38
39 // Sets the system information for this instance and kicks off its 39 // Sets the histograms for this instance and kicks off its
40 // compression. 40 // compression.
41 void SetAndCompressHistograms(scoped_ptr<std::string> histograms);
42
43 // Sets the attached file data and kicks off its compression.
41 void AttachAndCompressFileData(scoped_ptr<std::string> attached_filedata); 44 void AttachAndCompressFileData(scoped_ptr<std::string> attached_filedata);
42 45
43 // Called once we have compressed our system logs. 46 // Called once we have compressed our system logs.
44 void OnCompressLogsComplete(scoped_ptr<std::string> compressed_logs); 47 void OnCompressLogsComplete(scoped_ptr<std::string> compressed_logs);
45 48
49 // Called once we have compressed our histograms.
50 void OnCompressHistogramsComplete(
51 scoped_ptr<std::string> compressed_histograms);
52
46 // Called once we have compressed our attached file. 53 // Called once we have compressed our attached file.
47 void OnCompressFileComplete(scoped_ptr<std::string> compressed_file); 54 void OnCompressFileComplete(scoped_ptr<std::string> compressed_file);
48 55
49 // Returns true if we've completed all the tasks needed before we can send 56 // Returns true if we've completed all the tasks needed before we can send
50 // feedback - at this time this is includes getting the feedback page data 57 // feedback - at this time this is includes getting the feedback page data
51 // and compressing the system logs. 58 // and compressing the system logs.
52 bool IsDataComplete(); 59 bool IsDataComplete();
53 60
54 // Sends the feedback report if we have all our data complete. 61 // Sends the feedback report if we have all our data complete.
55 void SendReport(); 62 void SendReport();
56 63
57 // Getters 64 // Getters
58 Profile* profile() const { return profile_; } 65 Profile* profile() const { return profile_; }
59 const std::string& category_tag() const { return category_tag_; } 66 const std::string& category_tag() const { return category_tag_; }
60 const std::string& page_url() const { return page_url_; } 67 const std::string& page_url() const { return page_url_; }
61 const std::string& description() const { return description_; } 68 const std::string& description() const { return description_; }
62 const std::string& user_email() const { return user_email_; } 69 const std::string& user_email() const { return user_email_; }
63 std::string* image() const { return image_.get(); } 70 std::string* image() const { return image_.get(); }
64 const std::string attached_filename() const { return attached_filename_; } 71 const std::string attached_filename() const { return attached_filename_; }
65 const std::string attached_file_uuid() const { return attached_file_uuid_; } 72 const std::string attached_file_uuid() const { return attached_file_uuid_; }
66 std::string* attached_filedata() const { return attached_filedata_.get(); } 73 std::string* attached_filedata() const { return attached_filedata_.get(); }
67 const std::string screenshot_uuid() const { return screenshot_uuid_; } 74 const std::string screenshot_uuid() const { return screenshot_uuid_; }
68 int trace_id() const { return trace_id_; } 75 int trace_id() const { return trace_id_; }
69 SystemLogsMap* sys_info() const { return sys_info_.get(); } 76 SystemLogsMap* sys_info() const { return sys_info_.get(); }
70 std::string* compressed_logs() const { return compressed_logs_.get(); } 77 std::string* compressed_logs() const { return compressed_logs_.get(); }
78 std::string* histograms() const { return histograms_.get(); }
79 std::string* compressed_histograms() const {
80 return compressed_histograms_.get();
81 }
71 82
72 // Setters 83 // Setters
73 void set_profile(Profile* profile) { profile_ = profile; } 84 void set_profile(Profile* profile) { profile_ = profile; }
74 void set_category_tag(const std::string& category_tag) { 85 void set_category_tag(const std::string& category_tag) {
75 category_tag_ = category_tag; 86 category_tag_ = category_tag;
76 } 87 }
77 void set_page_url(const std::string& page_url) { page_url_ = page_url; } 88 void set_page_url(const std::string& page_url) { page_url_ = page_url; }
78 void set_description(const std::string& description) { 89 void set_description(const std::string& description) {
79 description_ = description; 90 description_ = description;
80 } 91 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 scoped_ptr<std::string> attached_filedata_; 123 scoped_ptr<std::string> attached_filedata_;
113 124
114 std::string attached_file_uuid_; 125 std::string attached_file_uuid_;
115 std::string screenshot_uuid_; 126 std::string screenshot_uuid_;
116 127
117 int trace_id_; 128 int trace_id_;
118 129
119 scoped_ptr<SystemLogsMap> sys_info_; 130 scoped_ptr<SystemLogsMap> sys_info_;
120 scoped_ptr<std::string> compressed_logs_; 131 scoped_ptr<std::string> compressed_logs_;
121 132
133 scoped_ptr<std::string> histograms_;
134 scoped_ptr<std::string> compressed_histograms_;
135
136 // TODO(rkc): Refactor compressing logic into a simpler common implementation.
122 bool feedback_page_data_complete_; 137 bool feedback_page_data_complete_;
123 bool syslogs_compression_complete_; 138 bool syslogs_compression_complete_;
139 bool histograms_compression_complete_;
124 bool attached_file_compression_complete_; 140 bool attached_file_compression_complete_;
125 bool report_sent_; 141 bool report_sent_;
126 142
127 DISALLOW_COPY_AND_ASSIGN(FeedbackData); 143 DISALLOW_COPY_AND_ASSIGN(FeedbackData);
128 }; 144 };
129 145
130 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_ 146 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698