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

Unified Diff: remoting/host/local_input_monitor_linux.cc

Issue 9720019: Use scoped_ptr<> to pass ownership in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/local_input_monitor.h ('k') | remoting/host/local_input_monitor_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/local_input_monitor_linux.cc
diff --git a/remoting/host/local_input_monitor_linux.cc b/remoting/host/local_input_monitor_linux.cc
index c6e8037b774afc5317ce3da94ce656763950fd4e..3f4712da4e2af876314e0a36361e068792aacf4c 100644
--- a/remoting/host/local_input_monitor_linux.cc
+++ b/remoting/host/local_input_monitor_linux.cc
@@ -8,23 +8,22 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
+namespace remoting {
+
namespace {
-class LocalInputMonitorLinux : public remoting::LocalInputMonitor {
+class LocalInputMonitorLinux : public LocalInputMonitor {
public:
LocalInputMonitorLinux();
~LocalInputMonitorLinux();
- virtual void Start(remoting::ChromotingHost* host) OVERRIDE;
+ virtual void Start(ChromotingHost* host) OVERRIDE;
virtual void Stop() OVERRIDE;
private:
- remoting::LocalInputMonitorThread* thread_;
+ LocalInputMonitorThread* thread_;
};
-} // namespace
-
-
LocalInputMonitorLinux::LocalInputMonitorLinux()
: thread_(NULL) {
}
@@ -33,9 +32,9 @@ LocalInputMonitorLinux::~LocalInputMonitorLinux() {
CHECK(!thread_);
}
-void LocalInputMonitorLinux::Start(remoting::ChromotingHost* host) {
+void LocalInputMonitorLinux::Start(ChromotingHost* host) {
CHECK(!thread_);
- thread_ = new remoting::LocalInputMonitorThread(host);
+ thread_ = new LocalInputMonitorThread(host);
thread_->Start();
}
@@ -47,6 +46,10 @@ void LocalInputMonitorLinux::Stop() {
thread_ = 0;
}
-remoting::LocalInputMonitor* remoting::LocalInputMonitor::Create() {
- return new LocalInputMonitorLinux;
+} // namespace
+
+scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create() {
+ return scoped_ptr<LocalInputMonitor>(new LocalInputMonitorLinux());
}
+
+} // namespace remoting
« no previous file with comments | « remoting/host/local_input_monitor.h ('k') | remoting/host/local_input_monitor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698