| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 virtual base::Time GetEarlyExpirationThreshold(); | 140 virtual base::Time GetEarlyExpirationThreshold(); |
| 141 virtual void UpdateEarlyExpirationThreshold(base::Time threshold); | 141 virtual void UpdateEarlyExpirationThreshold(base::Time threshold); |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 friend class InMemoryURLIndexTest; | 144 friend class InMemoryURLIndexTest; |
| 145 FRIEND_TEST_ALL_PREFIXES(IconMappingMigrationTest, TestIconMappingMigration); | 145 FRIEND_TEST_ALL_PREFIXES(IconMappingMigrationTest, TestIconMappingMigration); |
| 146 | 146 |
| 147 // Overridden from URLDatabase: | 147 // Overridden from URLDatabase: |
| 148 virtual sql::Connection& GetDB() OVERRIDE; | 148 virtual sql::Connection& GetDB() OVERRIDE; |
| 149 | 149 |
| 150 // Overridden from DownloadDatabase: |
| 151 virtual sql::MetaTable& GetMetaTable() OVERRIDE; |
| 152 |
| 150 // Migration ----------------------------------------------------------------- | 153 // Migration ----------------------------------------------------------------- |
| 151 | 154 |
| 152 // Makes sure the version is up-to-date, updating if necessary. If the | 155 // Makes sure the version is up-to-date, updating if necessary. If the |
| 153 // database is too old to migrate, the user will be notified. In this case, or | 156 // database is too old to migrate, the user will be notified. In this case, or |
| 154 // for other errors, false will be returned. True means it is up-to-date and | 157 // for other errors, false will be returned. True means it is up-to-date and |
| 155 // ready for use. | 158 // ready for use. |
| 156 // | 159 // |
| 157 // This assumes it is called from the init function inside a transaction. It | 160 // This assumes it is called from the init function inside a transaction. It |
| 158 // may commit the transaction and start a new one if migration requires it. | 161 // may commit the transaction and start a new one if migration requires it. |
| 159 sql::InitStatus EnsureCurrentVersion(const FilePath& tmp_bookmarks_path); | 162 sql::InitStatus EnsureCurrentVersion(const FilePath& tmp_bookmarks_path); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 173 | 176 |
| 174 // See the getters above. | 177 // See the getters above. |
| 175 bool needs_version_17_migration_; | 178 bool needs_version_17_migration_; |
| 176 | 179 |
| 177 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); | 180 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); |
| 178 }; | 181 }; |
| 179 | 182 |
| 180 } // namespace history | 183 } // namespace history |
| 181 | 184 |
| 182 #endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ | 185 #endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ |
| OLD | NEW |