OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_APP_SPOTLIGHT_SPOTLIGHT_MANAGER_H_ |
| 6 #define IOS_CHROME_APP_SPOTLIGHT_SPOTLIGHT_MANAGER_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 namespace ios { |
| 11 class ChromeBrowserState; |
| 12 } |
| 13 |
| 14 // Allows Chrome to add the bookmarks of |bookmarkModel| in the systemwide |
| 15 // Spotlight search index. |
| 16 // Bookmarks are added, removed or updated in Spotlight based on |
| 17 // BookmarkModelObserver notification. |
| 18 // As there is no possibility to check the state of the index, a global |
| 19 // reindexing is triggered on cold start every 7 days to enforce |
| 20 // bookmarks/spotlight synchronization. A global reindexing will clear the index |
| 21 // and reindex the first 1000 bookmarks. |
| 22 @interface SpotlightManager : NSObject |
| 23 |
| 24 // Creates a SpotlightManager tracking and indexing various browser state |
| 25 // elements such as most actives and bookmarks. |
| 26 // |browserState| must not be nil. |
| 27 // There should be only one SpotlightManager observing |browserState|. |
| 28 + (SpotlightManager*)spotlightManagerWithBrowserState: |
| 29 (ios::ChromeBrowserState*)browserState; |
| 30 |
| 31 // Resyncs the index if necessary |
| 32 - (void)resyncIndex; |
| 33 |
| 34 @end |
| 35 |
| 36 #endif // IOS_CHROME_APP_SPOTLIGHT_SPOTLIGHT_MANAGER_H_ |
OLD | NEW |