| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 154 void NotifyProfileError(sql::InitStatus init_status, |
| 155 const std::string& diagnostics) override {} | 155 const std::string& diagnostics) override {} |
| 156 void SetInMemoryBackend( | 156 void SetInMemoryBackend( |
| 157 std::unique_ptr<InMemoryHistoryBackend> backend) override{}; | 157 std::unique_ptr<InMemoryHistoryBackend> backend) override {} |
| 158 void NotifyFaviconsChanged(const std::set<GURL>& page_urls, | 158 void NotifyFaviconsChanged(const std::set<GURL>& page_urls, |
| 159 const GURL& icon_url) override{}; | 159 const GURL& icon_url) override {} |
| 160 void NotifyURLVisited(ui::PageTransition transition, | 160 void NotifyURLVisited(ui::PageTransition transition, |
| 161 const URLRow& row, | 161 const URLRow& row, |
| 162 const RedirectList& redirects, | 162 const RedirectList& redirects, |
| 163 base::Time visit_time) override{}; | 163 base::Time visit_time) override {} |
| 164 void NotifyURLsModified(const URLRows& changed_urls) override{}; | 164 void NotifyURLsModified(const URLRows& changed_urls) override {} |
| 165 void NotifyURLsDeleted(bool all_history, | 165 void NotifyURLsDeleted(bool all_history, |
| 166 bool expired, | 166 bool expired, |
| 167 const URLRows& deleted_rows, | 167 const URLRows& deleted_rows, |
| 168 const std::set<GURL>& favicon_urls) override{}; | 168 const std::set<GURL>& favicon_urls) override {} |
| 169 void NotifyKeywordSearchTermUpdated(const URLRow& row, | 169 void NotifyKeywordSearchTermUpdated(const URLRow& row, |
| 170 KeywordID keyword_id, | 170 KeywordID keyword_id, |
| 171 const base::string16& term) override{}; | 171 const base::string16& term) override {} |
| 172 void NotifyKeywordSearchTermDeleted(URLID url_id) override{}; | 172 void NotifyKeywordSearchTermDeleted(URLID url_id) override {} |
| 173 void DBLoaded() override{}; | 173 void DBLoaded() override {} |
| 174 | 174 |
| 175 private: | 175 private: |
| 176 DISALLOW_COPY_AND_ASSIGN(TestHistoryBackendDelegate); | 176 DISALLOW_COPY_AND_ASSIGN(TestHistoryBackendDelegate); |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 class TestHistoryBackend : public HistoryBackend { | 179 class TestHistoryBackend : public HistoryBackend { |
| 180 public: | 180 public: |
| 181 TestHistoryBackend() | 181 TestHistoryBackend() |
| 182 : HistoryBackend(new TestHistoryBackendDelegate(), | 182 : HistoryBackend(new TestHistoryBackendDelegate(), |
| 183 nullptr, | 183 nullptr, |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 EXPECT_TRUE(URLsEqual(row, url_specifics)); | 1607 EXPECT_TRUE(URLsEqual(row, url_specifics)); |
| 1608 ASSERT_EQ(1, url_specifics.visits_size()); | 1608 ASSERT_EQ(1, url_specifics.visits_size()); |
| 1609 ASSERT_EQ(static_cast<const int>(visits.size() - 1), | 1609 ASSERT_EQ(static_cast<const int>(visits.size() - 1), |
| 1610 url_specifics.visits_size()); | 1610 url_specifics.visits_size()); |
| 1611 EXPECT_EQ(visits[1].visit_time.ToInternalValue(), url_specifics.visits(0)); | 1611 EXPECT_EQ(visits[1].visit_time.ToInternalValue(), url_specifics.visits(0)); |
| 1612 EXPECT_EQ(static_cast<const int>(visits[1].transition), | 1612 EXPECT_EQ(static_cast<const int>(visits[1].transition), |
| 1613 url_specifics.visit_transitions(0)); | 1613 url_specifics.visit_transitions(0)); |
| 1614 } | 1614 } |
| 1615 | 1615 |
| 1616 } // namespace history | 1616 } // namespace history |
| OLD | NEW |