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

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

Issue 324283003: Move search_terms_data to components/search_engines (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | « chrome/browser/webdata/DEPS ('k') | chrome/chrome_browser.gypi » ('j') | 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) 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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/DEPS ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698