Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: chrome/browser/history/history_database.h

Issue 10872032: Revert 152946 - Replace HistoryQuickProvider protobuf-based caching with an SQLite-based database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Query the segment ID for the provided visit. Return 0 on failure or if the 142 // Query the segment ID for the provided visit. Return 0 on failure or if the
143 // visit id wasn't found. 143 // visit id wasn't found.
144 SegmentID GetSegmentID(VisitID visit_id); 144 SegmentID GetSegmentID(VisitID visit_id);
145 145
146 // Retrieves/Updates early expiration threshold, which specifies the earliest 146 // Retrieves/Updates early expiration threshold, which specifies the earliest
147 // known point in history that may possibly to contain visits suitable for 147 // known point in history that may possibly to contain visits suitable for
148 // early expiration (AUTO_SUBFRAMES). 148 // early expiration (AUTO_SUBFRAMES).
149 virtual base::Time GetEarlyExpirationThreshold(); 149 virtual base::Time GetEarlyExpirationThreshold();
150 virtual void UpdateEarlyExpirationThreshold(base::Time threshold); 150 virtual void UpdateEarlyExpirationThreshold(base::Time threshold);
151 151
152 // Returns the database connection so that unit tests can directly access it.
153 sql::Connection* get_db_for_testing() { return &db_; }
154
155 private: 152 private:
156 #if defined(OS_ANDROID) 153 #if defined(OS_ANDROID)
157 // AndroidProviderBackend uses the |db_|. 154 // AndroidProviderBackend uses the |db_|.
158 friend class AndroidProviderBackend; 155 friend class AndroidProviderBackend;
159 FRIEND_TEST_ALL_PREFIXES(AndroidURLsMigrationTest, MigrateToVersion22); 156 FRIEND_TEST_ALL_PREFIXES(AndroidURLsMigrationTest, MigrateToVersion22);
160 #endif 157 #endif
161 friend class InMemoryURLIndexBaseTest; 158 friend class InMemoryURLIndexTest;
162 FRIEND_TEST_ALL_PREFIXES(IconMappingMigrationTest, TestIconMappingMigration); 159 FRIEND_TEST_ALL_PREFIXES(IconMappingMigrationTest, TestIconMappingMigration);
163 160
164 // Overridden from URLDatabase: 161 // Overridden from URLDatabase:
165 virtual sql::Connection& GetDB() OVERRIDE; 162 virtual sql::Connection& GetDB() OVERRIDE;
166 163
167 // Overridden from DownloadDatabase: 164 // Overridden from DownloadDatabase:
168 virtual sql::MetaTable& GetMetaTable() OVERRIDE; 165 virtual sql::MetaTable& GetMetaTable() OVERRIDE;
169 166
170 // Migration ----------------------------------------------------------------- 167 // Migration -----------------------------------------------------------------
171 168
(...skipping 21 matching lines...) Expand all
193 190
194 // See the getters above. 191 // See the getters above.
195 bool needs_version_17_migration_; 192 bool needs_version_17_migration_;
196 193
197 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); 194 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase);
198 }; 195 };
199 196
200 } // namespace history 197 } // namespace history
201 198
202 #endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ 199 #endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_browsertest.cc ('k') | chrome/browser/history/in_memory_url_cache_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698