OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "sync/internal_api/public/attachments/attachment_store_frontend.h" | 5 #include "components/sync/core/attachments/attachment_store_frontend.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "sync/api/attachments/attachment.h" | 16 #include "components/sync/api/attachments/attachment.h" |
17 #include "sync/api/attachments/attachment_id.h" | 17 #include "components/sync/api/attachments/attachment_id.h" |
18 #include "sync/api/attachments/attachment_store_backend.h" | 18 #include "components/sync/api/attachments/attachment_store_backend.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace syncer { | 21 namespace syncer { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 class MockAttachmentStore : public AttachmentStoreBackend { | 25 class MockAttachmentStore : public AttachmentStoreBackend { |
26 public: | 26 public: |
27 MockAttachmentStore(const base::Closure& init_called, | 27 MockAttachmentStore(const base::Closure& init_called, |
28 const base::Closure& read_called, | 28 const base::Closure& read_called, |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 // Releasing referehce to AttachmentStoreFrontend should result in | 231 // Releasing referehce to AttachmentStoreFrontend should result in |
232 // MockAttachmentStore being deleted on backend loop. | 232 // MockAttachmentStore being deleted on backend loop. |
233 attachment_store_frontend_ = NULL; | 233 attachment_store_frontend_ = NULL; |
234 EXPECT_EQ(dtor_call_count_, 0); | 234 EXPECT_EQ(dtor_call_count_, 0); |
235 RunMessageLoop(); | 235 RunMessageLoop(); |
236 EXPECT_EQ(dtor_call_count_, 1); | 236 EXPECT_EQ(dtor_call_count_, 1); |
237 } | 237 } |
238 | 238 |
239 } // namespace syncer | 239 } // namespace syncer |
OLD | NEW |