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 #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" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "chrome/browser/history/history_database.h" | 18 #include "chrome/browser/history/history_database.h" |
19 #include "chrome/browser/search_engines/search_terms_data.h" | |
20 #include "chrome/browser/search_engines/template_url.h" | 19 #include "chrome/browser/search_engines/template_url.h" |
21 #include "chrome/browser/search_engines/template_url_service.h" | 20 #include "chrome/browser/search_engines/template_url_service.h" |
| 21 #include "components/search_engines/search_terms_data.h" |
22 #include "components/webdata/common/web_database.h" | 22 #include "components/webdata/common/web_database.h" |
23 #include "sql/statement.h" | 23 #include "sql/statement.h" |
24 #include "sql/transaction.h" | 24 #include "sql/transaction.h" |
25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
26 | 26 |
27 using base::Time; | 27 using base::Time; |
28 | 28 |
29 // static | 29 // static |
30 const char KeywordTable::kDefaultSearchProviderKey[] = | 30 const char KeywordTable::kDefaultSearchProviderKey[] = |
31 "Default Search Provider ID"; | 31 "Default Search Provider ID"; |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 } | 640 } |
641 } | 641 } |
642 | 642 |
643 // Replace the old table with the new one. | 643 // Replace the old table with the new one. |
644 sql = "DROP TABLE " + name; | 644 sql = "DROP TABLE " + name; |
645 if (!db_->Execute(sql.c_str())) | 645 if (!db_->Execute(sql.c_str())) |
646 return false; | 646 return false; |
647 sql = "ALTER TABLE keywords_temp RENAME TO " + name; | 647 sql = "ALTER TABLE keywords_temp RENAME TO " + name; |
648 return db_->Execute(sql.c_str()); | 648 return db_->Execute(sql.c_str()); |
649 } | 649 } |
OLD | NEW |