1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_BUG_REPORT_DATA_H_
6 #define CHROME_BROWSER_BUG_REPORT_DATA_H_
11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/bug_report_util.h"
14 #if defined(OS_CHROMEOS)
15 #include "chrome/browser/chromeos/system_access.h"
20 // Make sure we initialize these flags to false since SyslogsComplete
21 // may be triggered before we've called update data; in which case,
22 // we do not want it to just delete the logs it just gathered, and we
23 // don't want it to send the report either - this will make sure that if
24 // SyslogsComplete gets called before UpdateData, we'll simply populate the
25 // sys_info and zip_content fields and exit without disturbing anything else
29 // Defined in bug_report_ui.cc
32 void UpdateData(Profile
* profile
,
33 const std::string
& target_tab_url
,
34 const int problem_type
,
35 const std::string
& page_url
,
36 const std::string
& description
,
37 const std::vector
<unsigned char>& image
38 #if defined(OS_CHROMEOS)
39 , const std::string
& user_email
40 , const bool send_sys_info
41 , const bool sent_report
45 #if defined(OS_CHROMEOS)
46 void SyslogsComplete(chromeos::LogDictionaryType
* logs
,
47 std::string
* zip_content
);
50 const std::string
& target_tab_url() const { return target_tab_url_
; }
52 int problem_type() const { return problem_type_
; }
53 const std::string
& page_url() const { return page_url_
; }
54 const std::string
& description() const { return description_
; }
55 const std::vector
<unsigned char>& image() const { return image_
; }
56 #if defined(OS_CHROMEOS)
57 const std::string
& user_email() const { return user_email_
; }
58 chromeos::LogDictionaryType
* sys_info() const { return sys_info_
; }
59 bool send_sys_info() const { return send_sys_info_
; }
60 bool sent_report() const { return sent_report_
; }
61 std::string
* zip_content() const { return zip_content_
; }
69 std::string target_tab_url_
;
72 std::string page_url_
;
73 std::string description_
;
74 std::vector
<unsigned char> image_
;
76 #if defined(OS_CHROMEOS)
77 // Chromeos specific values for SendReport.
78 std::string user_email_
;
79 chromeos::LogDictionaryType
* sys_info_
;
80 // Content of the compressed system logs.
81 std::string
* zip_content_
;
82 // NOTE: Extra boolean sent_report_ is required because callback may
83 // occur before or after we call SendReport().
85 // Flag to indicate to SyslogsComplete that it should send the report
90 #endif // CHROME_BROWSER_BUG_REPORT_DATA_H_