Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: ipc/mojo/async_handle_waiter.h

Issue 848533003: Move WeakPtrFactory to the end of AsyncHandleWaiter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ipc/mojo/async_handle_waiter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef IPC_MOJO_ASYNC_HANDLE_WAITER_H_ 5 #ifndef IPC_MOJO_ASYNC_HANDLE_WAITER_H_
6 #define IPC_MOJO_ASYNC_HANDLE_WAITER_H_ 6 #define IPC_MOJO_ASYNC_HANDLE_WAITER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 14 matching lines...) Expand all
25 class Context; 25 class Context;
26 26
27 explicit AsyncHandleWaiter(base::Callback<void(MojoResult)> callback); 27 explicit AsyncHandleWaiter(base::Callback<void(MojoResult)> callback);
28 ~AsyncHandleWaiter(); 28 ~AsyncHandleWaiter();
29 29
30 MojoResult Wait(MojoHandle handle, MojoHandleSignals signals); 30 MojoResult Wait(MojoHandle handle, MojoHandleSignals signals);
31 31
32 private: 32 private:
33 void InvokeCallback(MojoResult result); 33 void InvokeCallback(MojoResult result);
34 34
35 base::WeakPtrFactory<AsyncHandleWaiter> weak_factory_;
36 scoped_refptr<Context> context_; 35 scoped_refptr<Context> context_;
37 base::Callback<void(MojoResult)> callback_; 36 base::Callback<void(MojoResult)> callback_;
37 base::WeakPtrFactory<AsyncHandleWaiter> weak_factory_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(AsyncHandleWaiter); 39 DISALLOW_COPY_AND_ASSIGN(AsyncHandleWaiter);
40 }; 40 };
41 41
42 } // namespace internal 42 } // namespace internal
43 } // namespace IPC 43 } // namespace IPC
44 44
45 #endif // IPC_MOJO_ASYNC_HANDLE_WAITER_H_ 45 #endif // IPC_MOJO_ASYNC_HANDLE_WAITER_H_
OLDNEW
« no previous file with comments | « no previous file | ipc/mojo/async_handle_waiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698