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/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/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "chrome/browser/history/page_usage_data.h" | 18 #include "chrome/browser/history/page_usage_data.h" |
19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
20 #include "sql/statement.h" | 20 #include "sql/statement.h" |
21 #include "sql/transaction.h" | 21 #include "sql/transaction.h" |
22 | 22 |
23 // The following tables are used to store url segment information. | 23 // The following tables are used to store url segment information. |
24 // | 24 // |
25 // segments | 25 // segments |
26 // id Primary key | 26 // id Primary key |
27 // name A unique string to represent that segment. (URL derived) | 27 // name A unique string to represent that segment. (URL derived) |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 statement2.BindInt64(0, pud->GetID()); | 469 statement2.BindInt64(0, pud->GetID()); |
470 if (statement2.Step()) { | 470 if (statement2.Step()) { |
471 pud->SetURL(GURL(statement2.ColumnString(0))); | 471 pud->SetURL(GURL(statement2.ColumnString(0))); |
472 pud->SetTitle(statement2.ColumnString16(1)); | 472 pud->SetTitle(statement2.ColumnString16(1)); |
473 } | 473 } |
474 statement2.Reset(true); | 474 statement2.Reset(true); |
475 } | 475 } |
476 } | 476 } |
477 | 477 |
478 } // namespace history | 478 } // namespace history |
OLD | NEW |