| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "components/history/core/browser/typed_url_syncable_service.h" | 5 #include "components/history/core/browser/typed_url_syncable_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 typed_url.add_visit_transitions(ui::PAGE_TRANSITION_TYPED); | 144 typed_url.add_visit_transitions(ui::PAGE_TRANSITION_TYPED); |
| 145 return typed_url; | 145 return typed_url; |
| 146 } | 146 } |
| 147 | 147 |
| 148 class TestHistoryBackend; | 148 class TestHistoryBackend; |
| 149 | 149 |
| 150 class TestHistoryBackendDelegate : public HistoryBackend::Delegate { | 150 class TestHistoryBackendDelegate : public HistoryBackend::Delegate { |
| 151 public: | 151 public: |
| 152 TestHistoryBackendDelegate() {} | 152 TestHistoryBackendDelegate() {} |
| 153 | 153 |
| 154 void NotifyProfileError(sql::InitStatus init_status) override {} | 154 void NotifyProfileError(sql::InitStatus init_status, |
| 155 const std::string& diagnostics) override {} |
| 155 void SetInMemoryBackend( | 156 void SetInMemoryBackend( |
| 156 std::unique_ptr<InMemoryHistoryBackend> backend) override{}; | 157 std::unique_ptr<InMemoryHistoryBackend> backend) override{}; |
| 157 void NotifyFaviconsChanged(const std::set<GURL>& page_urls, | 158 void NotifyFaviconsChanged(const std::set<GURL>& page_urls, |
| 158 const GURL& icon_url) override{}; | 159 const GURL& icon_url) override{}; |
| 159 void NotifyURLVisited(ui::PageTransition transition, | 160 void NotifyURLVisited(ui::PageTransition transition, |
| 160 const URLRow& row, | 161 const URLRow& row, |
| 161 const RedirectList& redirects, | 162 const RedirectList& redirects, |
| 162 base::Time visit_time) override{}; | 163 base::Time visit_time) override{}; |
| 163 void NotifyURLsModified(const URLRows& changed_urls) override{}; | 164 void NotifyURLsModified(const URLRows& changed_urls) override{}; |
| 164 void NotifyURLsDeleted(bool all_history, | 165 void NotifyURLsDeleted(bool all_history, |
| (...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 // We should not sync the visit with timestamp #1 since it is earlier than | 1540 // We should not sync the visit with timestamp #1 since it is earlier than |
| 1540 // any other visit for this URL in the history DB. But we should sync visit | 1541 // any other visit for this URL in the history DB. But we should sync visit |
| 1541 // #4. | 1542 // #4. |
| 1542 EXPECT_EQ(3U, history_visits.size()); | 1543 EXPECT_EQ(3U, history_visits.size()); |
| 1543 EXPECT_EQ(2U, history_visits[0].visit_time.ToInternalValue()); | 1544 EXPECT_EQ(2U, history_visits[0].visit_time.ToInternalValue()); |
| 1544 EXPECT_EQ(3U, history_visits[1].visit_time.ToInternalValue()); | 1545 EXPECT_EQ(3U, history_visits[1].visit_time.ToInternalValue()); |
| 1545 EXPECT_EQ(4U, history_visits[2].visit_time.ToInternalValue()); | 1546 EXPECT_EQ(4U, history_visits[2].visit_time.ToInternalValue()); |
| 1546 } | 1547 } |
| 1547 | 1548 |
| 1548 } // namespace history | 1549 } // namespace history |
| OLD | NEW |