This fixes the memory leaks exposed in unittest. BUG=chromium:408309 TEST=The memory leak related to |sender_| is gone. Change-Id: I92970d0560f6ccd1ccd7f5022ece8cc5eba4a674 Reviewed-on: https://chromium-review.googlesource.com/214578 Reviewed-by: Yunlian Jiang <yunlian@chromium.org> Tested-by: Yunlian Jiang <yunlian@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
18 lines
546 B
C++
18 lines
546 B
C++
// Copyright 2014 The Chromium OS 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 METRICS_UPLOADER_SENDER_H_
|
|
#define METRICS_UPLOADER_SENDER_H_
|
|
|
|
#include <string>
|
|
|
|
// Abstract class for a Sender that uploads a metrics message.
|
|
class Sender {
|
|
public:
|
|
virtual ~Sender() {}
|
|
// Sends a message |content| with its sha1 hash |hash|
|
|
virtual bool Send(const std::string& content, const std::string& hash) = 0;
|
|
};
|
|
|
|
#endif // METRICS_UPLOADER_SENDER_H_
|