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

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

Issue 10067018: Add PrerenderLocalPredictor, which will eventually perform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_backend.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_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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // 84 //
85 // Ownership of the HistoryDetails is transferred to this function. 85 // Ownership of the HistoryDetails is transferred to this function.
86 virtual void BroadcastNotifications(int type, 86 virtual void BroadcastNotifications(int type,
87 HistoryDetails* details) = 0; 87 HistoryDetails* details) = 0;
88 88
89 // Invoked when the backend has finished loading the db. 89 // Invoked when the backend has finished loading the db.
90 virtual void DBLoaded(int backend_id) = 0; 90 virtual void DBLoaded(int backend_id) = 0;
91 91
92 // Tell TopSites to start reading thumbnails from the ThumbnailsDB. 92 // Tell TopSites to start reading thumbnails from the ThumbnailsDB.
93 virtual void StartTopSitesMigration(int backend_id) = 0; 93 virtual void StartTopSitesMigration(int backend_id) = 0;
94
95 virtual void NotifyVisitDBObserversOnAddVisit(
96 const history::BriefVisitInfo& info) = 0;
94 }; 97 };
95 98
96 // Init must be called to complete object creation. This object can be 99 // Init must be called to complete object creation. This object can be
97 // constructed on any thread, but all other functions including Init() must 100 // constructed on any thread, but all other functions including Init() must
98 // be called on the history thread. 101 // be called on the history thread.
99 // 102 //
100 // |history_dir| is the directory where the history files will be placed. 103 // |history_dir| is the directory where the history files will be placed.
101 // See the definition of BroadcastNotificationsCallback above. This function 104 // See the definition of BroadcastNotificationsCallback above. This function
102 // takes ownership of the callback pointer. 105 // takes ownership of the callback pointer.
103 // 106 //
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 // If there is a favicon for |page_url| and one of the types in |icon_types|, 584 // If there is a favicon for |page_url| and one of the types in |icon_types|,
582 // |favicon| is set appropriately and true is returned. 585 // |favicon| is set appropriately and true is returned.
583 bool GetFaviconFromDB(const GURL& page_url, 586 bool GetFaviconFromDB(const GURL& page_url,
584 int icon_types, 587 int icon_types,
585 FaviconData* favicon); 588 FaviconData* favicon);
586 589
587 // Get favicon by the given |favicon_id|, the |favicon| is set appropriately 590 // Get favicon by the given |favicon_id|, the |favicon| is set appropriately
588 // and true if returned on success, otherwise false is returned. 591 // and true if returned on success, otherwise false is returned.
589 bool GetFaviconFromDB(FaviconID favicon_id, FaviconData* favicon); 592 bool GetFaviconFromDB(FaviconID favicon_id, FaviconData* favicon);
590 593
594 // Notify any observers of an addition to the visit database.
595 void NotifyVisitObservers(const VisitRow& visit);
596
591 // Data ---------------------------------------------------------------------- 597 // Data ----------------------------------------------------------------------
592 598
593 // Delegate. See the class definition above for more information. This will 599 // Delegate. See the class definition above for more information. This will
594 // be NULL before Init is called and after Cleanup, but is guaranteed 600 // be NULL before Init is called and after Cleanup, but is guaranteed
595 // non-NULL in between. 601 // non-NULL in between.
596 scoped_ptr<Delegate> delegate_; 602 scoped_ptr<Delegate> delegate_;
597 603
598 // The id of this class, given in creation and used for identifying the 604 // The id of this class, given in creation and used for identifying the
599 // backend when calling the delegate. 605 // backend when calling the delegate.
600 int id_; 606 int id_;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 // Publishes the history to all indexers which are registered to receive 684 // Publishes the history to all indexers which are registered to receive
679 // history data from us. Can be NULL if there are no listeners. 685 // history data from us. Can be NULL if there are no listeners.
680 scoped_ptr<HistoryPublisher> history_publisher_; 686 scoped_ptr<HistoryPublisher> history_publisher_;
681 687
682 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 688 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
683 }; 689 };
684 690
685 } // namespace history 691 } // namespace history
686 692
687 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 693 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698