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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 ExpireHistoryBackend expirer_; | 102 ExpireHistoryBackend expirer_; |
103 | 103 |
104 scoped_ptr<HistoryDatabase> main_db_; | 104 scoped_ptr<HistoryDatabase> main_db_; |
105 scoped_ptr<ThumbnailDatabase> thumb_db_; | 105 scoped_ptr<ThumbnailDatabase> thumb_db_; |
106 TestingProfile profile_; | 106 TestingProfile profile_; |
107 scoped_refptr<TopSites> top_sites_; | 107 scoped_refptr<TopSites> top_sites_; |
108 | 108 |
109 // Time at the beginning of the test, so everybody agrees what "now" is. | 109 // Time at the beginning of the test, so everybody agrees what "now" is. |
110 const Time now_; | 110 const Time now_; |
111 | 111 |
112 // Details received from HistoryObserver events. | |
113 typedef std::vector<URLRows> URLsModifiedNotificationList; | 112 typedef std::vector<URLRows> URLsModifiedNotificationList; |
114 URLsModifiedNotificationList urls_modified_notifications_; | 113 URLsModifiedNotificationList urls_modified_notifications_; |
115 | 114 |
116 typedef std::vector<std::pair<bool, URLRows>> URLsDeletedNotificationList; | 115 typedef std::vector<std::pair<bool, URLRows>> URLsDeletedNotificationList; |
117 URLsDeletedNotificationList urls_deleted_notifications_; | 116 URLsDeletedNotificationList urls_deleted_notifications_; |
118 | 117 |
119 private: | 118 private: |
120 void SetUp() override { | 119 void SetUp() override { |
121 ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir()); | 120 ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir()); |
122 | 121 |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); | 865 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); |
867 EXPECT_EQ(1U, visits.size()); | 866 EXPECT_EQ(1U, visits.size()); |
868 } | 867 } |
869 | 868 |
870 // TODO(brettw) add some visits with no URL to make sure everything is updated | 869 // TODO(brettw) add some visits with no URL to make sure everything is updated |
871 // properly. Have the visits also refer to nonexistent FTS rows. | 870 // properly. Have the visits also refer to nonexistent FTS rows. |
872 // | 871 // |
873 // Maybe also refer to invalid favicons. | 872 // Maybe also refer to invalid favicons. |
874 | 873 |
875 } // namespace history | 874 } // namespace history |
OLD | NEW |