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

Unified Diff: ios/chrome/browser/ui/settings/physical_web_collection_view_controller.mm

Issue 2735463002: Physical Web toggle should render as Off with pref in Default state (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/ui/settings/physical_web_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/physical_web_collection_view_controller.mm b/ios/chrome/browser/ui/settings/physical_web_collection_view_controller.mm
index a086c2aec8d0e90746bfe4371c8576dcd13c205e..9067652d30e9239156fd2dcd789c48579a9ef730 100644
--- a/ios/chrome/browser/ui/settings/physical_web_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/physical_web_collection_view_controller.mm
@@ -85,14 +85,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
#pragma mark - Preference switch
+ (BOOL)shouldEnableForPreferenceState:(int)preferenceState {
- // In the default (onboarding) state, render the preference as On if the
- // location app permission is granted.
- if (preferenceState == physical_web::kPhysicalWebOnboarding) {
- CLAuthorizationStatus authStatus = [CLLocationManager authorizationStatus];
- return (authStatus == kCLAuthorizationStatusAuthorizedWhenInUse ||
- authStatus == kCLAuthorizationStatusAuthorizedAlways);
- }
-
+ // Render the preference as "on" only if the preference is explicitly enabled.
return (preferenceState == physical_web::kPhysicalWebOn);
}
« 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