Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: ios/chrome/app/spotlight/spotlight_manager.h

Issue 2580363002: Upstream Chrome on iOS source code [1/11]. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/app/spotlight/spotlight_manager.h
diff --git a/ios/chrome/app/spotlight/spotlight_manager.h b/ios/chrome/app/spotlight/spotlight_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..527ff2567003eee4849c68c3b239c32c7c24c991
--- /dev/null
+++ b/ios/chrome/app/spotlight/spotlight_manager.h
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#import <Foundation/Foundation.h>
+namespace ios {
+class ChromeBrowserState;
+// Allows Chrome to add the bookmarks of |bookmarkModel| in the systemwide
+// Spotlight search index.
+// Bookmarks are added, removed or updated in Spotlight based on
+// BookmarkModelObserver notification.
+// As there is no possibility to check the state of the index, a global
+// reindexing is triggered on cold start every 7 days to enforce
+// bookmarks/spotlight synchronization. A global reindexing will clear the index
+// and reindex the first 1000 bookmarks.
+@interface SpotlightManager : NSObject
+// Creates a SpotlightManager tracking and indexing various browser state
+// elements such as most actives and bookmarks.
+// |browserState| must not be nil.
+// There should be only one SpotlightManager observing |browserState|.
++ (SpotlightManager*)spotlightManagerWithBrowserState:
+ (ios::ChromeBrowserState*)browserState;
+// Resyncs the index if necessary
+- (void)resyncIndex;
« no previous file with comments | « ios/chrome/app/spotlight/ ('k') | ios/chrome/app/spotlight/ » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698