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

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

Issue 667123002: Standardize usage of virtual/override/final in remoting/ (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
« no previous file with comments | « remoting/host/remote_input_filter.h ('k') | remoting/host/resizing_host_observer.h » ('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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 : public ConfigWatcher::Delegate, 145 : public ConfigWatcher::Delegate,
146 public HeartbeatSender::Listener, 146 public HeartbeatSender::Listener,
147 public HostChangeNotificationListener::Listener, 147 public HostChangeNotificationListener::Listener,
148 public IPC::Listener, 148 public IPC::Listener,
149 public base::RefCountedThreadSafe<HostProcess> { 149 public base::RefCountedThreadSafe<HostProcess> {
150 public: 150 public:
151 HostProcess(scoped_ptr<ChromotingHostContext> context, 151 HostProcess(scoped_ptr<ChromotingHostContext> context,
152 int* exit_code_out); 152 int* exit_code_out);
153 153
154 // ConfigWatcher::Delegate interface. 154 // ConfigWatcher::Delegate interface.
155 virtual void OnConfigUpdated(const std::string& serialized_config) override; 155 void OnConfigUpdated(const std::string& serialized_config) override;
156 virtual void OnConfigWatcherError() override; 156 void OnConfigWatcherError() override;
157 157
158 // IPC::Listener implementation. 158 // IPC::Listener implementation.
159 virtual bool OnMessageReceived(const IPC::Message& message) override; 159 bool OnMessageReceived(const IPC::Message& message) override;
160 virtual void OnChannelError() override; 160 void OnChannelError() override;
161 161
162 // HeartbeatSender::Listener overrides. 162 // HeartbeatSender::Listener overrides.
163 virtual void OnHeartbeatSuccessful() override; 163 void OnHeartbeatSuccessful() override;
164 virtual void OnUnknownHostIdError() override; 164 void OnUnknownHostIdError() override;
165 165
166 // HostChangeNotificationListener::Listener overrides. 166 // HostChangeNotificationListener::Listener overrides.
167 virtual void OnHostDeleted() override; 167 void OnHostDeleted() override;
168 168
169 // Initializes the pairing registry on Windows. 169 // Initializes the pairing registry on Windows.
170 void OnInitializePairingRegistry( 170 void OnInitializePairingRegistry(
171 IPC::PlatformFileForTransit privileged_key, 171 IPC::PlatformFileForTransit privileged_key,
172 IPC::PlatformFileForTransit unprivileged_key); 172 IPC::PlatformFileForTransit unprivileged_key);
173 173
174 private: 174 private:
175 enum HostState { 175 enum HostState {
176 // Host process has just been started. Waiting for config and policies to be 176 // Host process has just been started. Waiting for config and policies to be
177 // read from the disk. 177 // read from the disk.
(...skipping 19 matching lines...) Expand all
197 // STOPPING_TO_RESTART->STARTED 197 // STOPPING_TO_RESTART->STARTED
198 // STOPPING_TO_RESTART->STOPPING 198 // STOPPING_TO_RESTART->STOPPING
199 // STOPPING->STOPPED 199 // STOPPING->STOPPED
200 // STOPPED->STARTED 200 // STOPPED->STARTED
201 // 201 //
202 // |host_| must be NULL in INITIALIZING and STOPPED states and not-NULL in 202 // |host_| must be NULL in INITIALIZING and STOPPED states and not-NULL in
203 // all other states. 203 // all other states.
204 }; 204 };
205 205
206 friend class base::RefCountedThreadSafe<HostProcess>; 206 friend class base::RefCountedThreadSafe<HostProcess>;
207 virtual ~HostProcess(); 207 ~HostProcess() override;
208 208
209 void StartOnNetworkThread(); 209 void StartOnNetworkThread();
210 210
211 #if defined(OS_POSIX) 211 #if defined(OS_POSIX)
212 // Callback passed to RegisterSignalHandler() to handle SIGTERM events. 212 // Callback passed to RegisterSignalHandler() to handle SIGTERM events.
213 void SigTermHandler(int signal_number); 213 void SigTermHandler(int signal_number);
214 #endif 214 #endif
215 215
216 // Called to initialize resources on the UI thread. 216 // Called to initialize resources on the UI thread.
217 void StartOnUiThread(); 217 void StartOnUiThread();
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 int exit_code = kSuccessExitCode; 1474 int exit_code = kSuccessExitCode;
1475 new HostProcess(context.Pass(), &exit_code); 1475 new HostProcess(context.Pass(), &exit_code);
1476 1476
1477 // Run the main (also UI) message loop until the host no longer needs it. 1477 // Run the main (also UI) message loop until the host no longer needs it.
1478 message_loop.Run(); 1478 message_loop.Run();
1479 1479
1480 return exit_code; 1480 return exit_code;
1481 } 1481 }
1482 1482
1483 } // namespace remoting 1483 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/remote_input_filter.h ('k') | remoting/host/resizing_host_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698