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" |
| 6 |
5 #include <memory> | 7 #include <memory> |
6 | 8 |
7 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
8 #include "base/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
9 #include "components/sessions/core/session_id.h" | |
10 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" | 11 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" |
11 #include "components/sync/syncable/entry.h" | 12 #include "components/sync/syncable/entry.h" |
12 #include "components/sync/syncable/mutable_entry.h" | 13 #include "components/sync/syncable/mutable_entry.h" |
13 #include "components/sync/syncable/syncable_base_transaction.h" | 14 #include "components/sync/syncable/syncable_base_transaction.h" |
14 #include "components/sync/syncable/syncable_read_transaction.h" | 15 #include "components/sync/syncable/syncable_read_transaction.h" |
15 #include "components/sync/syncable/syncable_write_transaction.h" | 16 #include "components/sync/syncable/syncable_write_transaction.h" |
16 #include "components/sync/test/engine/test_directory_setter_upper.h" | 17 #include "components/sync/test/engine/test_directory_setter_upper.h" |
17 #include "components/sync/test/engine/test_id_factory.h" | 18 #include "components/sync/test/engine/test_id_factory.h" |
18 #include "components/sync_sessions/lost_navigations_recorder.h" | 19 #include "components/sync_sessions/lost_navigations_recorder.h" |
19 #include "components/sync_sessions/sessions_sync_manager.h" | 20 #include "components/sync_sessions/sessions_sync_manager.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 ->DeleteSubrange(0, 2); | 390 ->DeleteSubrange(0, 2); |
390 RecordChange(&mutable_entry, specifics); | 391 RecordChange(&mutable_entry, specifics); |
391 | 392 |
392 TriggerReconcile(&mutable_entry, true, &specifics); | 393 TriggerReconcile(&mutable_entry, true, &specifics); |
393 | 394 |
394 histogram_tester.ExpectBucketCount("Sync.LostNavigationCount", 2, 1); | 395 histogram_tester.ExpectBucketCount("Sync.LostNavigationCount", 2, 1); |
395 } | 396 } |
396 | 397 |
397 }; // namespace | 398 }; // namespace |
398 }; // namespace sync_sessions | 399 }; // namespace sync_sessions |
OLD | NEW |