Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: chrome/browser/history/history_service.h

Issue 376703007: Change HistoryService::ScheduleAutocomplete interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 6 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/history/history_backend.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 #include "content/public/browser/notification_registrar.h" 35 #include "content/public/browser/notification_registrar.h"
36 #include "content/public/common/page_transition_types.h" 36 #include "content/public/common/page_transition_types.h"
37 #include "sql/init_status.h" 37 #include "sql/init_status.h"
38 #include "sync/api/syncable_service.h" 38 #include "sync/api/syncable_service.h"
39 39
40 #if defined(OS_ANDROID) 40 #if defined(OS_ANDROID)
41 class AndroidHistoryProviderService; 41 class AndroidHistoryProviderService;
42 #endif 42 #endif
43 43
44 class GURL; 44 class GURL;
45 class HistoryURLProvider;
46 class PageUsageData; 45 class PageUsageData;
47 class PageUsageRequest; 46 class PageUsageRequest;
48 class Profile; 47 class Profile;
49 struct HistoryURLProviderParams;
50 struct ImportedFaviconUsage; 48 struct ImportedFaviconUsage;
51 49
52 namespace base { 50 namespace base {
53 class FilePath; 51 class FilePath;
54 class Thread; 52 class Thread;
55 } 53 }
56 54
57 namespace visitedlink { 55 namespace visitedlink {
58 class VisitedLinkMaster; 56 class VisitedLinkMaster;
59 } 57 }
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 virtual void RebuildTable( 552 virtual void RebuildTable(
555 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; 553 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE;
556 554
557 // Low-level Init(). Same as the public version, but adds a |no_db| parameter 555 // Low-level Init(). Same as the public version, but adds a |no_db| parameter
558 // that is only set by unittests which causes the backend to not init its DB. 556 // that is only set by unittests which causes the backend to not init its DB.
559 bool Init(const base::FilePath& history_dir, bool no_db); 557 bool Init(const base::FilePath& history_dir, bool no_db);
560 558
561 // Called by the HistoryURLProvider class to schedule an autocomplete, it 559 // Called by the HistoryURLProvider class to schedule an autocomplete, it
562 // will be called back on the internal history thread with the history 560 // will be called back on the internal history thread with the history
563 // database so it can query. See history_autocomplete.cc for a diagram. 561 // database so it can query. See history_autocomplete.cc for a diagram.
564 void ScheduleAutocomplete(HistoryURLProvider* provider, 562 void ScheduleAutocomplete(const base::Callback<
565 HistoryURLProviderParams* params); 563 void(history::HistoryBackend*, history::URLDatabase*)>& callback);
566 564
567 // Broadcasts the given notification. This is called by the backend so that 565 // Broadcasts the given notification. This is called by the backend so that
568 // the notification will be broadcast on the main thread. 566 // the notification will be broadcast on the main thread.
569 void BroadcastNotificationsHelper( 567 void BroadcastNotificationsHelper(
570 int type, 568 int type,
571 scoped_ptr<history::HistoryDetails> details); 569 scoped_ptr<history::HistoryDetails> details);
572 570
573 // Notification from the backend that it has finished loading. Sends 571 // Notification from the backend that it has finished loading. Sends
574 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. 572 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true.
575 void OnDBLoaded(); 573 void OnDBLoaded();
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 974 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
977 975
978 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; 976 ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
979 977
980 history::DeleteDirectiveHandler delete_directive_handler_; 978 history::DeleteDirectiveHandler delete_directive_handler_;
981 979
982 DISALLOW_COPY_AND_ASSIGN(HistoryService); 980 DISALLOW_COPY_AND_ASSIGN(HistoryService);
983 }; 981 };
984 982
985 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 983 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_backend.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698