OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/bug_report_view.h" | 5 #include "chrome/browser/views/bug_report_view.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 #include <fstream> | 8 #include <fstream> |
9 | 9 |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 void BugReportView::SetUrl(const GURL& url) { | 323 void BugReportView::SetUrl(const GURL& url) { |
324 page_url_text_->SetText(UTF8ToWide(url.spec())); | 324 page_url_text_->SetText(UTF8ToWide(url.spec())); |
325 } | 325 } |
326 | 326 |
327 // SetOSVersion copies the maj.minor.build + servicePack_string | 327 // SetOSVersion copies the maj.minor.build + servicePack_string |
328 // into a string (for Windows only). This should probably be | 328 // into a string (for Windows only). This should probably be |
329 // in a util somewhere. We currently have | 329 // in a util somewhere. We currently have |
330 // win_util::GetWinVersion returns WinVersion, which is just | 330 // win_util::GetWinVersion returns WinVersion, which is just |
331 // an enum of 2000, XP, 2003, or VISTA. Not enough detail for | 331 // an enum of 2000, XP, 2003, or VISTA. Not enough detail for |
332 // bug reports | 332 // bug reports |
333 // env_util::GetOperatingSystemVersion returns an std::string | 333 // base::SysInfo::OperatingSystemVersion returns an std::string |
334 // but doesn't include the build or service pack. That function | 334 // but doesn't include the build or service pack. That function |
335 // is probably the right one to extend, but will require changing | 335 // is probably the right one to extend, but will require changing |
336 // all the call sites or making it a wrapper around another util. | 336 // all the call sites or making it a wrapper around another util. |
337 void BugReportView::SetOSVersion(std::string *os_version) { | 337 void BugReportView::SetOSVersion(std::string *os_version) { |
338 OSVERSIONINFO osvi; | 338 OSVERSIONINFO osvi; |
339 ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); | 339 ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); |
340 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); | 340 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); |
341 | 341 |
342 if (GetVersionEx(&osvi)) { | 342 if (GetVersionEx(&osvi)) { |
343 *os_version = StringPrintf("%d.%d.%d %S", | 343 *os_version = StringPrintf("%d.%d.%d %S", |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 fetcher->Start(); | 482 fetcher->Start(); |
483 } | 483 } |
484 | 484 |
485 void BugReportView::ReportPhishing() { | 485 void BugReportView::ReportPhishing() { |
486 tab_->controller()->LoadURL( | 486 tab_->controller()->LoadURL( |
487 safe_browsing_util::GeneratePhishingReportUrl( | 487 safe_browsing_util::GeneratePhishingReportUrl( |
488 kReportPhishingUrl, WideToUTF8(page_url_text_->GetText())), | 488 kReportPhishingUrl, WideToUTF8(page_url_text_->GetText())), |
489 PageTransition::LINK); | 489 PageTransition::LINK); |
490 } | 490 } |
491 | 491 |
OLD | NEW |