| 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> |
| 11 | 11 |
| 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/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
| 20 #include "components/history/core/browser/history_backend.h" | 20 #include "components/history/core/browser/history_backend.h" |
| 21 #include "components/history/core/browser/history_backend_client.h" | 21 #include "components/history/core/browser/history_backend_client.h" |
| 22 #include "components/history/core/browser/history_database_params.h" | 22 #include "components/history/core/browser/history_database_params.h" |
| 23 #include "components/history/core/browser/history_types.h" | 23 #include "components/history/core/browser/history_types.h" |
| 24 #include "components/history/core/browser/in_memory_history_backend.h" | 24 #include "components/history/core/browser/in_memory_history_backend.h" |
| 25 #include "components/history/core/test/test_history_database.h" | 25 #include "components/history/core/test/test_history_database.h" |
| 26 #include "sync/api/fake_sync_change_processor.h" | 26 #include "components/sync/api/fake_sync_change_processor.h" |
| 27 #include "sync/api/sync_change_processor_wrapper_for_test.h" | 27 #include "components/sync/api/sync_change_processor_wrapper_for_test.h" |
| 28 #include "sync/api/sync_error.h" | 28 #include "components/sync/api/sync_error.h" |
| 29 #include "sync/api/sync_error_factory_mock.h" | 29 #include "components/sync/api/sync_error_factory_mock.h" |
| 30 #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test
.h" | 30 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" |
| 31 #include "sync/protocol/sync.pb.h" | 31 #include "components/sync/protocol/sync.pb.h" |
| 32 #include "sync/protocol/typed_url_specifics.pb.h" | 32 #include "components/sync/protocol/typed_url_specifics.pb.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 34 | 34 |
| 35 using history::HistoryBackend; | 35 using history::HistoryBackend; |
| 36 using history::URLID; | 36 using history::URLID; |
| 37 using history::URLRow; | 37 using history::URLRow; |
| 38 using history::URLRows; | 38 using history::URLRows; |
| 39 using history::VisitRow; | 39 using history::VisitRow; |
| 40 using history::VisitVector; | 40 using history::VisitVector; |
| 41 | 41 |
| 42 namespace history { | 42 namespace history { |
| (...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 // We should not sync the visit with timestamp #1 since it is earlier than | 1495 // We should not sync the visit with timestamp #1 since it is earlier than |
| 1496 // any other visit for this URL in the history DB. But we should sync visit | 1496 // any other visit for this URL in the history DB. But we should sync visit |
| 1497 // #4. | 1497 // #4. |
| 1498 EXPECT_EQ(3U, history_visits.size()); | 1498 EXPECT_EQ(3U, history_visits.size()); |
| 1499 EXPECT_EQ(2U, history_visits[0].visit_time.ToInternalValue()); | 1499 EXPECT_EQ(2U, history_visits[0].visit_time.ToInternalValue()); |
| 1500 EXPECT_EQ(3U, history_visits[1].visit_time.ToInternalValue()); | 1500 EXPECT_EQ(3U, history_visits[1].visit_time.ToInternalValue()); |
| 1501 EXPECT_EQ(4U, history_visits[2].visit_time.ToInternalValue()); | 1501 EXPECT_EQ(4U, history_visits[2].visit_time.ToInternalValue()); |
| 1502 } | 1502 } |
| 1503 | 1503 |
| 1504 } // namespace history | 1504 } // namespace history |
| OLD | NEW |