summaryrefslogtreecommitdiffstats
path: root/components/rappor/test_log_uploader.h
blob: a8dcc76a658fa9c0fd9be8a2ee62aa0c6da48921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2014 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 COMPONENTS_RAPPOR_TEST_LOG_UPLOADER_H_
#define COMPONENTS_RAPPOR_TEST_LOG_UPLOADER_H_

#include <string>

#include "base/macros.h"
#include "components/rappor/log_uploader_interface.h"

namespace rappor {

class TestLogUploader : public LogUploaderInterface {
 public:
  TestLogUploader();
  ~TestLogUploader() override;

  // LogUploaderInterface:
  void Start() override;
  void Stop() override;
  void QueueLog(const std::string& log) override;

  // Get if the uploader is running.
  bool is_running() { return is_running_; }

 private:
  // True if Start was called since the last Stop.
  bool is_running_;

  DISALLOW_COPY_AND_ASSIGN(TestLogUploader);
};

}  // namespace rappor

#endif  // COMPONENTS_RAPPOR_LOG_UPLOADER_INTERFACE_H_