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

Side by Side Diff: chrome/browser/webdata/keyword_table.cc

Issue 13191007: Pass app_locale directly to AutofillTable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chrome frame tests fix Created 7 years, 8 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 #include "chrome/browser/webdata/keyword_table.h" 5 #include "chrome/browser/webdata/keyword_table.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 "sync_guid VARCHAR," 160 "sync_guid VARCHAR,"
161 "alternate_urls VARCHAR," 161 "alternate_urls VARCHAR,"
162 "search_terms_replacement_key VARCHAR)"); 162 "search_terms_replacement_key VARCHAR)");
163 } 163 }
164 164
165 bool KeywordTable::IsSyncable() { 165 bool KeywordTable::IsSyncable() {
166 return true; 166 return true;
167 } 167 }
168 168
169 bool KeywordTable::MigrateToVersion(int version, 169 bool KeywordTable::MigrateToVersion(int version,
170 const std::string& app_locale,
171 bool* update_compatible_version) { 170 bool* update_compatible_version) {
172 // Migrate if necessary. 171 // Migrate if necessary.
173 switch (version) { 172 switch (version) {
174 case 21: 173 case 21:
175 *update_compatible_version = true; 174 *update_compatible_version = true;
176 return MigrateToVersion21AutoGenerateKeywordColumn(); 175 return MigrateToVersion21AutoGenerateKeywordColumn();
177 case 25: 176 case 25:
178 *update_compatible_version = true; 177 *update_compatible_version = true;
179 return MigrateToVersion25AddLogoIDColumn(); 178 return MigrateToVersion25AddLogoIDColumn();
180 case 26: 179 case 26:
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 } 607 }
609 } 608 }
610 609
611 // Replace the old table with the new one. 610 // Replace the old table with the new one.
612 sql = "DROP TABLE " + name; 611 sql = "DROP TABLE " + name;
613 if (!db_->Execute(sql.c_str())) 612 if (!db_->Execute(sql.c_str()))
614 return false; 613 return false;
615 sql = "ALTER TABLE keywords_temp RENAME TO " + name; 614 sql = "ALTER TABLE keywords_temp RENAME TO " + name;
616 return db_->Execute(sql.c_str()); 615 return db_->Execute(sql.c_str());
617 } 616 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/keyword_table.h ('k') | chrome/browser/webdata/keyword_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698