Commit 32c8c1b8 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

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

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

Bug: 1042208
Change-Id: Id5fa0845ad499bb3d2922b23d7e9a9d6ad3f5920
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017483Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734885}
parent 7931e426
...@@ -31,7 +31,7 @@ UnifiedConsentServiceFactory::~UnifiedConsentServiceFactory() = default; ...@@ -31,7 +31,7 @@ UnifiedConsentServiceFactory::~UnifiedConsentServiceFactory() = default;
// static // static
unified_consent::UnifiedConsentService* unified_consent::UnifiedConsentService*
UnifiedConsentServiceFactory::GetForBrowserState( UnifiedConsentServiceFactory::GetForBrowserState(
ios::ChromeBrowserState* browser_state) { ChromeBrowserState* browser_state) {
return static_cast<unified_consent::UnifiedConsentService*>( return static_cast<unified_consent::UnifiedConsentService*>(
GetInstance()->GetServiceForBrowserState(browser_state, true)); GetInstance()->GetServiceForBrowserState(browser_state, true));
} }
...@@ -39,7 +39,7 @@ UnifiedConsentServiceFactory::GetForBrowserState( ...@@ -39,7 +39,7 @@ UnifiedConsentServiceFactory::GetForBrowserState(
// static // static
unified_consent::UnifiedConsentService* unified_consent::UnifiedConsentService*
UnifiedConsentServiceFactory::GetForBrowserStateIfExists( UnifiedConsentServiceFactory::GetForBrowserStateIfExists(
ios::ChromeBrowserState* browser_state) { ChromeBrowserState* browser_state) {
return static_cast<unified_consent::UnifiedConsentService*>( return static_cast<unified_consent::UnifiedConsentService*>(
GetInstance()->GetServiceForBrowserState(browser_state, false)); GetInstance()->GetServiceForBrowserState(browser_state, false));
} }
...@@ -53,8 +53,8 @@ UnifiedConsentServiceFactory* UnifiedConsentServiceFactory::GetInstance() { ...@@ -53,8 +53,8 @@ UnifiedConsentServiceFactory* UnifiedConsentServiceFactory::GetInstance() {
std::unique_ptr<KeyedService> std::unique_ptr<KeyedService>
UnifiedConsentServiceFactory::BuildServiceInstanceFor( UnifiedConsentServiceFactory::BuildServiceInstanceFor(
web::BrowserState* context) const { web::BrowserState* context) const {
ios::ChromeBrowserState* browser_state = ChromeBrowserState* browser_state =
ios::ChromeBrowserState::FromBrowserState(context); ChromeBrowserState::FromBrowserState(context);
sync_preferences::PrefServiceSyncable* user_pref_service = sync_preferences::PrefServiceSyncable* user_pref_service =
browser_state->GetSyncablePrefs(); browser_state->GetSyncablePrefs();
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "components/keyed_service/ios/browser_state_keyed_service_factory.h" #include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state_forward.h"
class ChromeBrowserState;
namespace unified_consent { namespace unified_consent {
class UnifiedConsentService; class UnifiedConsentService;
...@@ -17,10 +18,10 @@ class UnifiedConsentService; ...@@ -17,10 +18,10 @@ class UnifiedConsentService;
class UnifiedConsentServiceFactory : public BrowserStateKeyedServiceFactory { class UnifiedConsentServiceFactory : public BrowserStateKeyedServiceFactory {
public: public:
static unified_consent::UnifiedConsentService* GetForBrowserState( static unified_consent::UnifiedConsentService* GetForBrowserState(
ios::ChromeBrowserState* browser_state); ChromeBrowserState* browser_state);
static unified_consent::UnifiedConsentService* GetForBrowserStateIfExists( static unified_consent::UnifiedConsentService* GetForBrowserStateIfExists(
ios::ChromeBrowserState* browser_state); ChromeBrowserState* browser_state);
static UnifiedConsentServiceFactory* GetInstance(); static UnifiedConsentServiceFactory* GetInstance();
......
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