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

Unified Diff: chrome/browser/google/google_brand.cc

Issue 2814083002: Make the GGRV brand code non-organic. (Closed)
Patch Set: Address review comments Created 3 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/google/google_update_settings_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_brand.cc
diff --git a/chrome/browser/google/google_brand.cc b/chrome/browser/google/google_brand.cc
index 7e07284e4a73ffe0648ff61ff0e6dcf75af628d8..33cf760f2795f7c2518dcf3143353a0f5aff22ae 100644
--- a/chrome/browser/google/google_brand.cc
+++ b/chrome/browser/google/google_brand.cc
@@ -90,21 +90,22 @@ bool IsOrganic(const std::string& brand) {
}
#endif
- const char* const kBrands[] = {
- "CHCA", "CHCB", "CHCG", "CHCH", "CHCI", "CHCJ", "CHCK", "CHCL",
- "CHFO", "CHFT", "CHHS", "CHHM", "CHMA", "CHMB", "CHME", "CHMF",
- "CHMG", "CHMH", "CHMI", "CHMQ", "CHMV", "CHNB", "CHNC", "CHNG",
- "CHNH", "CHNI", "CHOA", "CHOB", "CHOC", "CHON", "CHOO", "CHOP",
- "CHOQ", "CHOR", "CHOS", "CHOT", "CHOU", "CHOX", "CHOY", "CHOZ",
- "CHPD", "CHPE", "CHPF", "CHPG", "ECBA", "ECBB", "ECDA", "ECDB",
- "ECSA", "ECSB", "ECVA", "ECVB", "ECWA", "ECWB", "ECWC", "ECWD",
- "ECWE", "ECWF", "EUBB", "EUBC", "GGLA", "GGLS"
- };
- const char* const* end = &kBrands[arraysize(kBrands)];
- const char* const* found = std::find(&kBrands[0], end, brand);
- if (found != end)
+ const char* const kOrganicBrands[] = {
+ "CHCA", "CHCB", "CHCG", "CHCH", "CHCI", "CHCJ", "CHCK", "CHCL", "CHFO",
+ "CHFT", "CHHS", "CHHM", "CHMA", "CHMB", "CHME", "CHMF", "CHMG", "CHMH",
+ "CHMI", "CHMQ", "CHMV", "CHNB", "CHNC", "CHNG", "CHNH", "CHNI", "CHOA",
+ "CHOB", "CHOC", "CHON", "CHOO", "CHOP", "CHOQ", "CHOR", "CHOS", "CHOT",
+ "CHOU", "CHOX", "CHOY", "CHOZ", "CHPD", "CHPE", "CHPF", "CHPG", "ECBA",
+ "ECBB", "ECDA", "ECDB", "ECSA", "ECSB", "ECVA", "ECVB", "ECWA", "ECWB",
+ "ECWC", "ECWD", "ECWE", "ECWF", "EUBB", "EUBC", "GGLA", "GGLS"};
+ const char* const* end = &kOrganicBrands[arraysize(kOrganicBrands)];
+ if (std::binary_search(&kOrganicBrands[0], end, brand))
return true;
+ // The Chrome enterprise brand code is the only GGR* brand to be non-organic.
+ if (brand == "GGRV")
+ return false;
+
return base::StartsWith(brand, "EUB", base::CompareCase::SENSITIVE) ||
base::StartsWith(brand, "EUC", base::CompareCase::SENSITIVE) ||
base::StartsWith(brand, "GGR", base::CompareCase::SENSITIVE);
« no previous file with comments | « no previous file | chrome/browser/google/google_update_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698