OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_OBSERVER_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_OBSERVER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/history/core/browser/history_types.h" |
| 10 |
| 11 namespace history { |
| 12 |
| 13 class HistoryBackend; |
| 14 |
| 15 class HistoryBackendObserver { |
| 16 public: |
| 17 HistoryBackendObserver() {} |
| 18 virtual ~HistoryBackendObserver() {} |
| 19 |
| 20 // Called when user visits an URL. |
| 21 // |
| 22 // The |row| ID will be set to the value that is currently in effect in the |
| 23 // main history database. |redirects| is the list of redirects leading up to |
| 24 // the URL. If we have a redirect chain A -> B -> C and user is visiting C, |
| 25 // then |redirects[0]=B| and |redirects[1]=A|. If there are no redirects, |
| 26 // |redirects| is an empty vector. |
| 27 virtual void OnURLVisited(HistoryBackend* history_backend, |
| 28 ui::PageTransition transition, |
| 29 const URLRow& row, |
| 30 const RedirectList& redirects, |
| 31 base::Time visit_time) = 0; |
| 32 |
| 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(HistoryBackendObserver); |
| 35 }; |
| 36 |
| 37 } // namespace history |
| 38 |
| 39 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_OBSERVER_H_ |
OLD | NEW |