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

Side by Side Diff: remoting/host/daemon_process_unittest.cc

Issue 1101033002: Update {virtual,override} to follow C++11 style in remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « remoting/host/curtain_mode_win.cc ('k') | remoting/host/daemon_process_win.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 private: 47 private:
48 DISALLOW_COPY_AND_ASSIGN(FakeDesktopSession); 48 DISALLOW_COPY_AND_ASSIGN(FakeDesktopSession);
49 }; 49 };
50 50
51 class MockDaemonProcess : public DaemonProcess { 51 class MockDaemonProcess : public DaemonProcess {
52 public: 52 public:
53 MockDaemonProcess( 53 MockDaemonProcess(
54 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, 54 scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
55 scoped_refptr<AutoThreadTaskRunner> io_task_runner, 55 scoped_refptr<AutoThreadTaskRunner> io_task_runner,
56 const base::Closure& stopped_callback); 56 const base::Closure& stopped_callback);
57 virtual ~MockDaemonProcess(); 57 ~MockDaemonProcess() override;
58 58
59 virtual scoped_ptr<DesktopSession> DoCreateDesktopSession( 59 scoped_ptr<DesktopSession> DoCreateDesktopSession(
60 int terminal_id, 60 int terminal_id,
61 const ScreenResolution& resolution, 61 const ScreenResolution& resolution,
62 bool virtual_terminal) override; 62 bool virtual_terminal) override;
63 63
64 virtual bool OnMessageReceived(const IPC::Message& message) override; 64 bool OnMessageReceived(const IPC::Message& message) override;
65 virtual void SendToNetwork(IPC::Message* message) override; 65 void SendToNetwork(IPC::Message* message) override;
66 66
67 MOCK_METHOD1(Received, void(const IPC::Message&)); 67 MOCK_METHOD1(Received, void(const IPC::Message&));
68 MOCK_METHOD1(Sent, void(const IPC::Message&)); 68 MOCK_METHOD1(Sent, void(const IPC::Message&));
69 69
70 MOCK_METHOD3(OnDesktopSessionAgentAttached, 70 MOCK_METHOD3(OnDesktopSessionAgentAttached,
71 bool(int, base::ProcessHandle, IPC::PlatformFileForTransit)); 71 bool(int, base::ProcessHandle, IPC::PlatformFileForTransit));
72 72
73 MOCK_METHOD1(DoCreateDesktopSessionPtr, DesktopSession*(int)); 73 MOCK_METHOD1(DoCreateDesktopSessionPtr, DesktopSession*(int));
74 MOCK_METHOD1(DoCrashNetworkProcess, void(const tracked_objects::Location&)); 74 MOCK_METHOD1(DoCrashNetworkProcess, void(const tracked_objects::Location&));
75 MOCK_METHOD0(LaunchNetworkProcess, void()); 75 MOCK_METHOD0(LaunchNetworkProcess, void());
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 EXPECT_EQ(1u, desktop_sessions().size()); 332 EXPECT_EQ(1u, desktop_sessions().size());
333 EXPECT_EQ(id, desktop_sessions().front()->id()); 333 EXPECT_EQ(id, desktop_sessions().front()->id());
334 334
335 EXPECT_TRUE(daemon_process_->OnMessageReceived( 335 EXPECT_TRUE(daemon_process_->OnMessageReceived(
336 ChromotingNetworkHostMsg_ConnectTerminal(id, resolution, false))); 336 ChromotingNetworkHostMsg_ConnectTerminal(id, resolution, false)));
337 EXPECT_TRUE(desktop_sessions().empty()); 337 EXPECT_TRUE(desktop_sessions().empty());
338 EXPECT_EQ(0, terminal_id_); 338 EXPECT_EQ(0, terminal_id_);
339 } 339 }
340 340
341 } // namespace remoting 341 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/curtain_mode_win.cc ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698