| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BUG_REPORT_DATA_H_ |
| 6 #define CHROME_BROWSER_BUG_REPORT_DATA_H_ | 6 #define CHROME_BROWSER_BUG_REPORT_DATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // SyslogsComplete gets called before UpdateData, we'll simply populate the | 24 // SyslogsComplete gets called before UpdateData, we'll simply populate the |
| 25 // sys_info and zip_content fields and exit without disturbing anything else | 25 // sys_info and zip_content fields and exit without disturbing anything else |
| 26 BugReportData(); | 26 BugReportData(); |
| 27 ~BugReportData(); | 27 ~BugReportData(); |
| 28 | 28 |
| 29 // Defined in bug_report_ui.cc | 29 // Defined in bug_report_ui.cc |
| 30 void SendReport(); | 30 void SendReport(); |
| 31 | 31 |
| 32 void UpdateData(Profile* profile, | 32 void UpdateData(Profile* profile, |
| 33 const std::string& target_tab_url, | 33 const std::string& target_tab_url, |
| 34 const string16& target_tab_title, | |
| 35 const int problem_type, | 34 const int problem_type, |
| 36 const std::string& page_url, | 35 const std::string& page_url, |
| 37 const std::string& description, | 36 const std::string& description, |
| 38 const std::vector<unsigned char>& image | 37 const std::vector<unsigned char>& image |
| 39 #if defined(OS_CHROMEOS) | 38 #if defined(OS_CHROMEOS) |
| 40 , const std::string& user_email | 39 , const std::string& user_email |
| 41 , const bool send_sys_info | 40 , const bool send_sys_info |
| 42 , const bool sent_report | 41 , const bool sent_report |
| 43 #endif | 42 #endif |
| 44 ); | 43 ); |
| 45 | 44 |
| 46 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
| 47 void SyslogsComplete(chromeos::LogDictionaryType* logs, | 46 void SyslogsComplete(chromeos::LogDictionaryType* logs, |
| 48 std::string* zip_content); | 47 std::string* zip_content); |
| 49 #endif | 48 #endif |
| 50 | 49 |
| 51 const std::string& target_tab_url() { return target_tab_url_; } | 50 const std::string& target_tab_url() const { return target_tab_url_; } |
| 52 const string16& target_tab_title() { return target_tab_title_; } | |
| 53 | 51 |
| 54 int problem_type() { return problem_type_; } | 52 int problem_type() const { return problem_type_; } |
| 55 const std::string& page_url() { return page_url_; } | 53 const std::string& page_url() const { return page_url_; } |
| 56 const std::string& description() { return description_; } | 54 const std::string& description() const { return description_; } |
| 57 const std::vector<unsigned char>& image() { return image_; } | 55 const std::vector<unsigned char>& image() const { return image_; } |
| 58 #if defined(OS_CHROMEOS) | 56 #if defined(OS_CHROMEOS) |
| 59 const std::string& user_email() { return user_email_; } | 57 const std::string& user_email() const { return user_email_; } |
| 60 const chromeos::LogDictionaryType* sys_info() { return sys_info_; } | 58 chromeos::LogDictionaryType* sys_info() const { return sys_info_; } |
| 61 const bool send_sys_info() { return send_sys_info_; } | 59 bool send_sys_info() const { return send_sys_info_; } |
| 62 const bool sent_report() { return sent_report_; } | 60 bool sent_report() const { return sent_report_; } |
| 63 const std::string* zip_content() { return zip_content_; } | 61 std::string* zip_content() const { return zip_content_; } |
| 64 #endif | 62 #endif |
| 65 | 63 |
| 66 | 64 |
| 67 private: | 65 private: |
| 68 Profile* profile_; | 66 Profile* profile_; |
| 69 | 67 |
| 70 // Target tab url. | 68 // Target tab url. |
| 71 std::string target_tab_url_; | 69 std::string target_tab_url_; |
| 72 // Target tab page title. | |
| 73 string16 target_tab_title_; | |
| 74 | 70 |
| 75 int problem_type_; | 71 int problem_type_; |
| 76 std::string page_url_; | 72 std::string page_url_; |
| 77 std::string description_; | 73 std::string description_; |
| 78 std::vector<unsigned char> image_; | 74 std::vector<unsigned char> image_; |
| 79 | 75 |
| 80 #if defined(OS_CHROMEOS) | 76 #if defined(OS_CHROMEOS) |
| 81 // Chromeos specific values for SendReport. | 77 // Chromeos specific values for SendReport. |
| 82 std::string user_email_; | 78 std::string user_email_; |
| 83 chromeos::LogDictionaryType* sys_info_; | 79 chromeos::LogDictionaryType* sys_info_; |
| 84 // Content of the compressed system logs. | 80 // Content of the compressed system logs. |
| 85 std::string* zip_content_; | 81 std::string* zip_content_; |
| 86 // NOTE: Extra boolean sent_report_ is required because callback may | 82 // NOTE: Extra boolean sent_report_ is required because callback may |
| 87 // occur before or after we call SendReport(). | 83 // occur before or after we call SendReport(). |
| 88 bool sent_report_; | 84 bool sent_report_; |
| 89 // Flag to indicate to SyslogsComplete that it should send the report | 85 // Flag to indicate to SyslogsComplete that it should send the report |
| 90 bool send_sys_info_; | 86 bool send_sys_info_; |
| 91 #endif | 87 #endif |
| 92 }; | 88 }; |
| 93 | 89 |
| 94 #endif // CHROME_BROWSER_BUG_REPORT_DATA_H_ | 90 #endif // CHROME_BROWSER_BUG_REPORT_DATA_H_ |
| OLD | NEW |