summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 09:50:13 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 09:50:13 +0000
commitb202844f617cce3b15381dbc9cf0deb4425e5d46 (patch)
tree7345bc0ddf26cdc5ef7ffd5527e72d12e2645ebf /chrome/installer
parentf6c8054d7615c0e786867ee65dc72505c2a6848d (diff)
downloadchromium_src-b202844f617cce3b15381dbc9cf0deb4425e5d46.zip
chromium_src-b202844f617cce3b15381dbc9cf0deb4425e5d46.tar.gz
chromium_src-b202844f617cce3b15381dbc9cf0deb4425e5d46.tar.bz2
Fix attrition experiment toast not working with all locales.
The locale comparison was being done on pointers as opposed to the strings being pointed at. Also sync up with changes made on 912 branch (enterprise brands should not be used for toasting). BUG=107770 TEST=The locale change can only be tested by making a code change to show the toast for all locales, or on the 912 branch with Mark's changes. Basically, use chrome.exe --try-chrome-again=0 on the branch and the toast should show up. The enterprise brand code can be tested by setting your brand to GGRV and no toast should appear when you launch chrome.exe with --try-chrome-again=0. Review URL: https://chromiumcodereview.appspot.com/9178010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index fcb6c07..0666178 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -616,9 +616,11 @@ bool GoogleChromeDistribution::GetExperimentDetails(
locale = ASCIIToWide("en-US");
if (!GoogleUpdateSettings::GetBrand(&brand))
brand = ASCIIToWide(""); // Could still be viable for catch-all rules.
+ if (brand == kEnterprise)
+ return false;
for (int i = 0; i < arraysize(kExperimentFlavors); ++i) {
- // A maximum of four flavors is supported at the moment.
+ // A maximum of four flavors are supported at the moment.
DCHECK_LE(kExperimentFlavors[i].flavors, kMax);
DCHECK_GT(kExperimentFlavors[i].flavors, 0);
// Make sure each experiment has valid headings.
@@ -634,7 +636,7 @@ bool GoogleChromeDistribution::GetExperimentDetails(
kExperimentFlavors[i].flavors - 1 <= 'Z');
if (kExperimentFlavors[i].locale != locale &&
- kExperimentFlavors[i].locale != L"*")
+ kExperimentFlavors[i].locale != ASCIIToWide("*"))
continue;
std::vector<std::wstring> brand_codes;