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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 VisitRow visit_row4( | 314 VisitRow visit_row4( |
315 url_id, last_visit_time, 0, content::PAGE_TRANSITION_TYPED, 0); | 315 url_id, last_visit_time, 0, content::PAGE_TRANSITION_TYPED, 0); |
316 main_db_->AddVisit(&visit_row4, SOURCE_FIREFOX_IMPORTED); | 316 main_db_->AddVisit(&visit_row4, SOURCE_FIREFOX_IMPORTED); |
317 } | 317 } |
318 | 318 |
319 bool ExpireHistoryTest::HasFavicon(FaviconID favicon_id) { | 319 bool ExpireHistoryTest::HasFavicon(FaviconID favicon_id) { |
320 if (!thumb_db_.get() || favicon_id == 0) | 320 if (!thumb_db_.get() || favicon_id == 0) |
321 return false; | 321 return false; |
322 Time last_updated; | 322 Time last_updated; |
323 std::vector<unsigned char> icon_data_unused; | 323 scoped_refptr<base::RefCountedMemory> icon_data_unused; |
324 GURL icon_url; | 324 GURL icon_url; |
325 return thumb_db_->GetFavicon(favicon_id, &last_updated, &icon_data_unused, | 325 return thumb_db_->GetFavicon(favicon_id, &last_updated, &icon_data_unused, |
326 &icon_url, NULL); | 326 &icon_url, NULL); |
327 } | 327 } |
328 | 328 |
329 FaviconID ExpireHistoryTest::GetFavicon(const GURL& page_url, | 329 FaviconID ExpireHistoryTest::GetFavicon(const GURL& page_url, |
330 IconType icon_type) { | 330 IconType icon_type) { |
331 IconMapping icon_mapping; | 331 IconMapping icon_mapping; |
332 thumb_db_->GetIconMappingForPageURL(page_url, icon_type, &icon_mapping); | 332 thumb_db_->GetIconMappingForPageURL(page_url, icon_type, &icon_mapping); |
333 return icon_mapping.icon_id; | 333 return icon_mapping.icon_id; |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 main_db_->GetVisitsForURL(url_id, &archived_visits); | 956 main_db_->GetVisitsForURL(url_id, &archived_visits); |
957 EXPECT_EQ(0U, archived_visits.size()); | 957 EXPECT_EQ(0U, archived_visits.size()); |
958 } | 958 } |
959 | 959 |
960 // TODO(brettw) add some visits with no URL to make sure everything is updated | 960 // TODO(brettw) add some visits with no URL to make sure everything is updated |
961 // properly. Have the visits also refer to nonexistent FTS rows. | 961 // properly. Have the visits also refer to nonexistent FTS rows. |
962 // | 962 // |
963 // Maybe also refer to invalid favicons. | 963 // Maybe also refer to invalid favicons. |
964 | 964 |
965 } // namespace history | 965 } // namespace history |
OLD | NEW |