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

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

Issue 23345004: Fix Android strict-mode violation in GeoLocation info bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments / fix tests Created 6 years, 10 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
Index: chrome/browser/android/mock_google_location_settings_helper.cc
diff --git a/chrome/browser/android/mock_google_location_settings_helper.cc b/chrome/browser/android/mock_google_location_settings_helper.cc
index 7d5d97e5fb9d25968b148be70ba7f2e1fb751eb8..8dc77678dae9ef52004845743d26e968882c884d 100644
--- a/chrome/browser/android/mock_google_location_settings_helper.cc
+++ b/chrome/browser/android/mock_google_location_settings_helper.cc
@@ -27,8 +27,8 @@ void MockGoogleLocationSettingsHelper::SetLocationStatus(
google_apps_location_enabled = google_apps;
}
-std::string MockGoogleLocationSettingsHelper::GetAcceptButtonLabel() {
- return google_apps_location_enabled ? "Allow" : "Settings";
+std::string MockGoogleLocationSettingsHelper::GetAcceptButtonLabel(bool allow) {
+ return IsAllowLabel() ? "Allow" : "Settings";
}
void MockGoogleLocationSettingsHelper::ShowGoogleLocationSettings() {
@@ -46,3 +46,7 @@ bool MockGoogleLocationSettingsHelper::IsMasterLocationSettingEnabled() {
bool MockGoogleLocationSettingsHelper::WasGoogleLocationSettingsCalled() {
return was_google_location_settings_called;
}
+
+bool MockGoogleLocationSettingsHelper::IsAllowLabel() {
+ return google_apps_location_enabled;
+}

Powered by Google App Engine
This is Rietveld 408576698