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

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

Issue 7230053: Modify TemplateURLRef to remove unknown URL parameters, but only when it represents a prepopulate... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "app/sql/statement.h" 7 #include "app/sql/statement.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 template_url->set_usage_count(s.ColumnInt(8)); 168 template_url->set_usage_count(s.ColumnInt(8));
169 169
170 std::vector<std::string> encodings; 170 std::vector<std::string> encodings;
171 base::SplitString(s.ColumnString(9), ';', &encodings); 171 base::SplitString(s.ColumnString(9), ';', &encodings);
172 template_url->set_input_encodings(encodings); 172 template_url->set_input_encodings(encodings);
173 173
174 template_url->set_show_in_default_list(s.ColumnInt(10) == 1); 174 template_url->set_show_in_default_list(s.ColumnInt(10) == 1);
175 175
176 template_url->SetSuggestionsURL(s.ColumnString(11), 0, 0); 176 template_url->SetSuggestionsURL(s.ColumnString(11), 0, 0);
177 177
178 template_url->set_prepopulate_id(s.ColumnInt(12)); 178 template_url->SetPrepopulateId(s.ColumnInt(12));
179 179
180 template_url->set_autogenerate_keyword(s.ColumnInt(13) == 1); 180 template_url->set_autogenerate_keyword(s.ColumnInt(13) == 1);
181 181
182 template_url->set_logo_id(s.ColumnInt(14)); 182 template_url->set_logo_id(s.ColumnInt(14));
183 183
184 template_url->set_created_by_policy(s.ColumnBool(15)); 184 template_url->set_created_by_policy(s.ColumnBool(15));
185 185
186 template_url->SetInstantURL(s.ColumnString(16), 0, 0); 186 template_url->SetInstantURL(s.ColumnString(16), 0, 0);
187 187
188 template_url->set_last_modified(Time::FromTimeT(s.ColumnInt64(17))); 188 template_url->set_last_modified(Time::FromTimeT(s.ColumnInt64(17)));
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 if (!db_->Execute("ALTER TABLE keywords_temp RENAME TO keywords")) 294 if (!db_->Execute("ALTER TABLE keywords_temp RENAME TO keywords"))
295 return false; 295 return false;
296 296
297 return true; 297 return true;
298 } 298 }
299 299
300 bool KeywordTable::MigrateToVersion38AddLastModifiedColumn() { 300 bool KeywordTable::MigrateToVersion38AddLastModifiedColumn() {
301 return db_->Execute( 301 return db_->Execute(
302 "ALTER TABLE keywords ADD COLUMN last_modified INTEGER DEFAULT 0"); 302 "ALTER TABLE keywords ADD COLUMN last_modified INTEGER DEFAULT 0");
303 } 303 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698