| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 public BroadcastNotificationDelegate { | 45 public BroadcastNotificationDelegate { |
| 46 public: | 46 public: |
| 47 // Interface implemented by the owner of the HistoryBackend object. Normally, | 47 // Interface implemented by the owner of the HistoryBackend object. Normally, |
| 48 // the history service implements this to send stuff back to the main thread. | 48 // the history service implements this to send stuff back to the main thread. |
| 49 // The unit tests can provide a different implementation if they don't have | 49 // The unit tests can provide a different implementation if they don't have |
| 50 // a history service object. | 50 // a history service object. |
| 51 class Delegate { | 51 class Delegate { |
| 52 public: | 52 public: |
| 53 virtual ~Delegate() {} | 53 virtual ~Delegate() {} |
| 54 | 54 |
| 55 // Called when the database is from a future version of the product and can | 55 // Called when the database cannot be read correctly for some reason. |
| 56 // not be used. | 56 virtual void NotifyProfileError(int message_id) = 0; |
| 57 virtual void NotifyTooNew() = 0; | |
| 58 | 57 |
| 59 // Sets the in-memory history backend. The in-memory backend is created by | 58 // Sets the in-memory history backend. The in-memory backend is created by |
| 60 // the main backend. For non-unit tests, this happens on the background | 59 // the main backend. For non-unit tests, this happens on the background |
| 61 // thread. It is to be used on the main thread, so this would transfer | 60 // thread. It is to be used on the main thread, so this would transfer |
| 62 // it to the history service. Unit tests can override this behavior. | 61 // it to the history service. Unit tests can override this behavior. |
| 63 // | 62 // |
| 64 // This function is NOT guaranteed to be called. If there is an error, | 63 // This function is NOT guaranteed to be called. If there is an error, |
| 65 // there may be no in-memory database. | 64 // there may be no in-memory database. |
| 66 // | 65 // |
| 67 // Ownership of the backend pointer is transferred to this function. | 66 // Ownership of the backend pointer is transferred to this function. |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 // Publishes the history to all indexers which are registered to receive | 510 // Publishes the history to all indexers which are registered to receive |
| 512 // history data from us. Can be NULL if there are no listeners. | 511 // history data from us. Can be NULL if there are no listeners. |
| 513 scoped_ptr<HistoryPublisher> history_publisher_; | 512 scoped_ptr<HistoryPublisher> history_publisher_; |
| 514 | 513 |
| 515 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 514 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 516 }; | 515 }; |
| 517 | 516 |
| 518 } // namespace history | 517 } // namespace history |
| 519 | 518 |
| 520 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 519 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |