Chromium Code Reviews| Index: ui/base/ime/input_method_log_collector.cc |
| diff --git a/ui/base/ime/input_method_log_collector.cc b/ui/base/ime/input_method_log_collector.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..93a95088c97c816e7b8b97fd019ecfd96430dec5 |
| --- /dev/null |
| +++ b/ui/base/ime/input_method_log_collector.cc |
| @@ -0,0 +1,31 @@ |
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
|
sky
2016/01/08 16:51:57
or here.
Shu Chen
2016/01/09 01:46:02
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/base/ime/input_method_log_collector.h" |
| + |
| +#include "base/logging.h" |
| + |
| +namespace ui { |
| + |
| +InputMethodLogCollector::InputMethodLogCollector() {} |
| + |
| +InputMethodLogCollector::~InputMethodLogCollector() {} |
| + |
| +void InputMethodLogCollector::AddLog(const std::string& log_string) { |
| + logs_.push_back(log_string); |
| +} |
| + |
| +void InputMethodLogCollector::OutputLogs() { |
| + if (logs_.empty()) |
| + return; |
| + for (size_t i = 0; i < logs_.size(); ++i) |
| + LOG(ERROR) << " " << logs_[i]; |
| + logs_.clear(); |
| +} |
| + |
| +void InputMethodLogCollector::ClearLogs() { |
| + logs_.clear(); |
| +} |
| + |
| +} // namespace ui |