Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Side by Side Diff: chrome/browser/bug_report_util.cc

Issue 355013: Add OS version information to the bug report utility for the Mac version.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/bug_report_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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_util.h" 5 #include "chrome/browser/bug_report_util.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_version_info.h" 8 #include "base/file_version_info.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/browser_process_impl.h" 10 #include "chrome/browser/browser_process_impl.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 if (GetVersionEx(&osvi)) { 65 if (GetVersionEx(&osvi)) {
66 *os_version = StringPrintf("%d.%d.%d %S", 66 *os_version = StringPrintf("%d.%d.%d %S",
67 osvi.dwMajorVersion, 67 osvi.dwMajorVersion,
68 osvi.dwMinorVersion, 68 osvi.dwMinorVersion,
69 osvi.dwBuildNumber, 69 osvi.dwBuildNumber,
70 osvi.szCSDVersion); 70 osvi.szCSDVersion);
71 } else { 71 } else {
72 *os_version = "unknown"; 72 *os_version = "unknown";
73 } 73 }
74 #elif defined(OS_MACOSX)
75 int32 major;
76 int32 minor;
77 int32 bugFix;
78 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugFix);
79 *os_version = StringPrintf("%d.%d.%d", major, minor, bugFix);
74 #else 80 #else
75 // Right now, we only get the OS Version for Windows.
76 // TODO(mirandac): make this cross-platform.
77 *os_version = "unknown"; 81 *os_version = "unknown";
78 #endif 82 #endif
79 } 83 }
80 84
81 // Create a MIME boundary marker (27 '-' characters followed by 16 hex digits). 85 // Create a MIME boundary marker (27 '-' characters followed by 16 hex digits).
82 void BugReportUtil::CreateMimeBoundary(std::string *out) { 86 void BugReportUtil::CreateMimeBoundary(std::string *out) {
83 int r1 = rand(); 87 int r1 = rand();
84 int r2 = rand(); 88 int r2 = rand();
85 SStringPrintf(out, "---------------------------%08X%08X", r1, r2); 89 SStringPrintf(out, "---------------------------%08X%08X", r1, r2);
86 } 90 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // static 223 // static
220 void BugReportUtil::ReportPhishing(TabContents* currentTab, 224 void BugReportUtil::ReportPhishing(TabContents* currentTab,
221 const std::string& phishing_url) { 225 const std::string& phishing_url) {
222 currentTab->controller().LoadURL( 226 currentTab->controller().LoadURL(
223 safe_browsing_util::GeneratePhishingReportUrl( 227 safe_browsing_util::GeneratePhishingReportUrl(
224 kReportPhishingUrl, phishing_url), 228 kReportPhishingUrl, phishing_url),
225 GURL(), 229 GURL(),
226 PageTransition::LINK); 230 PageTransition::LINK);
227 } 231 }
228 232
OLDNEW
« no previous file with comments | « chrome/browser/bug_report_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698