Fix the setup of LocationBarView

When setting the LocationBarView in the ToolbarView, it should be added
to the view hierarchy only if the container exists.
Also, the container should add and constrain the LocationBarView only
if it exists.

Bug: 801102
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I6f78827f75c65b919222bbc45e56dccf9a14d6d6
Reviewed-on: https://chromium-review.googlesource.com/861627
Commit-Queue: Louis Romero <[email protected]>
Reviewed-by: Louis Romero <[email protected]>
Cr-Commit-Position: refs/heads/master@{#528603}
1 file changed