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

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

Issue 642623004: Rename VisitDatabaseObserver to HistoryServiceObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@373326
Patch Set: Created 6 years, 2 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 CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // This function is NOT guaranteed to be called. If there is an error, 118 // This function is NOT guaranteed to be called. If there is an error,
119 // there may be no in-memory database. 119 // there may be no in-memory database.
120 virtual void SetInMemoryBackend( 120 virtual void SetInMemoryBackend(
121 scoped_ptr<InMemoryHistoryBackend> backend) = 0; 121 scoped_ptr<InMemoryHistoryBackend> backend) = 0;
122 122
123 // Notify HistoryService that some URLs favicon changed that will forward 123 // Notify HistoryService that some URLs favicon changed that will forward
124 // the events to the FaviconChangedObservers in the correct thread. 124 // the events to the FaviconChangedObservers in the correct thread.
125 virtual void NotifyFaviconChanged(const std::set<GURL>& urls) = 0; 125 virtual void NotifyFaviconChanged(const std::set<GURL>& urls) = 0;
126 126
127 // Notify HistoryService that the user is visiting an URL. The event will 127 // Notify HistoryService that the user is visiting an URL. The event will
128 // be forwarded to the HistoryServiceObservers in the correct thread. 128 // be forwarded to the HistoryService::Observers in the correct thread.
129 virtual void NotifyURLVisited(ui::PageTransition transition, 129 virtual void NotifyURLVisited(ui::PageTransition transition,
130 const URLRow& row, 130 const URLRow& row,
131 const RedirectList& redirects, 131 const RedirectList& redirects,
132 base::Time visit_time) = 0; 132 base::Time visit_time) = 0;
133 133
134 // Notify HistoryService that VisitDatabase was changed. The even will be
blundell 2014/10/09 12:02:22 event
sdefresne 2014/10/13 17:27:03 Done.
135 // forwarded to the HistoryService::Observers in the correct thread.
136 virtual void NotifyAddVisit(const history::BriefVisitInfo& info) = 0;
137
134 // Broadcasts the specified notification to the notification service. 138 // Broadcasts the specified notification to the notification service.
135 // This is implemented here because notifications must only be sent from 139 // This is implemented here because notifications must only be sent from
136 // the main thread. This is the only method that doesn't identify the 140 // the main thread. This is the only method that doesn't identify the
137 // caller because notifications must always be sent. 141 // caller because notifications must always be sent.
138 virtual void BroadcastNotifications(int type, 142 virtual void BroadcastNotifications(int type,
139 scoped_ptr<HistoryDetails> details) = 0; 143 scoped_ptr<HistoryDetails> details) = 0;
140 144
141 // Invoked when the backend has finished loading the db. 145 // Invoked when the backend has finished loading the db.
142 virtual void DBLoaded() = 0; 146 virtual void DBLoaded() = 0;
143
144 virtual void NotifyVisitDBObserversOnAddVisit(
145 const history::BriefVisitInfo& info) = 0;
146 }; 147 };
147 148
148 // Init must be called to complete object creation. This object can be 149 // Init must be called to complete object creation. This object can be
149 // constructed on any thread, but all other functions including Init() must 150 // constructed on any thread, but all other functions including Init() must
150 // be called on the history thread. 151 // be called on the history thread.
151 // 152 //
152 // |history_dir| is the directory where the history files will be placed. 153 // |history_dir| is the directory where the history files will be placed.
153 // See the definition of BroadcastNotificationsCallback above. This function 154 // See the definition of BroadcastNotificationsCallback above. This function
154 // takes ownership of the callback pointer. 155 // takes ownership of the callback pointer.
155 // 156 //
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 900
900 // Listens for the system being under memory pressure. 901 // Listens for the system being under memory pressure.
901 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; 902 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_;
902 903
903 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 904 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
904 }; 905 };
905 906
906 } // namespace history 907 } // namespace history
907 908
908 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 909 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/chrome_history_client.cc ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698