Commit 86c0c539 authored by Shu Chen's avatar Shu Chen Committed by Commit Bot

Mutes the crash in ImeMenuTray when the ash is not in browser process.

Bug: 867084
Change-Id: I1a667b8c54d8f111dbe00a2b398fb99f1527aa0b
Reviewed-on: https://chromium-review.googlesource.com/1157741Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Shu Chen <shuchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580036}
parent 3973b69c
......@@ -33,6 +33,7 @@
#include "ui/base/ime/text_input_client.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/range/range.h"
......@@ -77,7 +78,11 @@ bool IsInLoginOrLockScreen() {
// Returns true if the current input context type is password.
bool IsInPasswordInputContext() {
return ui::IMEBridge::Get()->GetCurrentInputContext().type ==
// Avoid getting IMEBridge instance if ash is not in browser.
// This is to temporarily mute the crash (http://crbug.com/867084).
// TODO(shuchen): This will be eventually be solved by the Mojo-based IMF.
return features::IsAshInBrowserProcess() &&
ui::IMEBridge::Get()->GetCurrentInputContext().type ==
ui::TEXT_INPUT_TYPE_PASSWORD;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment