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

Side by Side Diff: chrome/browser/history/text_database.cc

Issue 2818004: Make all new history index files use FTS3 instead of FTS2.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include <limits> 5 #include <limits>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/history/text_database.h" 9 #include "chrome/browser/history/text_database.h"
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 db_.BeginTransaction(); 162 db_.BeginTransaction();
163 } 163 }
164 164
165 void TextDatabase::CommitTransaction() { 165 void TextDatabase::CommitTransaction() {
166 db_.CommitTransaction(); 166 db_.CommitTransaction();
167 } 167 }
168 168
169 bool TextDatabase::CreateTables() { 169 bool TextDatabase::CreateTables() {
170 // FTS table of page contents. 170 // FTS table of page contents.
171 if (!db_.DoesTableExist("pages")) { 171 if (!db_.DoesTableExist("pages")) {
172 if (!db_.Execute("CREATE VIRTUAL TABLE pages USING fts2(" 172 if (!db_.Execute("CREATE VIRTUAL TABLE pages USING fts3("
173 "TOKENIZE icu," 173 "TOKENIZE icu,"
174 "url LONGVARCHAR," 174 "url LONGVARCHAR,"
175 "title LONGVARCHAR," 175 "title LONGVARCHAR,"
176 "body LONGVARCHAR)")) 176 "body LONGVARCHAR)"))
177 return false; 177 return false;
178 } 178 }
179 179
180 // Non-FTS table containing URLs and times so we can efficiently find them 180 // Non-FTS table containing URLs and times so we can efficiently find them
181 // using a regular index (all FTS columns are special and are treated as 181 // using a regular index (all FTS columns are special and are treated as
182 // full-text-search, which is not what we want when retrieving this data). 182 // full-text-search, which is not what we want when retrieving this data).
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } else { 367 } else {
368 // Since we got the results in order, we know the last item is the last 368 // Since we got the results in order, we know the last item is the last
369 // time we considered. 369 // time we considered.
370 *first_time_searched = results->back().time; 370 *first_time_searched = results->back().time;
371 } 371 }
372 372
373 statement.Reset(); 373 statement.Reset();
374 } 374 }
375 375
376 } // namespace history 376 } // namespace history
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698