Commit f4212466 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

[ios] Fix uses of ios::ChromeBrowserState in /ios/chrome/app/spotlight

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

Bug: 1042208
Change-Id: Ib956dacb9e2c63120faec9de2b485130903c87bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017522Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735363}
parent c3acc5c5
......@@ -6,7 +6,8 @@
#define IOS_CHROME_APP_SPOTLIGHT_BOOKMARKS_SPOTLIGHT_MANAGER_H_
#import "ios/chrome/app/spotlight/base_spotlight_manager.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state_forward.h"
class ChromeBrowserState;
namespace bookmarks {
class BookmarkNode;
......@@ -29,7 +30,7 @@ class BookmarkModel;
@property(nonatomic, weak) id<BookmarkUpdatedDelegate> delegate;
+ (BookmarksSpotlightManager*)bookmarksSpotlightManagerWithBrowserState:
(ios::ChromeBrowserState*)browserState;
(ChromeBrowserState*)browserState;
// Checks the date of the latest global indexation and reindex all bookmarks if
// needed.
......
......@@ -151,7 +151,7 @@ class SpotlightBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
@implementation BookmarksSpotlightManager
+ (BookmarksSpotlightManager*)bookmarksSpotlightManagerWithBrowserState:
(ios::ChromeBrowserState*)browserState {
(ChromeBrowserState*)browserState {
return [[BookmarksSpotlightManager alloc]
initWithLargeIconService:IOSChromeLargeIconServiceFactory::
GetForBrowserState(browserState)
......
......@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
#include "ios/chrome/browser/browser_state/chrome_browser_state_forward.h"
class ChromeBrowserState;
// Allows Chrome to add the bookmarks of |bookmarkModel| in the systemwide
// Spotlight search index.
......@@ -24,7 +24,7 @@
// |browserState| must not be nil.
// There should be only one SpotlightManager observing |browserState|.
+ (SpotlightManager*)spotlightManagerWithBrowserState:
(ios::ChromeBrowserState*)browserState;
(ChromeBrowserState*)browserState;
// Resyncs the index if necessary
- (void)resyncIndex;
......
......@@ -21,7 +21,7 @@
ActionsSpotlightManager* _actionsManager;
}
- (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState
- (instancetype)initWithBrowserState:(ChromeBrowserState*)browserState
NS_DESIGNATED_INITIALIZER;
@end
......@@ -29,14 +29,14 @@
@implementation SpotlightManager
+ (SpotlightManager*)spotlightManagerWithBrowserState:
(ios::ChromeBrowserState*)browserState {
(ChromeBrowserState*)browserState {
if (spotlight::IsSpotlightAvailable()) {
return [[SpotlightManager alloc] initWithBrowserState:browserState];
}
return nil;
}
- (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState {
- (instancetype)initWithBrowserState:(ChromeBrowserState*)browserState {
DCHECK(browserState);
DCHECK(spotlight::IsSpotlightAvailable());
self = [super init];
......
......@@ -6,7 +6,8 @@
#define IOS_CHROME_APP_SPOTLIGHT_TOPSITES_SPOTLIGHT_MANAGER_H_
#import "ios/chrome/app/spotlight/base_spotlight_manager.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state_forward.h"
class ChromeBrowserState;
// This spotlight manager handles indexing of sites shown on the NTP. Because of
// privacy concerns, only sites shown on the NTP are indexed; therefore, this
......@@ -17,7 +18,7 @@
@interface TopSitesSpotlightManager : BaseSpotlightManager
+ (TopSitesSpotlightManager*)topSitesSpotlightManagerWithBrowserState:
(ios::ChromeBrowserState*)browserState;
(ChromeBrowserState*)browserState;
// Reindexes all top sites, batching reindexes by 1 second.
- (void)reindexTopSites;
......
......@@ -151,7 +151,7 @@ class SpotlightSuggestionsBridge
@synthesize topSites = _topSites;
+ (TopSitesSpotlightManager*)topSitesSpotlightManagerWithBrowserState:
(ios::ChromeBrowserState*)browserState {
(ChromeBrowserState*)browserState {
return [[TopSitesSpotlightManager alloc]
initWithLargeIconService:IOSChromeLargeIconServiceFactory::
GetForBrowserState(browserState)
......
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