Skip to content

Commit

Permalink
Uplift of #6996 (squashed) to release
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Oct 30, 2020
1 parent 1dfc77c commit 28ba3d5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions browser/farbling/farbling_tab_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ FarblingTabHelper::FarblingTabHelper(content::WebContents* web_contents)

void FarblingTabHelper::DidStartNavigation(
content::NavigationHandle* navigation_handle) {
// TODO(samartnik): it breaks desktop mode on Android.
// We need to figure out whether we need this functionality on Android.
#if !defined(OS_ANDROID)
UpdateUserAgent(navigation_handle);
#endif
}

void FarblingTabHelper::UpdateUserAgent(
Expand Down Expand Up @@ -148,18 +152,12 @@ void FarblingTabHelper::UpdateUserAgent(
.c_str());
ua = content::BuildUserAgentFromOSAndProduct(minimal_os_info,
GetMinimalProduct());
// It breaks desktop mode on Android
#if !defined(OS_ANDROID)
navigation_handle->SetIsOverridingUserAgent(true);
#endif
web_contents->SetUserAgentOverride(
blink::UserAgentOverride::UserAgentOnly(ua),
false /* override_in_new_tabs */);
} else {
// It breaks desktop mode on Android
#if !defined(OS_ANDROID)
navigation_handle->SetIsOverridingUserAgent(false);
#endif
}
}

Expand Down

0 comments on commit 28ba3d5

Please sign in to comment.