chromium/remoting/client/feedback_data.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/client/feedback_data.h"

#include "base/values.h"
#include "remoting/base/name_value_map.h"

namespace remoting {

namespace {

const NameMapElement<FeedbackData::Key> kFeedbackDataKeyNames[]{
    {FeedbackData::Key::SESSION_PREVIOUS_STATE, "session-previous-state"},
    {FeedbackData::Key::SESSION_STATE, "session-state"},
    {FeedbackData::Key::SESSION_ERROR, "session-error"},
    {FeedbackData::Key::SESSION_MODE, "session-mode"},
    {FeedbackData::Key::SESSION_HOST_OS, "session-host-os"},
    {FeedbackData::Key::SESSION_HOST_OS_VERSION, "session-host-os-version"},
    {FeedbackData::Key::SESSION_HOST_VERSION, "session-host-version"},
    {FeedbackData::Key::SESSION_CREDENTIALS_TYPE, "session-credentials-type"},

    // TODO(yuweih): Collect session info for these fields.
    {FeedbackData::Key::SESSION_PERFORMANCE_STATS, "session-performance-stats"},
    {FeedbackData::Key::SESSION_PEER_CONNECTION_STATS,
     "session-peer-connection-stats"},
};

template <typename EnumType>
void SetEnumIfNotEmpty(std::map<FeedbackData::Key, std::string>* data,
                       FeedbackData::Key key,
                       const ChromotingEvent& event,
                       const std::string& event_key) {}

void SetStringIfNotEmpty(std::map<FeedbackData::Key, std::string>* data,
                         FeedbackData::Key key,
                         const ChromotingEvent& event,
                         const std::string& event_key) {}

}  // namespace

FeedbackData::FeedbackData() {}

FeedbackData::~FeedbackData() {}

void FeedbackData::SetData(Key key, const std::string& data) {}

void FeedbackData::FillWithChromotingEvent(const ChromotingEvent& event) {}

// static
std::string FeedbackData::KeyToString(Key key) {}

}  // namespace remoting