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

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

Issue 666673010: Standardize usage of virtual/override/final in chrome/browser/history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 510
511 // Returns true if the passed visit time is already expired (used by the sync 511 // Returns true if the passed visit time is already expired (used by the sync
512 // code to avoid syncing visits that would immediately be expired). 512 // code to avoid syncing visits that would immediately be expired).
513 virtual bool IsExpiredVisitTime(const base::Time& time); 513 virtual bool IsExpiredVisitTime(const base::Time& time);
514 514
515 base::Time GetFirstRecordedTimeForTest() { 515 base::Time GetFirstRecordedTimeForTest() {
516 return first_recorded_time_; 516 return first_recorded_time_;
517 } 517 }
518 518
519 protected: 519 protected:
520 virtual ~HistoryBackend(); 520 ~HistoryBackend() override;
521 521
522 // Notify HistoryBackendObserver that |transition| to |row| occurred at 522 // Notify HistoryBackendObserver that |transition| to |row| occurred at
523 // |visit_time| following |redirects| (empty if there is no redirects). 523 // |visit_time| following |redirects| (empty if there is no redirects).
524 void NotifyURLVisited(ui::PageTransition transition, 524 void NotifyURLVisited(ui::PageTransition transition,
525 const URLRow& row, 525 const URLRow& row,
526 const RedirectList& redirects, 526 const RedirectList& redirects,
527 base::Time visit_time); 527 base::Time visit_time);
528 528
529 private: 529 private:
530 friend class base::RefCountedThreadSafe<HistoryBackend>; 530 friend class base::RefCountedThreadSafe<HistoryBackend>;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 // redirects. 788 // redirects.
789 void SendFaviconChangedNotificationForPageAndRedirects( 789 void SendFaviconChangedNotificationForPageAndRedirects(
790 const GURL& page_url); 790 const GURL& page_url);
791 791
792 // Generic stuff ------------------------------------------------------------- 792 // Generic stuff -------------------------------------------------------------
793 793
794 // Processes the next scheduled HistoryDBTask, scheduling this method 794 // Processes the next scheduled HistoryDBTask, scheduling this method
795 // to be invoked again if there are more tasks that need to run. 795 // to be invoked again if there are more tasks that need to run.
796 void ProcessDBTaskImpl(); 796 void ProcessDBTaskImpl();
797 797
798 virtual void BroadcastNotifications( 798 void BroadcastNotifications(int type,
799 int type, 799 scoped_ptr<HistoryDetails> details) override;
800 scoped_ptr<HistoryDetails> details) override; 800 void NotifySyncURLsModified(URLRows* rows) override;
801 virtual void NotifySyncURLsModified(URLRows* rows) override; 801 void NotifySyncURLsDeleted(bool all_history,
802 virtual void NotifySyncURLsDeleted(bool all_history, 802 bool expired,
803 bool expired, 803 URLRows* rows) override;
804 URLRows* rows) override;
805 804
806 // Deleting all history ------------------------------------------------------ 805 // Deleting all history ------------------------------------------------------
807 806
808 // Deletes all history. This is a special case of deleting that is separated 807 // Deletes all history. This is a special case of deleting that is separated
809 // from our normal dependency-following method for performance reasons. The 808 // from our normal dependency-following method for performance reasons. The
810 // logic lives here instead of ExpireHistoryBackend since it will cause 809 // logic lives here instead of ExpireHistoryBackend since it will cause
811 // re-initialization of some databases (e.g. Thumbnails) that could fail. 810 // re-initialization of some databases (e.g. Thumbnails) that could fail.
812 // When these databases are not valid, our pointers must be NULL, so we need 811 // When these databases are not valid, our pointers must be NULL, so we need
813 // to handle this type of operation to keep the pointers in sync. 812 // to handle this type of operation to keep the pointers in sync.
814 void DeleteAllHistory(); 813 void DeleteAllHistory();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 919
921 // List of observers 920 // List of observers
922 ObserverList<HistoryBackendObserver> observers_; 921 ObserverList<HistoryBackendObserver> observers_;
923 922
924 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 923 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
925 }; 924 };
926 925
927 } // namespace history 926 } // namespace history
928 927
929 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 928 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/expire_history_backend_unittest.cc ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698