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

Unified Diff: remoting/host/server_log_entry.h

Issue 282063005: Pull out common code from client and host versions of ServerLogEntry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ServerLogEntry to jingle_glue Created 6 years, 7 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/log_to_server.cc ('k') | remoting/host/server_log_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/server_log_entry.h
diff --git a/remoting/host/server_log_entry.h b/remoting/host/server_log_entry.h
deleted file mode 100644
index ccaa8501bc04b524aa17171925265992a6278122..0000000000000000000000000000000000000000
--- a/remoting/host/server_log_entry.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef REMOTING_HOST_SERVER_LOG_ENTRY_H_
-#define REMOTING_HOST_SERVER_LOG_ENTRY_H_
-
-#include <map>
-#include <string>
-
-#include "base/memory/scoped_ptr.h"
-#include "remoting/host/host_exit_codes.h"
-#include "remoting/host/host_status_sender.h"
-#include "remoting/protocol/transport.h"
-
-namespace buzz {
-class XmlElement;
-} // namespace buzz
-
-namespace remoting {
-
-class ServerLogEntry {
- public:
- // The mode of a connection.
- enum Mode {
- IT2ME,
- ME2ME
- };
-
- // Constructs a log stanza. The caller should add one or more log entry
- // stanzas as children of this stanza, before sending the log stanza to
- // the remoting bot.
- static scoped_ptr<buzz::XmlElement> MakeStanza();
-
- // Constructs a log entry for a session state change.
- // Currently this is either connection or disconnection.
- static scoped_ptr<ServerLogEntry> MakeForSessionStateChange(bool connection);
-
- // Constructs a log entry for a heartbeat.
- static scoped_ptr<ServerLogEntry> MakeForHeartbeat();
-
- // Constructs a log entry for a host status message.
- static scoped_ptr<ServerLogEntry> MakeForHostStatus(
- HostStatusSender::HostStatus host_status, HostExitCodes exit_code);
-
- ~ServerLogEntry();
-
- // Adds fields describing the host to this log entry.
- void AddHostFields();
-
- // Adds a field describing the mode of a connection to this log entry.
- void AddModeField(Mode mode);
-
- // Adds a field describing connection type (direct/stun/relay).
- void AddConnectionTypeField(protocol::TransportRoute::RouteType type);
-
- // Converts this object to an XML stanza.
- scoped_ptr<buzz::XmlElement> ToStanza() const;
-
- private:
- typedef std::map<std::string, std::string> ValuesMap;
-
- ServerLogEntry();
- void Set(const std::string& key, const std::string& value);
-
- static const char* GetValueSessionState(bool connected);
- static const char* GetValueMode(Mode mode);
-
- ValuesMap values_map_;
-};
-
-} // namespace remoting
-
-#endif
« no previous file with comments | « remoting/host/log_to_server.cc ('k') | remoting/host/server_log_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698