OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "chrome/browser/history/url_database.h" | 8 #include "chrome/browser/history/url_database.h" |
9 #include "chrome/common/sqlite_compiled_statement.h" | 9 #include "chrome/common/sqlite_compiled_statement.h" |
10 #include "chrome/common/sqlite_utils.h" | 10 #include "chrome/common/sqlite_utils.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
| 13 using base::Time; |
| 14 using base::TimeDelta; |
| 15 |
13 namespace history { | 16 namespace history { |
14 | 17 |
15 namespace { | 18 namespace { |
16 | 19 |
17 bool IsURLRowEqual(const URLRow& a, | 20 bool IsURLRowEqual(const URLRow& a, |
18 const URLRow& b) { | 21 const URLRow& b) { |
19 // TODO(brettw) when the database stores an actual Time value rather than | 22 // TODO(brettw) when the database stores an actual Time value rather than |
20 // a time_t, do a reaul comparison. Instead, we have to do a more rough | 23 // a time_t, do a reaul comparison. Instead, we have to do a more rough |
21 // comparison since the conversion reduces the precision. | 24 // comparison since the conversion reduces the precision. |
22 return a.title() == b.title() && | 25 return a.title() == b.title() && |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Delete the url. | 175 // Delete the url. |
173 ASSERT_TRUE(DeleteURLRow(url_id)); | 176 ASSERT_TRUE(DeleteURLRow(url_id)); |
174 | 177 |
175 // Make sure the keyword visit was deleted. | 178 // Make sure the keyword visit was deleted. |
176 std::vector<KeywordSearchTermVisit> matches; | 179 std::vector<KeywordSearchTermVisit> matches; |
177 GetMostRecentKeywordSearchTerms(1, L"visit", 10, &matches); | 180 GetMostRecentKeywordSearchTerms(1, L"visit", 10, &matches); |
178 ASSERT_EQ(0, matches.size()); | 181 ASSERT_EQ(0, matches.size()); |
179 } | 182 } |
180 | 183 |
181 } // namespace history | 184 } // namespace history |
OLD | NEW |