Commit c172d697 authored by hans@chromium.org's avatar hans@chromium.org

Clean-up inline members of nested classes (remoting/)

Due to a bug, the Clang-plugin style checker failed to warn about
inline constructors, destructors, non-empty virtual methods, etc.
for nested classes.

The plugin has been fixed, and this patch is part of a clean-up of all
the code that now causes the plugin to issue errors.

BUG=139346


Review URL: https://chromiumcodereview.appspot.com/10855076

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150913 0039d316-1c4b-4281-b951-d872f2087c98
parent 0034fcde
......@@ -88,6 +88,11 @@ void HeartbeatSender::OnSignalStrategyStateChange(SignalStrategy::State state) {
}
}
bool HeartbeatSender::OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) {
return false;
}
void HeartbeatSender::SendStanza() {
DoSendStanza();
// Make sure we don't send another heartbeat before the heartbeat interval
......
......@@ -98,6 +98,8 @@ class HeartbeatSender : public SignalStrategy::Listener {
// SignalStrategy::Listener interface.
virtual void OnSignalStrategyStateChange(
SignalStrategy::State state) OVERRIDE;
virtual bool OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) OVERRIDE;
private:
FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza);
......
......@@ -66,6 +66,11 @@ void LogToServer::OnSignalStrategyStateChange(SignalStrategy::State state) {
}
}
bool LogToServer::OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) {
return false;
}
void LogToServer::OnClientConnected(const std::string& jid) {
DCHECK(CalledOnValidThread());
LogSessionStateChange(jid, true);
......
......@@ -49,6 +49,8 @@ class LogToServer : public base::NonThreadSafe,
// SignalStrategy::Listener interface.
virtual void OnSignalStrategyStateChange(
SignalStrategy::State state) OVERRIDE;
virtual bool OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) OVERRIDE;
// HostStatusObserver interface.
virtual void OnClientConnected(const std::string& jid) OVERRIDE;
......
......@@ -80,6 +80,11 @@ void SignalingConnector::OnSignalStrategyStateChange(
}
}
bool SignalingConnector::OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) {
return false;
}
void SignalingConnector::OnIPAddressChanged() {
DCHECK(CalledOnValidThread());
LOG(INFO) << "IP address has changed.";
......
......@@ -63,6 +63,8 @@ class SignalingConnector
// SignalStrategy::Listener interface.
virtual void OnSignalStrategyStateChange(
SignalStrategy::State state) OVERRIDE;
virtual bool OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) OVERRIDE;
// NetworkChangeNotifier::IPAddressObserver interface.
virtual void OnIPAddressChanged() OVERRIDE;
......
......@@ -46,13 +46,13 @@ class SignalStrategy {
// Called after state of the connection has changed. If the state
// is DISCONNECTED, then GetError() can be used to get the reason
// for the disconnection.
virtual void OnSignalStrategyStateChange(State state) {}
virtual void OnSignalStrategyStateChange(State state) = 0;
// Must return true if the stanza was handled, false
// otherwise. The signal strategy must not be deleted from a
// handler of this message.
virtual bool OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) { return false; }
const buzz::XmlElement* stanza) = 0;
};
SignalStrategy() {}
......
......@@ -128,6 +128,11 @@ void ConnectionToHost::OnSignalStrategyStateChange(
}
}
bool ConnectionToHost::OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) {
return false;
}
void ConnectionToHost::OnSessionManagerReady() {
DCHECK(CalledOnValidThread());
......
......@@ -100,6 +100,8 @@ class ConnectionToHost : public SignalStrategy::Listener,
// SignalStrategy::StatusObserver interface.
virtual void OnSignalStrategyStateChange(
SignalStrategy::State state) OVERRIDE;
virtual bool OnSignalStrategyIncomingStanza(
const buzz::XmlElement* stanza) OVERRIDE;
// SessionManager::Listener interface.
virtual void OnSessionManagerReady() OVERRIDE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment