summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bug_report_util.h
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 18:47:17 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 18:47:17 +0000
commit56cfe04013dda41c589bef72667b9f5edf3e65f9 (patch)
tree3d43568783c88ba870854cb01d430b076744ad49 /chrome/browser/bug_report_util.h
parent8345371c9a46402eafccbacc6d9053447b217643 (diff)
downloadchromium_src-56cfe04013dda41c589bef72667b9f5edf3e65f9.zip
chromium_src-56cfe04013dda41c589bef72667b9f5edf3e65f9.tar.gz
chromium_src-56cfe04013dda41c589bef72667b9f5edf3e65f9.tar.bz2
Hoist bug reporting code out of bug_report_view so that it can be used cross-platform.
BUG= none TEST= bug reporting should work the same on Windows. Review URL: http://codereview.chromium.org/339051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bug_report_util.h')
-rw-r--r--chrome/browser/bug_report_util.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/chrome/browser/bug_report_util.h b/chrome/browser/bug_report_util.h
new file mode 100644
index 0000000..53feecf
--- /dev/null
+++ b/chrome/browser/bug_report_util.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_BUG_REPORT_UTIL_H_
+#define CHROME_BROWSER_BUG_REPORT_UTIL_H_
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#if defined(OS_MACOSX)
+#include "base/mac_util.h"
+#endif
+#include "base/scoped_ptr.h"
+
+class Profile;
+class TabContents;
+
+class BugReportUtil {
+ public:
+ // SetOSVersion copies the maj.minor.build + servicePack_string
+ // into a string (for Windows only). We currently have:
+ // win_util::GetWinVersion returns WinVersion, which is just
+ // an enum of 2000, XP, 2003, or VISTA. Not enough detail for
+ // bug reports.
+ // base::SysInfo::OperatingSystemVersion returns an std::string
+ // but doesn't include the build or service pack. That function
+ // is probably the right one to extend, but will require changing
+ // all the call sites or making it a wrapper around another util.
+ static void SetOSVersion(std::string *os_version);
+
+ // Generates bug report data.
+ static void SendReport(Profile* profile,
+ std::string page_title_text,
+ int problem_type,
+ std::string page_url_text,
+ std::string description,
+ const char* png_data,
+ int png_data_length);
+
+ // Redirects the user to Google's phishing reporting page.
+ static void ReportPhishing(TabContents* currentTab,
+ const std::string& phishing_url);
+
+ static std::string GetMimeType();
+
+ class PostCleanup;
+
+ private:
+ static void CreateMimeBoundary(std::string *out);
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(BugReportUtil);
+};
+
+#endif // CHROME_BROWSER_BUG_REPORT_UTIL_H_
+