Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 <sstream> | 7 #include <sstream> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 void BugReportUtil::SetOSVersion(std::string* os_version) { | 160 void BugReportUtil::SetOSVersion(std::string* os_version) { |
| 161 #if defined(OS_WIN) | 161 #if defined(OS_WIN) |
| 162 base::win::OSInfo* os_info = base::win::OSInfo::GetInstance(); | 162 base::win::OSInfo* os_info = base::win::OSInfo::GetInstance(); |
| 163 base::win::OSInfo::VersionNumber version_number = os_info->version_number(); | 163 base::win::OSInfo::VersionNumber version_number = os_info->version_number(); |
| 164 *os_version = StringPrintf("%d.%d.%d", version_number.major, | 164 *os_version = StringPrintf("%d.%d.%d", version_number.major, |
| 165 version_number.minor, version_number.build); | 165 version_number.minor, version_number.build); |
| 166 int service_pack = os_info->service_pack().major; | 166 int service_pack = os_info->service_pack().major; |
| 167 if (service_pack > 0) | 167 if (service_pack > 0) |
| 168 os_version->append(StringPrintf("Service Pack %d", service_pack)); | 168 os_version->append(StringPrintf("Service Pack %d", service_pack)); |
| 169 #elif defined(OS_MACOSX) | 169 #elif defined(OS_MACOSX) |
| 170 int32 major; | 170 *os_version = base::SysInfo::OperatingSystemVersion(); |
|
Avi (use Gerrit)
2011/06/13 22:45:22
DCHECK? NOTIMPLEMENTED?
Mark Mentovai
2011/06/14 00:18:26
Avi wrote:
Avi (use Gerrit)
2011/06/14 01:40:23
Misread. My bad.
| |
| 171 int32 minor; | |
| 172 int32 bugFix; | |
| 173 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugFix); | |
| 174 *os_version = StringPrintf("%d.%d.%d", major, minor, bugFix); | |
| 175 #else | 171 #else |
| 176 *os_version = "unknown"; | 172 *os_version = "unknown"; |
| 177 #endif | 173 #endif |
| 178 } | 174 } |
| 179 | 175 |
| 180 // static | 176 // static |
| 181 std::string BugReportUtil::feedback_server_(""); | 177 std::string BugReportUtil::feedback_server_(""); |
| 182 | 178 |
| 183 // static | 179 // static |
| 184 void BugReportUtil::SetFeedbackServer(const std::string& server) { | 180 void BugReportUtil::SetFeedbackServer(const std::string& server) { |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 380 // static | 376 // static |
| 381 void BugReportUtil::ReportPhishing(TabContents* currentTab, | 377 void BugReportUtil::ReportPhishing(TabContents* currentTab, |
| 382 const std::string& phishing_url) { | 378 const std::string& phishing_url) { |
| 383 currentTab->controller().LoadURL( | 379 currentTab->controller().LoadURL( |
| 384 safe_browsing_util::GeneratePhishingReportUrl( | 380 safe_browsing_util::GeneratePhishingReportUrl( |
| 385 kReportPhishingUrl, phishing_url, | 381 kReportPhishingUrl, phishing_url, |
| 386 false /* not client-side detection */), | 382 false /* not client-side detection */), |
| 387 GURL(), | 383 GURL(), |
| 388 PageTransition::LINK); | 384 PageTransition::LINK); |
| 389 } | 385 } |
| OLD | NEW |