Commit 76da70f4 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

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

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=jlebel@chromium.org

Bug: 1042208
Change-Id: Id538e6401c0bb27e206b9288ba8c55a37c5d3d3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015254
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarJérôme Lebel <jlebel@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735299}
parent baeef88d
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#include "ios/chrome/browser/browser_state/chrome_browser_state_forward.h" class ChromeBrowserState;
@class FirstRunConfiguration; @class FirstRunConfiguration;
@protocol SyncPresenter; @protocol SyncPresenter;
...@@ -39,13 +38,12 @@ BOOL FixOrphanWord(UILabel* label); ...@@ -39,13 +38,12 @@ BOOL FixOrphanWord(UILabel* label);
// only after a successful sign-in or explicitly skipping signing in. First Run // only after a successful sign-in or explicitly skipping signing in. First Run
// metrics are recorded iff the sentinel file didn't previous exist and was // metrics are recorded iff the sentinel file didn't previous exist and was
// successfully created. // successfully created.
void WriteFirstRunSentinelAndRecordMetrics( void WriteFirstRunSentinelAndRecordMetrics(ChromeBrowserState* browserState,
ios::ChromeBrowserState* browserState, BOOL sign_in_attempted,
BOOL sign_in_attempted, BOOL has_sso_account);
BOOL has_sso_account);
// Methods for writing sentinel and recording metrics and posting notifications // Methods for writing sentinel and recording metrics and posting notifications
void FinishFirstRun(ios::ChromeBrowserState* browserState, void FinishFirstRun(ChromeBrowserState* browserState,
web::WebState* web_state, web::WebState* web_state,
FirstRunConfiguration* config, FirstRunConfiguration* config,
id<SyncPresenter> presenter); id<SyncPresenter> presenter);
...@@ -59,7 +57,7 @@ void FirstRunDismissed(); ...@@ -59,7 +57,7 @@ void FirstRunDismissed();
// Enables or disables the data reduction proxy and also sets a key indicating // Enables or disables the data reduction proxy and also sets a key indicating
// application is using Data Reduction Proxy. // application is using Data Reduction Proxy.
void SetDataReductionProxyEnabled(ios::ChromeBrowserState* browserState, void SetDataReductionProxyEnabled(ChromeBrowserState* browserState,
BOOL enabled, BOOL enabled,
BOOL toggled_switch); BOOL toggled_switch);
......
...@@ -89,7 +89,7 @@ void CreateSentinel() { ...@@ -89,7 +89,7 @@ void CreateSentinel() {
} }
// Helper function for recording first run metrics. // Helper function for recording first run metrics.
void RecordFirstRunMetricsInternal(ios::ChromeBrowserState* browserState, void RecordFirstRunMetricsInternal(ChromeBrowserState* browserState,
bool sign_in_attempted, bool sign_in_attempted,
bool has_sso_accounts) { bool has_sso_accounts) {
first_run::SignInStatus sign_in_status; first_run::SignInStatus sign_in_status;
...@@ -140,10 +140,9 @@ BOOL FixOrphanWord(UILabel* label) { ...@@ -140,10 +140,9 @@ BOOL FixOrphanWord(UILabel* label) {
return false; return false;
} }
void WriteFirstRunSentinelAndRecordMetrics( void WriteFirstRunSentinelAndRecordMetrics(ChromeBrowserState* browserState,
ios::ChromeBrowserState* browserState, BOOL sign_in_attempted,
BOOL sign_in_attempted, BOOL has_sso_account) {
BOOL has_sso_account) {
base::PostTask( base::PostTask(
FROM_HERE, FROM_HERE,
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT}, {base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT},
...@@ -152,7 +151,7 @@ void WriteFirstRunSentinelAndRecordMetrics( ...@@ -152,7 +151,7 @@ void WriteFirstRunSentinelAndRecordMetrics(
has_sso_account); has_sso_account);
} }
void FinishFirstRun(ios::ChromeBrowserState* browserState, void FinishFirstRun(ChromeBrowserState* browserState,
web::WebState* web_state, web::WebState* web_state,
FirstRunConfiguration* config, FirstRunConfiguration* config,
id<SyncPresenter> presenter) { id<SyncPresenter> presenter) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#include "ios/chrome/browser/browser_state/chrome_browser_state_forward.h" class ChromeBrowserState;
// Status for tapped links. This enum is used in UMA and entries should not be // Status for tapped links. This enum is used in UMA and entries should not be
// re-ordered or deleted. // re-ordered or deleted.
...@@ -24,7 +24,7 @@ enum MobileFreLinkTappedStatus { ...@@ -24,7 +24,7 @@ enum MobileFreLinkTappedStatus {
// Initializes with the given URL to display and browser state. Neither // Initializes with the given URL to display and browser state. Neither
// |browserState| nor |URL| may be nil. // |browserState| nor |URL| may be nil.
- (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState - (instancetype)initWithBrowserState:(ChromeBrowserState*)browserState
URL:(NSURL*)URL; URL:(NSURL*)URL;
// The status of the load. // The status of the load.
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
@interface StaticFileViewController ()<UIScrollViewDelegate, @interface StaticFileViewController ()<UIScrollViewDelegate,
WKNavigationDelegate> { WKNavigationDelegate> {
ios::ChromeBrowserState* _browserState; // weak ChromeBrowserState* _browserState; // weak
NSURL* _URL; NSURL* _URL;
// YES if the header has been configured for RTL. // YES if the header has been configured for RTL.
BOOL _headerLaidOutForRTL; BOOL _headerLaidOutForRTL;
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
@synthesize loadStatus = _loadStatus; @synthesize loadStatus = _loadStatus;
- (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState - (instancetype)initWithBrowserState:(ChromeBrowserState*)browserState
URL:(NSURL*)URL { URL:(NSURL*)URL {
DCHECK(browserState); DCHECK(browserState);
DCHECK(URL); DCHECK(URL);
......
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