| 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_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 private: | 155 private: |
| 156 #if defined(OS_ANDROID) | 156 #if defined(OS_ANDROID) |
| 157 // AndroidProviderBackend uses the |db_|. | 157 // AndroidProviderBackend uses the |db_|. |
| 158 friend class AndroidProviderBackend; | 158 friend class AndroidProviderBackend; |
| 159 FRIEND_TEST_ALL_PREFIXES(AndroidURLsMigrationTest, MigrateToVersion22); | 159 FRIEND_TEST_ALL_PREFIXES(AndroidURLsMigrationTest, MigrateToVersion22); |
| 160 #endif | 160 #endif |
| 161 friend class ::HistoryQuickProviderTest; | 161 friend class ::HistoryQuickProviderTest; |
| 162 friend class InMemoryURLIndexTest; | 162 friend class InMemoryURLIndexTest; |
| 163 | 163 |
| 164 // Overridden from URLDatabase: | 164 // Overridden from URLDatabase: |
| 165 virtual sql::Connection& GetDB() OVERRIDE; | 165 virtual sql::Connection& GetDB() override; |
| 166 | 166 |
| 167 // Migration ----------------------------------------------------------------- | 167 // Migration ----------------------------------------------------------------- |
| 168 | 168 |
| 169 // Makes sure the version is up-to-date, updating if necessary. If the | 169 // Makes sure the version is up-to-date, updating if necessary. If the |
| 170 // database is too old to migrate, the user will be notified. Returns | 170 // database is too old to migrate, the user will be notified. Returns |
| 171 // sql::INIT_OK iff the DB is up-to-date and ready for use. | 171 // sql::INIT_OK iff the DB is up-to-date and ready for use. |
| 172 // | 172 // |
| 173 // This assumes it is called from the init function inside a transaction. It | 173 // This assumes it is called from the init function inside a transaction. It |
| 174 // may commit the transaction and start a new one if migration requires it. | 174 // may commit the transaction and start a new one if migration requires it. |
| 175 sql::InitStatus EnsureCurrentVersion(); | 175 sql::InitStatus EnsureCurrentVersion(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 187 sql::MetaTable meta_table_; | 187 sql::MetaTable meta_table_; |
| 188 | 188 |
| 189 base::Time cached_early_expiration_threshold_; | 189 base::Time cached_early_expiration_threshold_; |
| 190 | 190 |
| 191 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); | 191 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 } // namespace history | 194 } // namespace history |
| 195 | 195 |
| 196 #endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ | 196 #endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ |
| OLD | NEW |