OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_BUG_REPORT_UTIL_H_ |
| 6 #define CHROME_BROWSER_BUG_REPORT_UTIL_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #if defined(OS_MACOSX) |
| 13 #include "base/mac_util.h" |
| 14 #endif |
| 15 #include "base/scoped_ptr.h" |
| 16 |
| 17 class Profile; |
| 18 class TabContents; |
| 19 |
| 20 class BugReportUtil { |
| 21 public: |
| 22 // SetOSVersion copies the maj.minor.build + servicePack_string |
| 23 // into a string (for Windows only). We currently have: |
| 24 // win_util::GetWinVersion returns WinVersion, which is just |
| 25 // an enum of 2000, XP, 2003, or VISTA. Not enough detail for |
| 26 // bug reports. |
| 27 // base::SysInfo::OperatingSystemVersion returns an std::string |
| 28 // but doesn't include the build or service pack. That function |
| 29 // is probably the right one to extend, but will require changing |
| 30 // all the call sites or making it a wrapper around another util. |
| 31 static void SetOSVersion(std::string *os_version); |
| 32 |
| 33 // Generates bug report data. |
| 34 static void SendReport(Profile* profile, |
| 35 std::string page_title_text, |
| 36 int problem_type, |
| 37 std::string page_url_text, |
| 38 std::string description, |
| 39 const char* png_data, |
| 40 int png_data_length); |
| 41 |
| 42 // Redirects the user to Google's phishing reporting page. |
| 43 static void ReportPhishing(TabContents* currentTab, |
| 44 const std::string& phishing_url); |
| 45 |
| 46 static std::string GetMimeType(); |
| 47 |
| 48 class PostCleanup; |
| 49 |
| 50 private: |
| 51 static void CreateMimeBoundary(std::string *out); |
| 52 |
| 53 DISALLOW_IMPLICIT_CONSTRUCTORS(BugReportUtil); |
| 54 }; |
| 55 |
| 56 #endif // CHROME_BROWSER_BUG_REPORT_UTIL_H_ |
| 57 |
OLD | NEW |