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

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

Issue 13392014: Move c/b/webdata/ code to components/webdata/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge 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"
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/string_util.h" 13 #include "base/string_util.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
16 #include "base/utf_string_conversions.h" 16 #include "base/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" 19 #include "chrome/browser/search_engines/search_terms_data.h"
20 #include "chrome/browser/search_engines/template_url.h" 20 #include "chrome/browser/search_engines/template_url.h"
21 #include "chrome/browser/search_engines/template_url_service.h" 21 #include "chrome/browser/search_engines/template_url_service.h"
22 #include "chrome/browser/webdata/web_database.h" 22 #include "components/webdata/common/web_database.h"
23 #include "googleurl/src/gurl.h" 23 #include "googleurl/src/gurl.h"
24 #include "sql/statement.h" 24 #include "sql/statement.h"
25 #include "sql/transaction.h" 25 #include "sql/transaction.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";
32 32
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 } 607 }
608 } 608 }
609 609
610 // Replace the old table with the new one. 610 // Replace the old table with the new one.
611 sql = "DROP TABLE " + name; 611 sql = "DROP TABLE " + name;
612 if (!db_->Execute(sql.c_str())) 612 if (!db_->Execute(sql.c_str()))
613 return false; 613 return false;
614 sql = "ALTER TABLE keywords_temp RENAME TO " + name; 614 sql = "ALTER TABLE keywords_temp RENAME TO " + name;
615 return db_->Execute(sql.c_str()); 615 return db_->Execute(sql.c_str());
616 } 616 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698