Commit 033a2fe4 authored by rajendrant's avatar rajendrant Committed by Commit Bot

Show Previews UI at commit for Client LoFi with network-serivce

Client LoFi infobar will be shown when lofi response is received, and android
omnibox UI will be shown at navigation commit. This CL changes the behavior to
show the infobar UI as well at navigation commit, when NetworkService is
enabled, since the response headers of subresources would not be
received in the browser process.

Bug: 893728
Change-Id: I66122590e80974449528635892b1c720efe04450
Reviewed-on: https://chromium-review.googlesource.com/c/1327556
Commit-Queue: rajendrant <rajendrant@chromium.org>
Reviewed-by: default avatarScott Little <sclittle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607102}
parent 70eb2e93
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "net/http/http_response_headers.h" #include "net/http/http_response_headers.h"
#include "services/network/public/cpp/features.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -84,10 +85,12 @@ bool ShouldShowUIForPreviewsType(previews::PreviewsType type) { ...@@ -84,10 +85,12 @@ bool ShouldShowUIForPreviewsType(previews::PreviewsType type) {
if (type == previews::PreviewsType::NONE) if (type == previews::PreviewsType::NONE)
return false; return false;
// Show the UI for LoFi at commit if the UI is the Android Omnibox. // Show the UI for LoFi at commit if the UI is the Android Omnibox or when
if (type == previews::PreviewsType::LOFI) // network-service is enabled.
return previews::params::IsPreviewsOmniboxUiEnabled(); if (type == previews::PreviewsType::LOFI) {
return previews::params::IsPreviewsOmniboxUiEnabled() ||
base::FeatureList::IsEnabled(network::features::kNetworkService);
}
return true; return true;
} }
......
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