Skip to content

Commit

Permalink
[TTS] Remove redundant condition check
Browse files Browse the repository at this point in the history
operator bool() and is_bound() are the same for InterfacePtr.

Bug: None
Change-Id: I29e311d6e1f80ba49d3ebc15a0b5ad619aff2621
Reviewed-on: https://chromium-review.googlesource.com/c/1471377
Reviewed-by: Donn Denman <donnd@chromium.org>
Commit-Queue: Donn Denman <donnd@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632040}
  • Loading branch information
Shimi Zhang authored and Commit Bot committed Feb 14, 2019
1 parent b02d1ca commit bfd7bcf
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ void OverlayJsRenderFrameObserver::EnableJsApi(bool should_enable) {
}

bool OverlayJsRenderFrameObserver::EnsureServiceConnected() {
if (render_frame() && (!contextual_search_js_api_service_ ||
!contextual_search_js_api_service_.is_bound())) {
if (render_frame() && !contextual_search_js_api_service_) {
render_frame()->GetRemoteInterfaces()->GetInterface(
&contextual_search_js_api_service_);
return true;
Expand Down

0 comments on commit bfd7bcf

Please sign in to comment.