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

Side by Side Diff: chrome/browser/feedback/feedback_data.h

Issue 9006003: Refactor and fix feedback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2011 -> 2012 Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/feedback/feedback_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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_BUG_REPORT_DATA_H_ 5 #ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_
6 #define CHROME_BROWSER_BUG_REPORT_DATA_H_ 6 #define CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/ui/webui/screenshot_source.h" 12 #include "chrome/browser/ui/webui/screenshot_source.h"
13 13
14 #if defined(OS_CHROMEOS) 14 #if defined(OS_CHROMEOS)
15 #include "chrome/browser/chromeos/system/syslogs_provider.h" 15 #include "chrome/browser/chromeos/system/syslogs_provider.h"
16 #endif 16 #endif
17 17
18 class Profile; 18 class Profile;
19 19
20 class BugReportData { 20 class FeedbackData {
21 public: 21 public:
22 BugReportData(); 22 FeedbackData();
23 ~BugReportData(); 23 ~FeedbackData();
24 24
25 void SendReport(); 25 void SendReport();
26 26
27 void UpdateData(Profile* profile, 27 void UpdateData(Profile* profile,
28 const std::string& target_tab_url, 28 const std::string& target_tab_url,
29 const int problem_type, 29 const std::string& category_tag,
30 const std::string& page_url, 30 const std::string& page_url,
31 const std::string& description, 31 const std::string& description,
32 ScreenshotDataPtr image 32 ScreenshotDataPtr image
33 #if defined(OS_CHROMEOS) 33 #if defined(OS_CHROMEOS)
34 , const std::string& user_email 34 , const std::string& user_email
35 , const bool send_sys_info 35 , const bool send_sys_info
36 , const bool sent_report 36 , const bool sent_report
37 #endif 37 #endif
38 ); 38 );
39 39
40 #if defined(OS_CHROMEOS) 40 #if defined(OS_CHROMEOS)
41 void SyslogsComplete(chromeos::system::LogDictionaryType* logs, 41 void SyslogsComplete(chromeos::system::LogDictionaryType* logs,
42 std::string* zip_content); 42 std::string* zip_content);
43 #endif 43 #endif
44 44
45 const std::string& target_tab_url() const { return target_tab_url_; } 45 const std::string& target_tab_url() const { return target_tab_url_; }
46 46
47 int problem_type() const { return problem_type_; } 47 const std::string& category_tag() const { return category_tag_; }
48 const std::string& page_url() const { return page_url_; } 48 const std::string& page_url() const { return page_url_; }
49 const std::string& description() const { return description_; } 49 const std::string& description() const { return description_; }
50 ScreenshotDataPtr image() const { return image_; } 50 ScreenshotDataPtr image() const { return image_; }
51 #if defined(OS_CHROMEOS) 51 #if defined(OS_CHROMEOS)
52 const std::string& user_email() const { return user_email_; } 52 const std::string& user_email() const { return user_email_; }
53 chromeos::system::LogDictionaryType* sys_info() const { return sys_info_; } 53 chromeos::system::LogDictionaryType* sys_info() const { return sys_info_; }
54 bool send_sys_info() const { return send_sys_info_; } 54 bool send_sys_info() const { return send_sys_info_; }
55 bool sent_report() const { return sent_report_; } 55 bool sent_report() const { return sent_report_; }
56 std::string* zip_content() const { return zip_content_; } 56 std::string* zip_content() const { return zip_content_; }
57 #endif 57 #endif
58 58
59 59
60 private: 60 private:
61 Profile* profile_; 61 Profile* profile_;
62 62
63 // Target tab url. 63 // Target tab url.
64 std::string target_tab_url_; 64 std::string target_tab_url_;
65 65
66 int problem_type_; 66 std::string category_tag_;
67 std::string page_url_; 67 std::string page_url_;
68 std::string description_; 68 std::string description_;
69 ScreenshotDataPtr image_; 69 ScreenshotDataPtr image_;
70 70
71 #if defined(OS_CHROMEOS) 71 #if defined(OS_CHROMEOS)
72 // Chromeos specific values for SendReport. 72 // Chromeos specific values for SendReport.
73 std::string user_email_; 73 std::string user_email_;
74 chromeos::system::LogDictionaryType* sys_info_; 74 chromeos::system::LogDictionaryType* sys_info_;
75 // Content of the compressed system logs. 75 // Content of the compressed system logs.
76 std::string* zip_content_; 76 std::string* zip_content_;
77 // NOTE: Extra boolean sent_report_ is required because callback may 77 // NOTE: Extra boolean sent_report_ is required because callback may
78 // occur before or after we call SendReport(). 78 // occur before or after we call SendReport().
79 bool sent_report_; 79 bool sent_report_;
80 // Flag to indicate to SyslogsComplete that it should send the report 80 // Flag to indicate to SyslogsComplete that it should send the report
81 bool send_sys_info_; 81 bool send_sys_info_;
82 #endif 82 #endif
83 }; 83 };
84 84
85 #endif // CHROME_BROWSER_BUG_REPORT_DATA_H_ 85 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/feedback/feedback_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698