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

Unified Diff: ios/chrome/browser/physical_web/start_physical_web_discovery.mm

Issue 2704343005: Extend Physical Web iOS auto-enable behavior beyond first launch. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/physical_web/start_physical_web_discovery.mm
diff --git a/ios/chrome/browser/physical_web/start_physical_web_discovery.mm b/ios/chrome/browser/physical_web/start_physical_web_discovery.mm
index a61a7652105be59e3e7dba528aabce5d29c9aede..5f51776224f36a599c55e36265a5cb0149d19c0d 100644
--- a/ios/chrome/browser/physical_web/start_physical_web_discovery.mm
+++ b/ios/chrome/browser/physical_web/start_physical_web_discovery.mm
@@ -59,13 +59,11 @@ void StartPhysicalWebDiscovery(PrefService* pref_service,
default_search_provider->IsGoogleSearchURLWithReplaceableKeyword(
SearchTermsData());
- bool auto_enable = !is_incognito && location_services_enabled &&
- location_authorized && geolocation_eligible &&
- google_search_enabled;
-
- pref_service->SetInteger(prefs::kIosPhysicalWebEnabled,
- auto_enable ? physical_web::kPhysicalWebOn
- : physical_web::kPhysicalWebOff);
+ if (!is_incognito && location_services_enabled && location_authorized &&
+ geolocation_eligible && google_search_enabled) {
+ pref_service->SetInteger(prefs::kIosPhysicalWebEnabled,
+ physical_web::kPhysicalWebOn);
+ }
preference_state = pref_service->GetInteger(prefs::kIosPhysicalWebEnabled);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698