| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 HEADLESS_PUBLIC_UTIL_ERROR_REPORTER_H_ | 5 #ifndef HEADLESS_PUBLIC_UTIL_ERROR_REPORTER_H_ |
| 6 #define HEADLESS_PUBLIC_UTIL_ERROR_REPORTER_H_ | 6 #define HEADLESS_PUBLIC_UTIL_ERROR_REPORTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 bool HasErrors() const; | 38 bool HasErrors() const; |
| 39 | 39 |
| 40 // Returns a list of reported errors. | 40 // Returns a list of reported errors. |
| 41 const std::vector<std::string>& errors() const { return errors_; } | 41 const std::vector<std::string>& errors() const { return errors_; } |
| 42 #else // DCHECK_IS_ON() | 42 #else // DCHECK_IS_ON() |
| 43 inline void Push() {} | 43 inline void Push() {} |
| 44 inline void Pop() {} | 44 inline void Pop() {} |
| 45 inline void SetName(const char* name) {} | 45 inline void SetName(const char* name) {} |
| 46 inline void AddError(base::StringPiece description) {} | 46 inline void AddError(base::StringPiece description) {} |
| 47 inline bool HasErrors() const { return false; } | 47 inline bool HasErrors() const { return false; } |
| 48 std::vector<std::string> errors() const { return std::vector<std::string>(); } |
| 48 #endif // DCHECK_IS_ON() | 49 #endif // DCHECK_IS_ON() |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 std::vector<const char*> path_; | 52 std::vector<const char*> path_; |
| 52 std::vector<std::string> errors_; | 53 std::vector<std::string> errors_; |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace headless | 56 } // namespace headless |
| 56 | 57 |
| 57 #endif // HEADLESS_PUBLIC_UTIL_ERROR_REPORTER_H_ | 58 #endif // HEADLESS_PUBLIC_UTIL_ERROR_REPORTER_H_ |
| OLD | NEW |