Commit 23629d6f authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

CrOS shell_integration::GetDefaultBrowser IS_DEFAULT rather than UNKNOWN

In Chrome OS, GetDefaultBrowser() runs in
ChromeAppDelegate::NewWindowContentsDelegate::OpenURLFromTab() where it
will either navigate internally when it detects that the current running
chrome is the system default, else it calls
platform_util::OpenExternal().

The current implementation of CrOS OpenExternal() does an internal
navigation, however as part of b/168506505, we are changing this to use
guest_os::Launch() to launch VM apps.

Since chrome is always the default browser in Chrome OS, we can change
GetDefaultBrowser() to return IS_DEFAULT, which ensures OpenExternal()
is no longer called for internal navigations and it can be used solely
to launch VM apps.

Bug: b/168506505
Bug: 1132535
Change-Id: If9ba4d065c9b01b1c9afd180b833a04f50c5cebc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454769
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814463}
parent 4e844124
......@@ -23,7 +23,11 @@ base::string16 GetApplicationNameForProtocol(const GURL& url) {
}
DefaultWebClientState GetDefaultBrowser() {
return UNKNOWN_DEFAULT;
// Chrome is always the default system browser in Chrome OS. This is called
// from ChromeAppDelegate::NewWindowContentsDelegate::OpenURLFromTab() where
// we should navigate internally since we are the default browser rather than
// call platform_util::OpenExternal().
return IS_DEFAULT;
}
bool IsFirefoxDefaultBrowser() {
......
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