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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_ |
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "components/history/core/browser/download_database.h" | 14 #include "components/history/core/browser/download_database.h" |
15 #include "components/history/core/browser/history_types.h" | 15 #include "components/history/core/browser/history_types.h" |
| 16 #include "components/history/core/browser/typed_url_sync_metadata_database.h" |
16 #include "components/history/core/browser/url_database.h" | 17 #include "components/history/core/browser/url_database.h" |
17 #include "components/history/core/browser/visit_database.h" | 18 #include "components/history/core/browser/visit_database.h" |
18 #include "components/history/core/browser/visitsegment_database.h" | 19 #include "components/history/core/browser/visitsegment_database.h" |
19 #include "sql/connection.h" | 20 #include "sql/connection.h" |
20 #include "sql/init_status.h" | 21 #include "sql/init_status.h" |
21 #include "sql/meta_table.h" | 22 #include "sql/meta_table.h" |
22 | 23 |
23 #if defined(OS_ANDROID) | 24 #if defined(OS_ANDROID) |
24 #include "components/history/core/browser/android/android_cache_database.h" | 25 #include "components/history/core/browser/android/android_cache_database.h" |
25 #include "components/history/core/browser/android/android_urls_database.h" | 26 #include "components/history/core/browser/android/android_urls_database.h" |
(...skipping 12 matching lines...) Expand all Loading... |
38 // text search) uses for writing and retrieving information. | 39 // text search) uses for writing and retrieving information. |
39 // | 40 // |
40 // We try to keep most logic out of the history database; this should be seen | 41 // We try to keep most logic out of the history database; this should be seen |
41 // as the storage interface. Logic for manipulating this storage layer should | 42 // as the storage interface. Logic for manipulating this storage layer should |
42 // be in HistoryBackend.cc. | 43 // be in HistoryBackend.cc. |
43 class HistoryDatabase : public DownloadDatabase, | 44 class HistoryDatabase : public DownloadDatabase, |
44 #if defined(OS_ANDROID) | 45 #if defined(OS_ANDROID) |
45 public AndroidURLsDatabase, | 46 public AndroidURLsDatabase, |
46 public AndroidCacheDatabase, | 47 public AndroidCacheDatabase, |
47 #endif | 48 #endif |
| 49 public TypedURLSyncMetadataDatabase, |
48 public URLDatabase, | 50 public URLDatabase, |
49 public VisitDatabase, | 51 public VisitDatabase, |
50 public VisitSegmentDatabase { | 52 public VisitSegmentDatabase { |
51 public: | 53 public: |
52 // A simple class for scoping a history database transaction. This does not | 54 // A simple class for scoping a history database transaction. This does not |
53 // support rollback since the history database doesn't, either. | 55 // support rollback since the history database doesn't, either. |
54 class TransactionScoper { | 56 class TransactionScoper { |
55 public: | 57 public: |
56 explicit TransactionScoper(HistoryDatabase* db) : db_(db) { | 58 explicit TransactionScoper(HistoryDatabase* db) : db_(db) { |
57 db_->BeginTransaction(); | 59 db_->BeginTransaction(); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 sql::MetaTable meta_table_; | 196 sql::MetaTable meta_table_; |
195 | 197 |
196 base::Time cached_early_expiration_threshold_; | 198 base::Time cached_early_expiration_threshold_; |
197 | 199 |
198 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); | 200 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); |
199 }; | 201 }; |
200 | 202 |
201 } // namespace history | 203 } // namespace history |
202 | 204 |
203 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_ | 205 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_ |
OLD | NEW |