| 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 // Contains the history backend wrapper around the in-memory URL database. This | 5 // Contains the history backend wrapper around the in-memory URL database. This |
| 6 // object maintains an in-memory cache of the subset of history required to do | 6 // object maintains an in-memory cache of the subset of history required to do |
| 7 // in-line autocomplete. | 7 // in-line autocomplete. |
| 8 // | 8 // |
| 9 // It is created on the history thread and passed to the main thread where | 9 // It is created on the history thread and passed to the main thread where |
| 10 // operations can be completed synchronously. It listenes for notifications | 10 // operations can be completed synchronously. It listenes for notifications |
| 11 // from the "regular" history backend and keeps itself in sync. | 11 // from the "regular" history backend and keeps itself in sync. |
| 12 | 12 |
| 13 #ifndef CHROME_BROWSER_HISTORY_IN_MEMORY_HISTORY_BACKEND_H_ | 13 #ifndef CHROME_BROWSER_HISTORY_IN_MEMORY_HISTORY_BACKEND_H_ |
| 14 #define CHROME_BROWSER_HISTORY_IN_MEMORY_HISTORY_BACKEND_H_ | 14 #define CHROME_BROWSER_HISTORY_IN_MEMORY_HISTORY_BACKEND_H_ |
| 15 | 15 |
| 16 #include <string> | 16 #include <string> |
| 17 | 17 |
| 18 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
| 19 #include "base/scoped_ptr.h" | 19 #include "base/scoped_ptr.h" |
| 20 #include "chrome/browser/history/history_notifications.h" | 20 #include "chrome/browser/history/history_notifications.h" |
| 21 #include "chrome/common/notification_observer.h" | 21 #include "chrome/common/notification_observer.h" |
| 22 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 22 | 23 |
| 23 class HistoryDatabase; | 24 class HistoryDatabase; |
| 24 class Profile; | 25 class Profile; |
| 25 | 26 |
| 26 namespace history { | 27 namespace history { |
| 27 | 28 |
| 28 class InMemoryDatabase; | 29 class InMemoryDatabase; |
| 29 | 30 |
| 30 class InMemoryHistoryBackend : public NotificationObserver { | 31 class InMemoryHistoryBackend : public NotificationObserver { |
| 31 public: | 32 public: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // know whether to unregister (the initialization may have failed, so we | 72 // know whether to unregister (the initialization may have failed, so we |
| 72 // may be destroyed before attaching to the main thread. | 73 // may be destroyed before attaching to the main thread. |
| 73 bool registered_for_notifications_; | 74 bool registered_for_notifications_; |
| 74 | 75 |
| 75 DISALLOW_COPY_AND_ASSIGN(InMemoryHistoryBackend); | 76 DISALLOW_COPY_AND_ASSIGN(InMemoryHistoryBackend); |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace history | 79 } // namespace history |
| 79 | 80 |
| 80 #endif // CHROME_BROWSER_IN_MEMORY_HISTORY_BACKEND_H_ | 81 #endif // CHROME_BROWSER_IN_MEMORY_HISTORY_BACKEND_H_ |
| OLD | NEW |