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

Unified Diff: chrome/browser/android/search_geolocation_disclosure_infobar_delegate.cc

Issue 2598443002: Update text in Search Geolocation Disclosure. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/search_geolocation_disclosure_infobar_delegate.cc
diff --git a/chrome/browser/android/search_geolocation_disclosure_infobar_delegate.cc b/chrome/browser/android/search_geolocation_disclosure_infobar_delegate.cc
index 9389974624968bd6d29bef81d98dabb757dd9bdf..8f031c45eee8a5c512ff6773c2dcdada8eb10e5f 100644
--- a/chrome/browser/android/search_geolocation_disclosure_infobar_delegate.cc
+++ b/chrome/browser/android/search_geolocation_disclosure_infobar_delegate.cc
@@ -10,12 +10,26 @@
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/android/infobars/search_geolocation_disclosure_infobar.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_service.h"
+#include "components/variations/variations_associated_data.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
+namespace {
+
+const char kUseControlTextVariation[] = "UseControlText";
+
+int ShouldUseControlText() {
+ std::string variation = variations::GetVariationParamValueByFeature(
+ features::kConsistentOmniboxGeolocation, kUseControlTextVariation);
+ return !variation.empty();
+}
+
+} // namespace
+
// This enum is used in histograms, and is thus append only. Do not remove or
// re-order items.
enum class SearchGeolocationDisclosureInfoBarDelegate::DisclosureResult {
@@ -85,7 +99,10 @@ SearchGeolocationDisclosureInfoBarDelegate::
IDS_SEARCH_GEOLOCATION_DISCLOSURE_INFOBAR_SETTINGS_LINK_TEXT);
size_t offset;
message_text_ = l10n_util::GetStringFUTF16(
- IDS_SEARCH_GEOLOCATION_DISCLOSURE_INFOBAR_TEXT, link, &offset);
+ ShouldUseControlText()
+ ? IDS_SEARCH_GEOLOCATION_DISCLOSURE_INFOBAR_CONTROL_TEXT
+ : IDS_SEARCH_GEOLOCATION_DISCLOSURE_INFOBAR_TEXT,
+ link, &offset);
inline_link_range_ = gfx::Range(offset, offset + link.length());
}
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698