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

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

Issue 5815001: Fixed file_version_info so that it finds Mac values correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a file Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 // Add the language 303 // Add the language
304 std::string chrome_locale = g_browser_process->GetApplicationLocale(); 304 std::string chrome_locale = g_browser_process->GetApplicationLocale();
305 common_data->set_source_description_language(chrome_locale); 305 common_data->set_source_description_language(chrome_locale);
306 306
307 // Set the url 307 // Set the url
308 web_data->set_url(page_url_text); 308 web_data->set_url(page_url_text);
309 309
310 // Add the Chrome version 310 // Add the Chrome version
311 chrome::VersionInfo version_info; 311 chrome::VersionInfo version_info;
312 if (version_info.is_valid()) { 312 std::string chrome_version = version_info.Name() + " - " +
313 std::string chrome_version = version_info.Name() + " - " + 313 version_info.Version() +
314 version_info.Version() + 314 " (" + version_info.LastChange() + ")";
315 " (" + version_info.LastChange() + ")"; 315 AddFeedbackData(&feedback_data, std::string(kChromeVersionTag),
316 AddFeedbackData(&feedback_data, std::string(kChromeVersionTag), 316 chrome_version);
317 chrome_version);
318 }
319 317
320 // Add OS version (eg, for WinXP SP2: "5.1.2600 Service Pack 2"). 318 // Add OS version (eg, for WinXP SP2: "5.1.2600 Service Pack 2").
321 std::string os_version = ""; 319 std::string os_version = "";
322 SetOSVersion(&os_version); 320 SetOSVersion(&os_version);
323 AddFeedbackData(&feedback_data, std::string(kOsVersionTag), os_version); 321 AddFeedbackData(&feedback_data, std::string(kOsVersionTag), os_version);
324 322
325 // Include the page image if we have one. 323 // Include the page image if we have one.
326 if (png_data) { 324 if (png_data) {
327 userfeedback::PostedScreenshot screenshot; 325 userfeedback::PostedScreenshot screenshot;
328 screenshot.set_mime_type(kPngMimeType); 326 screenshot.set_mime_type(kPngMimeType);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 387
390 // static 388 // static
391 void BugReportUtil::ReportPhishing(TabContents* currentTab, 389 void BugReportUtil::ReportPhishing(TabContents* currentTab,
392 const std::string& phishing_url) { 390 const std::string& phishing_url) {
393 currentTab->controller().LoadURL( 391 currentTab->controller().LoadURL(
394 safe_browsing_util::GeneratePhishingReportUrl( 392 safe_browsing_util::GeneratePhishingReportUrl(
395 kReportPhishingUrl, phishing_url), 393 kReportPhishingUrl, phishing_url),
396 GURL(), 394 GURL(),
397 PageTransition::LINK); 395 PageTransition::LINK);
398 } 396 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698