Commit 1b8fee42 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Set OmniboxPopup incognito property before view creation

This CL sets the incognito property of the OmniboxPopupViewController
before the view is created when passed to the mediator as the property
is used in viewDidLoad.

Bug: 797239
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I0db9d1754ea32d6d1a6c7cde5d2638f187da5fd3
Reviewed-on: https://chromium-review.googlesource.com/842723Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526068}
parent 687d800b
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
[[OmniboxPopupMediator alloc] initWithFetcher:std::move(imageFetcher) [[OmniboxPopupMediator alloc] initWithFetcher:std::move(imageFetcher)
delegate:_popupView.get()]; delegate:_popupView.get()];
self.popupViewController = [[OmniboxPopupViewController alloc] init]; self.popupViewController = [[OmniboxPopupViewController alloc] init];
self.popupViewController.incognito = self.browserState->IsOffTheRecord();
self.mediator.incognito = self.browserState->IsOffTheRecord(); self.mediator.incognito = self.browserState->IsOffTheRecord();
self.mediator.consumer = self.popupViewController; self.mediator.consumer = self.popupViewController;
...@@ -61,7 +62,6 @@ ...@@ -61,7 +62,6 @@
self.popupViewController.imageRetriever = self.mediator; self.popupViewController.imageRetriever = self.mediator;
self.popupViewController.delegate = self.mediator; self.popupViewController.delegate = self.mediator;
self.popupViewController.incognito = self.browserState->IsOffTheRecord();
_popupView->SetMediator(self.mediator); _popupView->SetMediator(self.mediator);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment