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

Side by Side Diff: system_logging_mock.h

Issue 6297004: crash-reporter: Add diagnostics to help diagnose failures in the wild (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git@master
Patch Set: respond to review Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « system_logging.cc ('k') | system_logging_mock.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CRASH_REPORTER_SYSTEM_LOGGING_MOCK_H_ 5 #ifndef CRASH_REPORTER_SYSTEM_LOGGING_MOCK_H_
6 #define CRASH_REPORTER_SYSTEM_LOGGING_MOCK_H_ 6 #define CRASH_REPORTER_SYSTEM_LOGGING_MOCK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "crash-reporter/system_logging.h" 10 #include "crash-reporter/system_logging.h"
11 11
12 class SystemLoggingMock : public SystemLogging { 12 class SystemLoggingMock : public SystemLogging {
13 public: 13 public:
14 void Initialize(const char *ident) {} 14 void Initialize(const char *ident) {}
15 virtual void LogInfo(const char *format, ...); 15 virtual void LogInfo(const char *format, ...);
16 virtual void LogWarning(const char *format, ...); 16 virtual void LogWarning(const char *format, ...);
17 virtual void LogError(const char *format, ...); 17 virtual void LogError(const char *format, ...);
18 virtual void set_accumulating(bool value);
19 virtual std::string get_accumulator();
18 20
19 const std::string &log() { return log_; } 21 const std::string &log() { return log_; }
20 22
21 void clear() { log_.clear(); } 23 void clear() { log_.clear(); }
22 24
23 private: 25 private:
24 static std::string identity_; 26 static std::string identity_;
25 std::string log_; 27 std::string log_;
26 std::string ident_; 28 std::string ident_;
27 }; 29 };
28 30
29 #endif // CRASH_REPORTER_SYSTEM_LOGGING_H_ 31 #endif // CRASH_REPORTER_SYSTEM_LOGGING_H_
OLDNEW
« no previous file with comments | « system_logging.cc ('k') | system_logging_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698