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

Side by Side Diff: chrome/browser/history/visitsegment_database.cc

Issue 439713004: Partially move history_types.{cc,h} to //components/history (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/history/visitsegment_database.h" 5 #include "chrome/browser/history/visitsegment_database.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.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 "chrome/browser/history/page_usage_data.h" 17 #include "components/history/core/browser/page_usage_data.h"
18 #include "sql/statement.h" 18 #include "sql/statement.h"
19 #include "sql/transaction.h" 19 #include "sql/transaction.h"
20 20
21 // The following tables are used to store url segment information. 21 // The following tables are used to store url segment information.
22 // 22 //
23 // segments 23 // segments
24 // id Primary key 24 // id Primary key
25 // name A unique string to represent that segment. (URL derived) 25 // name A unique string to represent that segment. (URL derived)
26 // url_id ID of the url currently used to represent this segment. 26 // url_id ID of the url currently used to represent this segment.
27 // 27 //
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 "name VARCHAR," 318 "name VARCHAR,"
319 "url_id INTEGER NON NULL)") && 319 "url_id INTEGER NON NULL)") &&
320 GetDB().Execute("INSERT INTO segments_tmp SELECT " 320 GetDB().Execute("INSERT INTO segments_tmp SELECT "
321 "id, name, url_id FROM segments") && 321 "id, name, url_id FROM segments") &&
322 GetDB().Execute("DROP TABLE segments") && 322 GetDB().Execute("DROP TABLE segments") &&
323 GetDB().Execute("ALTER TABLE segments_tmp RENAME TO segments") && 323 GetDB().Execute("ALTER TABLE segments_tmp RENAME TO segments") &&
324 transaction.Commit(); 324 transaction.Commit();
325 } 325 }
326 326
327 } // namespace history 327 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698