Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/common/multi_process_notification.h" | |
| 6 | |
| 7 namespace multi_process_notification { | |
| 8 | |
| 9 bool Post(const std::string& name) { | |
| 10 // TODO(dmaclach): Implement | |
| 11 NOTIMPLEMENTED(); | |
|
Mark Mentovai
2011/01/04 18:19:33
#include "base/logging.h"
dmac
2011/01/06 06:06:03
Done.
| |
| 12 return false; | |
| 13 } | |
| 14 | |
| 15 class ListenerImpl { | |
| 16 public: | |
| 17 ListenerImpl(const std::string& name, | |
| 18 Listener::Delegate* delegate); | |
| 19 virtual ~ListenerImpl(); | |
|
Mark Mentovai
2011/01/04 18:19:33
Q. Why is this virtual?
A. Because Start() is vir
dmac
2011/01/06 06:06:03
Done.
| |
| 20 | |
| 21 virtual bool Start(); | |
| 22 | |
| 23 private: | |
| 24 std::string name_; | |
| 25 Listener::Delegate* delegate_; | |
| 26 }; | |
| 27 | |
| 28 ListenerImpl::ListenerImpl(const std::string& name, | |
| 29 Listener::Delegate* delegate) | |
| 30 : name_(name), delegate_(delegate) { | |
| 31 } | |
| 32 | |
| 33 ListenerImpl::~ListenerImpl() { | |
| 34 } | |
| 35 | |
| 36 bool ListenerImpl::Start() { | |
| 37 // TODO(dmaclach): Implement | |
| 38 NOTIMPLEMENTED(); | |
| 39 return false; | |
| 40 } | |
| 41 | |
| 42 Listener::Listener(const std::string& name, Listener::Delegate* delegate) | |
|
Mark Mentovai
2011/01/04 18:19:33
Wait a sec. This is how you’re doing your factory?
dmac
2011/01/06 06:06:03
Done.
| |
| 43 : impl_(new ListenerImpl(name, delegate)) { | |
| 44 } | |
| 45 | |
| 46 Listener::~Listener() { } | |
|
Mark Mentovai
2011/01/04 18:19:33
Put the } on its own line.
dmac
2011/01/06 06:06:03
Done.
| |
| 47 | |
| 48 bool Listener::Start() { | |
| 49 return impl_->Start(); | |
| 50 } | |
| 51 | |
| 52 } // namespace multi_process_notification | |
| OLD | NEW |