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 "extensions/browser/mojo/stash_backend.h" | 5 #include "extensions/browser/mojo/stash_backend.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <utility> | 9 #include <utility> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/macros.h" |
11 #include "mojo/public/cpp/bindings/strong_binding.h" | 14 #include "mojo/public/cpp/bindings/strong_binding.h" |
12 #include "mojo/public/cpp/environment/async_waiter.h" | 15 #include "mojo/public/cpp/environment/async_waiter.h" |
13 | 16 |
14 namespace extensions { | 17 namespace extensions { |
15 namespace { | 18 namespace { |
16 | 19 |
17 // An implementation of StashService that forwards calls to a StashBackend. | 20 // An implementation of StashService that forwards calls to a StashBackend. |
18 class StashServiceImpl : public StashService { | 21 class StashServiceImpl : public StashService { |
19 public: | 22 public: |
20 StashServiceImpl(mojo::InterfaceRequest<StashService> request, | 23 StashServiceImpl(mojo::InterfaceRequest<StashService> request, |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 waiters_.clear(); | 163 waiters_.clear(); |
161 } | 164 } |
162 | 165 |
163 void StashBackend::StashEntry::OnHandleReady(MojoResult result) { | 166 void StashBackend::StashEntry::OnHandleReady(MojoResult result) { |
164 if (result != MOJO_RESULT_OK) | 167 if (result != MOJO_RESULT_OK) |
165 return; | 168 return; |
166 on_handle_readable_.Run(); | 169 on_handle_readable_.Run(); |
167 } | 170 } |
168 | 171 |
169 } // namespace extensions | 172 } // namespace extensions |
OLD | NEW |