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

Side by Side Diff: components/history/core/browser/history_backend.h

Issue 1081923002: Remove PrerenderLocalPredictor, part 5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-local-predictor-4
Patch Set: Created 5 years, 8 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
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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Sets the in-memory history backend. The in-memory backend is created by 111 // Sets the in-memory history backend. The in-memory backend is created by
112 // the main backend. For non-unit tests, this happens on the background 112 // the main backend. For non-unit tests, this happens on the background
113 // thread. It is to be used on the main thread, so this would transfer 113 // thread. It is to be used on the main thread, so this would transfer
114 // it to the history service. Unit tests can override this behavior. 114 // it to the history service. Unit tests can override this behavior.
115 // 115 //
116 // This function is NOT guaranteed to be called. If there is an error, 116 // This function is NOT guaranteed to be called. If there is an error,
117 // there may be no in-memory database. 117 // there may be no in-memory database.
118 virtual void SetInMemoryBackend( 118 virtual void SetInMemoryBackend(
119 scoped_ptr<InMemoryHistoryBackend> backend) = 0; 119 scoped_ptr<InMemoryHistoryBackend> backend) = 0;
120 120
121 // Notify HistoryService that VisitDatabase was changed. The event will be
122 // forwarded to the HistoryServiceObservers in the UI thread.
123 virtual void NotifyAddVisit(const BriefVisitInfo& info) = 0;
124
125 // Notify HistoryService that some URLs favicon changed that will forward 121 // Notify HistoryService that some URLs favicon changed that will forward
126 // the events to the FaviconChangedObservers in the correct thread. 122 // the events to the FaviconChangedObservers in the correct thread.
127 virtual void NotifyFaviconChanged(const std::set<GURL>& urls) = 0; 123 virtual void NotifyFaviconChanged(const std::set<GURL>& urls) = 0;
128 124
129 // Notify HistoryService that the user is visiting an URL. The event will 125 // Notify HistoryService that the user is visiting an URL. The event will
130 // be forwarded to the HistoryServiceObservers in the correct thread. 126 // be forwarded to the HistoryServiceObservers in the correct thread.
131 virtual void NotifyURLVisited(ui::PageTransition transition, 127 virtual void NotifyURLVisited(ui::PageTransition transition,
132 const URLRow& row, 128 const URLRow& row,
133 const RedirectList& redirects, 129 const RedirectList& redirects,
134 base::Time visit_time) = 0; 130 base::Time visit_time) = 0;
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 // The IDs of the URLs may change. 731 // The IDs of the URLs may change.
736 bool ClearAllMainHistory(const URLRows& kept_urls); 732 bool ClearAllMainHistory(const URLRows& kept_urls);
737 733
738 // Deletes the FTS index database files, which are no longer used. 734 // Deletes the FTS index database files, which are no longer used.
739 void DeleteFTSIndexDatabases(); 735 void DeleteFTSIndexDatabases();
740 736
741 // Returns the HistoryClient, blocking until the bookmarks are loaded. This 737 // Returns the HistoryClient, blocking until the bookmarks are loaded. This
742 // may return null during testing. 738 // may return null during testing.
743 HistoryClient* GetHistoryClient(); 739 HistoryClient* GetHistoryClient();
744 740
745 // Notify any observers of an addition to the visit database.
746 void NotifyVisitObservers(const VisitRow& visit);
747
748 // Data ---------------------------------------------------------------------- 741 // Data ----------------------------------------------------------------------
749 742
750 // Delegate. See the class definition above for more information. This will 743 // Delegate. See the class definition above for more information. This will
751 // be null before Init is called and after Cleanup, but is guaranteed 744 // be null before Init is called and after Cleanup, but is guaranteed
752 // non-null in between. 745 // non-null in between.
753 scoped_ptr<Delegate> delegate_; 746 scoped_ptr<Delegate> delegate_;
754 747
755 // Directory where database files will be stored, empty until Init is called. 748 // Directory where database files will be stored, empty until Init is called.
756 base::FilePath history_dir_; 749 base::FilePath history_dir_;
757 750
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 814
822 // List of observers 815 // List of observers
823 ObserverList<HistoryBackendObserver> observers_; 816 ObserverList<HistoryBackendObserver> observers_;
824 817
825 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 818 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
826 }; 819 };
827 820
828 } // namespace history 821 } // namespace history
829 822
830 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ 823 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | components/history/core/browser/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698