Commit 634b5373 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

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

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

Bug: 1042208
Change-Id: I06cfd4c1857415875049030e7d7f5c262050a079
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017525Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735811}
parent a8ee0496
......@@ -15,7 +15,7 @@
// static
instance_id::InstanceIDProfileService*
IOSChromeInstanceIDProfileServiceFactory::GetForBrowserState(
ios::ChromeBrowserState* browser_state) {
ChromeBrowserState* browser_state) {
return static_cast<instance_id::InstanceIDProfileService*>(
GetInstance()->GetServiceForBrowserState(browser_state, true));
}
......@@ -43,8 +43,8 @@ IOSChromeInstanceIDProfileServiceFactory::BuildServiceInstanceFor(
web::BrowserState* context) const {
DCHECK(!context->IsOffTheRecord());
ios::ChromeBrowserState* browser_state =
ios::ChromeBrowserState::FromBrowserState(context);
ChromeBrowserState* browser_state =
ChromeBrowserState::FromBrowserState(context);
return std::make_unique<instance_id::InstanceIDProfileService>(
IOSChromeGCMProfileServiceFactory::GetForBrowserState(browser_state)
->driver(),
......
......@@ -10,19 +10,20 @@
#include "base/macros.h"
#include "base/no_destructor.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 instance_id {
class InstanceIDProfileService;
}
// Singleton that owns all InstanceIDProfileService and associates them with
// ios::ChromeBrowserState.
// ChromeBrowserState.
class IOSChromeInstanceIDProfileServiceFactory
: public BrowserStateKeyedServiceFactory {
public:
static instance_id::InstanceIDProfileService* GetForBrowserState(
ios::ChromeBrowserState* browser_state);
ChromeBrowserState* browser_state);
static IOSChromeInstanceIDProfileServiceFactory* GetInstance();
......
......@@ -58,7 +58,7 @@ void RequestProxyResolvingSocketFactory(
// static
gcm::GCMProfileService* IOSChromeGCMProfileServiceFactory::GetForBrowserState(
ios::ChromeBrowserState* browser_state) {
ChromeBrowserState* browser_state) {
return static_cast<gcm::GCMProfileService*>(
GetInstance()->GetServiceForBrowserState(browser_state, true));
}
......@@ -98,8 +98,8 @@ IOSChromeGCMProfileServiceFactory::BuildServiceInstanceFor(
{base::ThreadPool(), base::MayBlock(),
base::TaskPriority::BEST_EFFORT,
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}));
ios::ChromeBrowserState* browser_state =
ios::ChromeBrowserState::FromBrowserState(context);
ChromeBrowserState* browser_state =
ChromeBrowserState::FromBrowserState(context);
return std::make_unique<gcm::GCMProfileService>(
browser_state->GetPrefs(), browser_state->GetStatePath(),
base::BindRepeating(&RequestProxyResolvingSocketFactory, context),
......
......@@ -11,19 +11,20 @@
#include "base/macros.h"
#include "base/no_destructor.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 gcm {
class GCMProfileService;
}
// Singleton that owns all GCMProfileService and associates them with
// ios::ChromeBrowserState.
// ChromeBrowserState.
class IOSChromeGCMProfileServiceFactory
: public BrowserStateKeyedServiceFactory {
public:
static gcm::GCMProfileService* GetForBrowserState(
ios::ChromeBrowserState* browser_state);
ChromeBrowserState* browser_state);
static IOSChromeGCMProfileServiceFactory* 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