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 #include "chrome/browser/bug_report_data.h" | 5 #include "chrome/browser/bug_report_data.h" |
6 | 6 |
7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
8 #include "chrome/browser/chromeos/notifications/system_notification.h" | 8 #include "chrome/browser/chromeos/notifications/system_notification.h" |
9 #endif | 9 #endif |
10 | 10 |
11 BugReportData::BugReportData() | 11 BugReportData::BugReportData() |
12 : profile_(NULL), | 12 : profile_(NULL), |
13 problem_type_(0) | 13 problem_type_(0) |
14 #if defined(OS_CHROMEOS) | 14 #if defined(OS_CHROMEOS) |
15 , sent_report_(false), send_sys_info_(false) | 15 , sent_report_(false), send_sys_info_(false) |
16 #endif | 16 #endif |
17 { | 17 { |
18 } | 18 } |
19 | 19 |
20 BugReportData::~BugReportData() {} | 20 BugReportData::~BugReportData() {} |
21 | 21 |
22 void BugReportData::UpdateData(Profile* profile, | 22 void BugReportData::UpdateData(Profile* profile, |
23 const std::string& target_tab_url, | 23 const std::string& target_tab_url, |
24 const string16& target_tab_title, | |
25 const int problem_type, | 24 const int problem_type, |
26 const std::string& page_url, | 25 const std::string& page_url, |
27 const std::string& description, | 26 const std::string& description, |
28 const std::vector<unsigned char>& image | 27 const std::vector<unsigned char>& image |
29 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
30 , const std::string& user_email | 29 , const std::string& user_email |
31 , const bool send_sys_info | 30 , const bool send_sys_info |
32 , const bool sent_report | 31 , const bool sent_report |
33 #endif | 32 #endif |
34 ) { | 33 ) { |
35 profile_ = profile; | 34 profile_ = profile; |
36 target_tab_url_ = target_tab_url; | 35 target_tab_url_ = target_tab_url; |
37 target_tab_title_ = target_tab_title; | |
38 problem_type_ = problem_type; | 36 problem_type_ = problem_type; |
39 page_url_ = page_url; | 37 page_url_ = page_url; |
40 description_ = description; | 38 description_ = description; |
41 image_ = image; | 39 image_ = image; |
42 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
43 user_email_ = user_email; | 41 user_email_ = user_email; |
44 send_sys_info_ = send_sys_info; | 42 send_sys_info_ = send_sys_info; |
45 sent_report_ = sent_report; | 43 sent_report_ = sent_report; |
46 #endif | 44 #endif |
47 } | 45 } |
(...skipping 12 matching lines...) Expand all Loading... |
60 } else { | 58 } else { |
61 zip_content_ = zip_content; | 59 zip_content_ = zip_content; |
62 sys_info_ = logs; // Will get deleted when SendReport() is called. | 60 sys_info_ = logs; // Will get deleted when SendReport() is called. |
63 if (send_sys_info_) { | 61 if (send_sys_info_) { |
64 // We already prepared the report, send it now. | 62 // We already prepared the report, send it now. |
65 this->SendReport(); | 63 this->SendReport(); |
66 } | 64 } |
67 } | 65 } |
68 } | 66 } |
69 #endif | 67 #endif |
OLD | NEW |