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

Side by Side Diff: ipc/mojo/ipc_channel_mojo.cc

Issue 645623006: Standardize usage of virtual/override/final in ipc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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 "ipc/mojo/ipc_channel_mojo.h" 5 #include "ipc/mojo/ipc_channel_mojo.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "ipc/ipc_listener.h" 10 #include "ipc/ipc_listener.h"
11 #include "ipc/mojo/ipc_channel_mojo_readers.h" 11 #include "ipc/mojo/ipc_channel_mojo_readers.h"
12 #include "ipc/mojo/ipc_mojo_bootstrap.h" 12 #include "ipc/mojo/ipc_mojo_bootstrap.h"
13 #include "mojo/edk/embedder/embedder.h" 13 #include "mojo/edk/embedder/embedder.h"
14 14
15 #if defined(OS_POSIX) && !defined(OS_NACL) 15 #if defined(OS_POSIX) && !defined(OS_NACL)
16 #include "ipc/file_descriptor_set_posix.h" 16 #include "ipc/file_descriptor_set_posix.h"
17 #endif 17 #endif
18 18
19 namespace IPC { 19 namespace IPC {
20 20
21 namespace { 21 namespace {
22 22
23 class MojoChannelFactory : public ChannelFactory { 23 class MojoChannelFactory : public ChannelFactory {
24 public: 24 public:
25 MojoChannelFactory(ChannelMojo::Delegate* delegate, 25 MojoChannelFactory(ChannelMojo::Delegate* delegate,
26 ChannelHandle channel_handle, 26 ChannelHandle channel_handle,
27 Channel::Mode mode) 27 Channel::Mode mode)
28 : delegate_(delegate), channel_handle_(channel_handle), mode_(mode) {} 28 : delegate_(delegate), channel_handle_(channel_handle), mode_(mode) {}
29 29
30 virtual std::string GetName() const override { 30 std::string GetName() const override { return channel_handle_.name; }
31 return channel_handle_.name;
32 }
33 31
34 virtual scoped_ptr<Channel> BuildChannel(Listener* listener) override { 32 scoped_ptr<Channel> BuildChannel(Listener* listener) override {
35 return ChannelMojo::Create(delegate_, channel_handle_, mode_, listener); 33 return ChannelMojo::Create(delegate_, channel_handle_, mode_, listener);
36 } 34 }
37 35
38 private: 36 private:
39 ChannelMojo::Delegate* delegate_; 37 ChannelMojo::Delegate* delegate_;
40 ChannelHandle channel_handle_; 38 ChannelHandle channel_handle_;
41 Channel::Mode mode_; 39 Channel::Mode mode_;
42 }; 40 };
43 41
44 } // namespace 42 } // namespace
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 279
282 fdset->CommitAll(); 280 fdset->CommitAll();
283 } 281 }
284 282
285 return MOJO_RESULT_OK; 283 return MOJO_RESULT_OK;
286 } 284 }
287 285
288 #endif // defined(OS_POSIX) && !defined(OS_NACL) 286 #endif // defined(OS_POSIX) && !defined(OS_NACL)
289 287
290 } // namespace IPC 288 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698