Commit 651ef214 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

[ios] Fix uses of ios::ChromeBrowserState in /ios/chrome/browser/ui/infobars

The ChromeBrowserState has been moved from the "ios" namespace
to the global namespace by http://crrev.com/c/2014913. Fix the
uses from ios::ChromeBrowserState to ChromeBrowserState.

Also remove includes of chrome_browser_state_forward.h and use
a simple forward declaration instead (since the old name is no
longer necessary).

This CL was uploaded by git cl split.

R=sczs@chromium.org

Bug: 1042208
Change-Id: I5511f8af83fe19a3df0a21071792650766b6d49c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017224
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734567}
parent 80056be0
...@@ -7,12 +7,13 @@ ...@@ -7,12 +7,13 @@
#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h" #import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state_forward.h"
#import "ios/chrome/browser/infobars/infobar_type.h" #import "ios/chrome/browser/infobars/infobar_type.h"
#import "ios/chrome/browser/ui/infobars/banners/infobar_banner_delegate.h" #import "ios/chrome/browser/ui/infobars/banners/infobar_banner_delegate.h"
#import "ios/chrome/browser/ui/infobars/infobar_ui_delegate.h" #import "ios/chrome/browser/ui/infobars/infobar_ui_delegate.h"
#import "ios/chrome/browser/ui/infobars/modals/infobar_modal_delegate.h" #import "ios/chrome/browser/ui/infobars/modals/infobar_modal_delegate.h"
class ChromeBrowserState;
@protocol ApplicationCommands; @protocol ApplicationCommands;
@protocol InfobarBadgeUIDelegate; @protocol InfobarBadgeUIDelegate;
@protocol InfobarContainer; @protocol InfobarContainer;
...@@ -51,8 +52,7 @@ enum class InfobarBannerPresentationState; ...@@ -51,8 +52,7 @@ enum class InfobarBannerPresentationState;
- (instancetype)initWithBaseViewController:(UIViewController*)viewController - (instancetype)initWithBaseViewController:(UIViewController*)viewController
NS_UNAVAILABLE; NS_UNAVAILABLE;
- (instancetype)initWithBaseViewController:(UIViewController*)viewController - (instancetype)initWithBaseViewController:(UIViewController*)viewController
browserState: browserState:(ChromeBrowserState*)browserState
(ios::ChromeBrowserState*)browserState
NS_UNAVAILABLE; NS_UNAVAILABLE;
- (instancetype)initWithBaseViewController:(UIViewController*)viewController - (instancetype)initWithBaseViewController:(UIViewController*)viewController
browser:(Browser*)browser NS_UNAVAILABLE; browser:(Browser*)browser NS_UNAVAILABLE;
...@@ -88,7 +88,7 @@ enum class InfobarBannerPresentationState; ...@@ -88,7 +88,7 @@ enum class InfobarBannerPresentationState;
// The ChromeBrowserState owned by the Coordinator. // The ChromeBrowserState owned by the Coordinator.
// TODO(crbug.com/927064): Once we create the coordinators in the UI Hierarchy // TODO(crbug.com/927064): Once we create the coordinators in the UI Hierarchy
// browserState will be set on init. // browserState will be set on init.
@property(nonatomic, assign) ios::ChromeBrowserState* browserState; @property(nonatomic, assign) ChromeBrowserState* browserState;
// The WebState that the InfobarCoordinator is associated with. Can be nil. // The WebState that the InfobarCoordinator is associated with. Can be nil.
@property(nonatomic, assign) web::WebState* webState; @property(nonatomic, assign) web::WebState* webState;
......
...@@ -24,8 +24,7 @@ class WebStateList; ...@@ -24,8 +24,7 @@ class WebStateList;
// TODO(crbug.com/892376): Pass a Browser object instead of BrowserState and // TODO(crbug.com/892376): Pass a Browser object instead of BrowserState and
// WebStateList once BVC has a Browser pointer. // WebStateList once BVC has a Browser pointer.
- (instancetype)initWithBaseViewController:(UIViewController*)viewController - (instancetype)initWithBaseViewController:(UIViewController*)viewController
browserState: browserState:(ChromeBrowserState*)browserState
(ios::ChromeBrowserState*)browserState
webStateList:(WebStateList*)webStateList webStateList:(WebStateList*)webStateList
NS_DESIGNATED_INITIALIZER; NS_DESIGNATED_INITIALIZER;
; ;
...@@ -34,8 +33,7 @@ class WebStateList; ...@@ -34,8 +33,7 @@ class WebStateList;
NS_UNAVAILABLE; NS_UNAVAILABLE;
- (instancetype)initWithBaseViewController:(UIViewController*)viewController - (instancetype)initWithBaseViewController:(UIViewController*)viewController
browserState: browserState:(ChromeBrowserState*)browserState
(ios::ChromeBrowserState*)browserState
NS_UNAVAILABLE; NS_UNAVAILABLE;
- (instancetype)initWithBaseViewController:(UIViewController*)viewController - (instancetype)initWithBaseViewController:(UIViewController*)viewController
browser:(Browser*)browser NS_UNAVAILABLE; browser:(Browser*)browser NS_UNAVAILABLE;
......
...@@ -59,8 +59,7 @@ ...@@ -59,8 +59,7 @@
@implementation InfobarContainerCoordinator @implementation InfobarContainerCoordinator
- (instancetype)initWithBaseViewController:(UIViewController*)viewController - (instancetype)initWithBaseViewController:(UIViewController*)viewController
browserState: browserState:(ChromeBrowserState*)browserState
(ios::ChromeBrowserState*)browserState
webStateList:(WebStateList*)webStateList { webStateList:(WebStateList*)webStateList {
self = [super initWithBaseViewController:viewController self = [super initWithBaseViewController:viewController
browserState:browserState]; browserState:browserState];
......
...@@ -209,7 +209,7 @@ class InfobarContainerCoordinatorTest : public PlatformTest { ...@@ -209,7 +209,7 @@ class InfobarContainerCoordinatorTest : public PlatformTest {
} }
base::test::TaskEnvironment environment_; base::test::TaskEnvironment environment_;
std::unique_ptr<ios::ChromeBrowserState> browser_state_; std::unique_ptr<ChromeBrowserState> browser_state_;
InfobarContainerCoordinator* infobar_container_coordinator_; InfobarContainerCoordinator* infobar_container_coordinator_;
base::test::ScopedFeatureList feature_list_; base::test::ScopedFeatureList feature_list_;
std::unique_ptr<WebStateList> web_state_list_; std::unique_ptr<WebStateList> web_state_list_;
......
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