| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/sync_sessions/lost_navigations_recorder.h" | 5 #include "components/sync_sessions/lost_navigations_recorder.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> |
| 8 | 9 |
| 9 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 10 #include "base/test/histogram_tester.h" | 11 #include "base/test/histogram_tester.h" |
| 11 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" | 12 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" |
| 12 #include "components/sync/syncable/entry.h" | 13 #include "components/sync/syncable/entry.h" |
| 13 #include "components/sync/syncable/mutable_entry.h" | 14 #include "components/sync/syncable/mutable_entry.h" |
| 14 #include "components/sync/syncable/syncable_base_transaction.h" | 15 #include "components/sync/syncable/syncable_base_transaction.h" |
| 15 #include "components/sync/syncable/syncable_read_transaction.h" | 16 #include "components/sync/syncable/syncable_read_transaction.h" |
| 16 #include "components/sync/syncable/syncable_write_transaction.h" | 17 #include "components/sync/syncable/syncable_write_transaction.h" |
| 17 #include "components/sync/test/engine/test_directory_setter_upper.h" | 18 #include "components/sync/test/engine/test_directory_setter_upper.h" |
| 18 #include "components/sync/test/engine/test_id_factory.h" | 19 #include "components/sync/test/engine/test_id_factory.h" |
| 19 #include "components/sync_sessions/lost_navigations_recorder.h" | |
| 20 #include "components/sync_sessions/sessions_sync_manager.h" | 20 #include "components/sync_sessions/sessions_sync_manager.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 using syncer::syncable::Entry; | 23 using syncer::syncable::Entry; |
| 24 using syncer::syncable::Id; | 24 using syncer::syncable::Id; |
| 25 using syncer::syncable::MutableEntry; | 25 using syncer::syncable::MutableEntry; |
| 26 using syncer::syncable::WriteTransaction; | 26 using syncer::syncable::WriteTransaction; |
| 27 | 27 |
| 28 namespace sync_sessions { | 28 namespace sync_sessions { |
| 29 namespace { | 29 namespace { |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 ->DeleteSubrange(0, 2); | 390 ->DeleteSubrange(0, 2); |
| 391 RecordChange(&mutable_entry, specifics); | 391 RecordChange(&mutable_entry, specifics); |
| 392 | 392 |
| 393 TriggerReconcile(&mutable_entry, true, &specifics); | 393 TriggerReconcile(&mutable_entry, true, &specifics); |
| 394 | 394 |
| 395 histogram_tester.ExpectBucketCount("Sync.LostNavigationCount", 2, 1); | 395 histogram_tester.ExpectBucketCount("Sync.LostNavigationCount", 2, 1); |
| 396 } | 396 } |
| 397 | 397 |
| 398 }; // namespace | 398 }; // namespace |
| 399 }; // namespace sync_sessions | 399 }; // namespace sync_sessions |
| OLD | NEW |