| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_BASE_IME_INPUT_METHOD_LOG_COLLECTOR_H_ | |
| 6 #define UI_BASE_IME_INPUT_METHOD_LOG_COLLECTOR_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "ui/base/ime/ui_base_ime_export.h" | |
| 13 | |
| 14 namespace ui { | |
| 15 | |
| 16 // The class to gather some logs and dump it through | |
| 17 // base::debug::DumpWithoutCrashing when InputMethod processing a key event. | |
| 18 // This is for tracing the issue that hardly repros: crbug.com/569339. | |
| 19 class UI_BASE_IME_EXPORT InputMethodLogCollector { | |
| 20 public: | |
| 21 InputMethodLogCollector(); | |
| 22 ~InputMethodLogCollector(); | |
| 23 void AddString(const char* str_val); | |
| 24 void AddBoolean(bool bool_val); | |
| 25 void DumpLogs(); | |
| 26 void ClearLogs(); | |
| 27 | |
| 28 private: | |
| 29 std::vector<const char*> logs_; | |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(InputMethodLogCollector); | |
| 32 }; | |
| 33 | |
| 34 } // namespace ui | |
| 35 | |
| 36 #endif // UI_BASE_IME_INPUT_METHOD_LOG_COLLECTOR_H_ | |
| OLD | NEW |