[iOS] using LayoutGuideProvider for constraints methods

Change-Id: I90b0f33c15c5c45d3c232e2e028d5a5e68147f37
Reviewed-on: https://chromium-review.googlesource.com/c/1384252
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618261}
diff --git a/ios/chrome/common/ui_util/constraints_ui_util.h b/ios/chrome/common/ui_util/constraints_ui_util.h
index 9069c88..d5501fc0 100644
--- a/ios/chrome/common/ui_util/constraints_ui_util.h
+++ b/ios/chrome/common/ui_util/constraints_ui_util.h
@@ -119,8 +119,8 @@
                               id<LayoutGuideProvider> view2);
 // Deprecated version:
 void AddSameCenterXConstraint(UIView* unused_parentView,
-                              UIView* subview1,
-                              UIView* subview2);
+                              id<LayoutGuideProvider> subview1,
+                              id<LayoutGuideProvider> subview2);
 
 // Adds a constraint that |view1| and |view2| are center-aligned vertically.
 // |view1| and |view2| must be in the same view hierarchy.
@@ -128,8 +128,8 @@
                               id<LayoutGuideProvider> view2);
 // Deprecated version:
 void AddSameCenterYConstraint(UIView* unused_parentView,
-                              UIView* subview1,
-                              UIView* subview2);
+                              id<LayoutGuideProvider> subview1,
+                              id<LayoutGuideProvider> subview2);
 
 // Adds constraints to make two views' size and center equal by pinning leading,
 // trailing, top and bottom anchors.
@@ -166,12 +166,12 @@
 // the padding is optional so that the inner views are not artificially
 // shortened when fixed-size cells cut into that padding.  The padding is added
 // between |outerView| and |innerView|.
-void AddOptionalVerticalPadding(UIView* outerView,
-                                UIView* innerView,
+void AddOptionalVerticalPadding(id<LayoutGuideProvider> outerView,
+                                id<LayoutGuideProvider> innerView,
                                 CGFloat padding);
-void AddOptionalVerticalPadding(UIView* outerView,
-                                UIView* topInnerView,
-                                UIView* bottomInnerView,
+void AddOptionalVerticalPadding(id<LayoutGuideProvider> outerView,
+                                id<LayoutGuideProvider> topInnerView,
+                                id<LayoutGuideProvider> bottomInnerView,
                                 CGFloat padding);
 
 #pragma mark - Safe Area.
diff --git a/ios/chrome/common/ui_util/constraints_ui_util.mm b/ios/chrome/common/ui_util/constraints_ui_util.mm
index fc11052..93059a4f 100644
--- a/ios/chrome/common/ui_util/constraints_ui_util.mm
+++ b/ios/chrome/common/ui_util/constraints_ui_util.mm
@@ -73,8 +73,8 @@
 }
 
 void AddSameCenterXConstraint(UIView* unused_parentView,
-                              UIView* subview1,
-                              UIView* subview2) {
+                              id<LayoutGuideProvider> subview1,
+                              id<LayoutGuideProvider> subview2) {
   AddSameCenterXConstraint(subview1, subview2);
 }
 
@@ -85,8 +85,8 @@
 }
 
 void AddSameCenterYConstraint(UIView* unused_parentView,
-                              UIView* subview1,
-                              UIView* subview2) {
+                              id<LayoutGuideProvider> subview1,
+                              id<LayoutGuideProvider> subview2) {
   AddSameCenterYConstraint(subview1, subview2);
 }
 
@@ -140,15 +140,15 @@
   [NSLayoutConstraint activateConstraints:constraints];
 }
 
-void AddOptionalVerticalPadding(UIView* outerView,
-                                UIView* innerView,
+void AddOptionalVerticalPadding(id<LayoutGuideProvider> outerView,
+                                id<LayoutGuideProvider> innerView,
                                 CGFloat padding) {
   AddOptionalVerticalPadding(outerView, innerView, innerView, padding);
 }
 
-void AddOptionalVerticalPadding(UIView* outerView,
-                                UIView* topInnerView,
-                                UIView* bottomInnerView,
+void AddOptionalVerticalPadding(id<LayoutGuideProvider> outerView,
+                                id<LayoutGuideProvider> topInnerView,
+                                id<LayoutGuideProvider> bottomInnerView,
                                 CGFloat padding) {
   NSLayoutConstraint* topPaddingConstraint = [topInnerView.topAnchor
       constraintGreaterThanOrEqualToAnchor:outerView.topAnchor