diff options
author | mirandac@google.com <mirandac@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-02 20:34:09 +0000 |
---|---|---|
committer | mirandac@google.com <mirandac@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-02 20:34:09 +0000 |
commit | cbe7a169e2395eaec83c8dbfba16616de4e6700b (patch) | |
tree | a9d6d07f1de44e35ba7b34303d1da3fffffa8aea /chrome/browser/rlz | |
parent | 6ba198fd7a578d370215fd5816962286070f9b3c (diff) | |
download | chromium_src-cbe7a169e2395eaec83c8dbfba16616de4e6700b.zip chromium_src-cbe7a169e2395eaec83c8dbfba16616de4e6700b.tar.gz chromium_src-cbe7a169e2395eaec83c8dbfba16616de4e6700b.tar.bz2 |
Refactor check for organic install into GoogleUpdateSettings, for use elsewhere.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2836041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/rlz')
-rw-r--r-- | chrome/browser/rlz/rlz.cc | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index 8a6b925..685692d 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -165,7 +165,7 @@ class DelayedInitTask : public Task { // means a chromium install. This is ok. std::wstring brand; GoogleUpdateSettings::GetBrand(&brand); - if (is_strict_organic(brand)) + if (GoogleUpdateSettings::IsOrganic(brand)) return; // Do the initial event recording if is the first run or if we have an @@ -222,24 +222,6 @@ class DelayedInitTask : public Task { return urlref->HasGoogleBaseURLs(); } - static bool is_strict_organic(const std::wstring& brand) { - static const wchar_t* kBrands[] = { - L"CHFO", L"CHFT", L"CHHS", L"CHHM", L"CHMA", L"CHMB", L"CHME", L"CHMF", - L"CHMG", L"CHMH", L"CHMI", L"CHMQ", L"CHMV", L"CHNB", L"CHNC", L"CHNG", - L"CHNH", L"CHNI", L"CHOA", L"CHOB", L"CHOC", L"CHON", L"CHOO", L"CHOP", - L"CHOQ", L"CHOR", L"CHOS", L"CHOT", L"CHOU", L"CHOX", L"CHOY", L"CHOZ", - L"CHPD", L"CHPE", L"CHPF", L"CHPG", L"EUBB", L"EUBC", L"GGLA", L"GGLS" - }; - const wchar_t** end = &kBrands[arraysize(kBrands)]; - const wchar_t** found = std::find(&kBrands[0], end, brand); - if (found != end) - return true; - if (StartsWith(brand, L"EUB", true) || StartsWith(brand, L"EUC", true) || - StartsWith(brand, L"GGR", true)) - return true; - return false; - } - bool first_run_; DISALLOW_IMPLICIT_CONSTRUCTORS(DelayedInitTask); }; |