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" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/browser/history/top_sites.h" | |
18 #include "chrome/browser/history/top_sites_factory.h" | 17 #include "chrome/browser/history/top_sites_factory.h" |
19 #include "chrome/test/base/testing_profile.h" | 18 #include "chrome/test/base/testing_profile.h" |
20 #include "chrome/tools/profiles/thumbnail-inl.h" | |
21 #include "components/history/core/browser/expire_history_backend.h" | 19 #include "components/history/core/browser/expire_history_backend.h" |
22 #include "components/history/core/browser/history_backend_notifier.h" | 20 #include "components/history/core/browser/history_backend_notifier.h" |
23 #include "components/history/core/browser/history_database.h" | 21 #include "components/history/core/browser/history_database.h" |
24 #include "components/history/core/browser/thumbnail_database.h" | 22 #include "components/history/core/browser/thumbnail_database.h" |
| 23 #include "components/history/core/browser/top_sites.h" |
25 #include "components/history/core/common/thumbnail_score.h" | 24 #include "components/history/core/common/thumbnail_score.h" |
26 #include "components/history/core/test/history_client_fake_bookmarks.h" | 25 #include "components/history/core/test/history_client_fake_bookmarks.h" |
27 #include "components/history/core/test/test_history_database.h" | 26 #include "components/history/core/test/test_history_database.h" |
| 27 #include "components/history/core/test/thumbnail-inl.h" |
28 #include "content/public/test/test_browser_thread.h" | 28 #include "content/public/test/test_browser_thread.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 #include "third_party/skia/include/core/SkBitmap.h" | 30 #include "third_party/skia/include/core/SkBitmap.h" |
31 #include "ui/gfx/codec/jpeg_codec.h" | 31 #include "ui/gfx/codec/jpeg_codec.h" |
32 | 32 |
33 using base::Time; | 33 using base::Time; |
34 using base::TimeDelta; | 34 using base::TimeDelta; |
35 using base::TimeTicks; | 35 using base::TimeTicks; |
36 using content::BrowserThread; | 36 using content::BrowserThread; |
37 | 37 |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); | 867 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); |
868 EXPECT_EQ(1U, visits.size()); | 868 EXPECT_EQ(1U, visits.size()); |
869 } | 869 } |
870 | 870 |
871 // TODO(brettw) add some visits with no URL to make sure everything is updated | 871 // TODO(brettw) add some visits with no URL to make sure everything is updated |
872 // properly. Have the visits also refer to nonexistent FTS rows. | 872 // properly. Have the visits also refer to nonexistent FTS rows. |
873 // | 873 // |
874 // Maybe also refer to invalid favicons. | 874 // Maybe also refer to invalid favicons. |
875 | 875 |
876 } // namespace history | 876 } // namespace history |
OLD | NEW |