OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CRASH_REPORTER_SYSTEM_LOGGING_MOCK_H_ | |
6 #define CRASH_REPORTER_SYSTEM_LOGGING_MOCK_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "crash-reporter/system_logging.h" | |
11 | |
12 class SystemLoggingMock : public SystemLogging { | |
13 public: | |
14 void Initialize(const char *ident) {} | |
15 virtual void LogInfo(const char *format, ...); | |
16 virtual void LogWarning(const char *format, ...); | |
17 virtual void LogError(const char *format, ...); | |
18 virtual void set_accumulating(bool value); | |
19 virtual std::string get_accumulator(); | |
20 | |
21 const std::string &log() { return log_; } | |
22 | |
23 void clear() { log_.clear(); } | |
24 | |
25 private: | |
26 static std::string identity_; | |
27 std::string log_; | |
28 std::string ident_; | |
29 }; | |
30 | |
31 #endif // CRASH_REPORTER_SYSTEM_LOGGING_H_ | |
OLD | NEW |