diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-03 19:16:47 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-03 19:16:47 +0000 |
commit | 0e59ebae17321e4e5b406fa18246a08e7fd32c16 (patch) | |
tree | 5ea02172cb3f45eca8098f7e12b039933fdad2cf /chrome/browser/safe_browsing | |
parent | 16d11d7251851e71e1e12e6d3fd4d95b911669f6 (diff) | |
download | chromium_src-0e59ebae17321e4e5b406fa18246a08e7fd32c16.zip chromium_src-0e59ebae17321e4e5b406fa18246a08e7fd32c16.tar.gz chromium_src-0e59ebae17321e4e5b406fa18246a08e7fd32c16.tar.bz2 |
Adding product names to safe browsing report_error and report_phish URLs on Windows. These names will be different for Google Chrome, Chromium and Chrome Frame. On Mac / Linux, leaving the name as "googlechrome" for all builds.
BUG=None
TEST=Verify that the safe browsing URLs are tagged with the correct product name for each product.
Review URL: http://codereview.chromium.org/455035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_util.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc index 5d5b145..f036646 100644 --- a/chrome/browser/safe_browsing/safe_browsing_util.cc +++ b/chrome/browser/safe_browsing/safe_browsing_util.cc @@ -13,6 +13,10 @@ #include "net/base/escape.h" #include "unicode/locid.h" +#if defined(OS_WIN) +#include "chrome/installer/util/browser_distribution.h" +#endif + static const int kSafeBrowsingMacDigestSize = 20; // Continue to this URL after submitting the phishing report form. @@ -20,7 +24,7 @@ static const int kSafeBrowsingMacDigestSize = 20; static const char kContinueUrlFormat[] = "http://www.google.com/tools/firefox/toolbar/FT2/intl/%s/submit_success.html"; -static const char kReportParams[] = "?tpl=chrome&continue=%s&url=%s"; +static const char kReportParams[] = "?tpl=%s&continue=%s&url=%s"; // SBEntry --------------------------------------------------------------------- @@ -594,8 +598,17 @@ GURL GeneratePhishingReportUrl(const std::string& report_page, const std::string continue_esc = EscapeQueryParamValue(StringPrintf(kContinueUrlFormat, lang)); const std::string current_esc = EscapeQueryParamValue(url_to_report); + +#if defined(OS_WIN) + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + std::string client_name(dist->GetSafeBrowsingName()); +#else + std::string client_name("googlechrome"); +#endif + GURL report_url(report_page + - StringPrintf(kReportParams, continue_esc.c_str(), current_esc.c_str())); + StringPrintf(kReportParams, client_name.c_str(), continue_esc.c_str(), + current_esc.c_str())); return google_util::AppendGoogleLocaleParam(report_url); } |