| Index: chrome/browser/chromeos/input_method/input_method_engine.cc
|
| diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc
|
| index ddd35079d82aeac5aa61e2f2fa60aff7ba6b5484..8f5ec0d0490e00f5796b4908a72c4ee2d74fc4c0 100644
|
| --- a/chrome/browser/chromeos/input_method/input_method_engine.cc
|
| +++ b/chrome/browser/chromeos/input_method/input_method_engine.cc
|
| @@ -162,8 +162,6 @@ InputMethodEngine::InputMethodEngine()
|
| }
|
|
|
| InputMethodEngine::~InputMethodEngine() {
|
| - if (start_time_.ToInternalValue())
|
| - RecordHistogram("WorkingTime", (end_time_ - start_time_).InSeconds());
|
| }
|
|
|
| void InputMethodEngine::Initialize(
|
| @@ -176,15 +174,6 @@ void InputMethodEngine::Initialize(
|
| extension_id_ = extension_id;
|
| }
|
|
|
| -void InputMethodEngine::RecordHistogram(const char* name, int count) {
|
| - std::string histo_name = base::StringPrintf(
|
| - "InputMethod.%s.%s", name, active_component_id_.c_str());
|
| - base::HistogramBase* counter = base::Histogram::FactoryGet(
|
| - histo_name, 0, 1000000, 50, base::HistogramBase::kNoFlags);
|
| - if (counter)
|
| - counter->Add(count);
|
| -}
|
| -
|
| const std::string& InputMethodEngine::GetActiveComponentId() const {
|
| return active_component_id_;
|
| }
|
| @@ -270,13 +259,11 @@ bool InputMethodEngine::CommitText(int context_id, const char* text,
|
|
|
| IMEBridge::Get()->GetInputContextHandler()->CommitText(text);
|
|
|
| - // Records times for using input method.
|
| - if (!start_time_.ToInternalValue())
|
| - start_time_ = base::Time::Now();
|
| - end_time_ = base::Time::Now();
|
| - // Records histograms for counts of commits and committed characters.
|
| - RecordHistogram("Commit", 1);
|
| - RecordHistogram("CommitCharacter", GetUtf8StringLength(text));
|
| + // Records histograms for committed characters.
|
| + if (!composition_text_->text().empty()) {
|
| + UMA_HISTOGRAM_COUNTS("InputMethod.CommitLength",
|
| + GetUtf8StringLength(text));
|
| + }
|
| return true;
|
| }
|
|
|
| @@ -326,6 +313,7 @@ bool InputMethodEngine::SendKeyEvents(
|
| if (details.dispatcher_destroyed)
|
| break;
|
| }
|
| +
|
| return true;
|
| }
|
|
|
| @@ -573,18 +561,11 @@ void InputMethodEngine::Enable(const std::string& component_id) {
|
| FocusIn(IMEEngineHandlerInterface::InputContext(
|
| current_input_type_, ui::TEXT_INPUT_MODE_DEFAULT));
|
| EnableInputView();
|
| -
|
| - start_time_ = base::Time();
|
| - end_time_ = base::Time();
|
| - RecordHistogram("Enable", 1);
|
| }
|
|
|
| void InputMethodEngine::Disable() {
|
| active_component_id_.clear();
|
| observer_->OnDeactivated(active_component_id_);
|
| -
|
| - if (start_time_.ToInternalValue())
|
| - RecordHistogram("WorkingTime", (end_time_ - start_time_).InSeconds());
|
| }
|
|
|
| void InputMethodEngine::PropertyActivate(const std::string& property_name) {
|
|
|