| OLD | NEW |
| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 virtual ~HistoryBackend(); |
| 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 NotifyAddVisit(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>; |
| 531 friend class CommitLaterTask; // The commit task needs to call Commit(). | 531 friend class CommitLaterTask; // The commit task needs to call Commit(). |
| 532 friend class HistoryBackendTest; | 532 friend class HistoryBackendTest; |
| 533 friend class HistoryBackendDBTest; // So the unit tests can poke our innards. | 533 friend class HistoryBackendDBTest; // So the unit tests can poke our innards. |
| 534 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteAll); | 534 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteAll); |
| 535 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteAllThenAddData); | 535 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteAllThenAddData); |
| 536 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddPagesWithDetails); | 536 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddPagesWithDetails); |
| 537 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, UpdateURLs); | 537 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, UpdateURLs); |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 | 920 |
| 921 // List of observers | 921 // List of observers |
| 922 ObserverList<HistoryBackendObserver> observers_; | 922 ObserverList<HistoryBackendObserver> observers_; |
| 923 | 923 |
| 924 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 924 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 925 }; | 925 }; |
| 926 | 926 |
| 927 } // namespace history | 927 } // namespace history |
| 928 | 928 |
| 929 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 929 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |