[cr149] FindBrowserWithWebContents renamed upstream.
Follow up to:
commit 72f140e852
Author: Claudio DeSouza <cdesouza@brave.com>
Date: Wed Oct 11 17:42:49 2023 +0100
`FindBrowserWithWebContents` renamed upstream
This is a simple function rename with no other effects.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/82d9bb0f98d7c88a1b2af2e267cf36125fba17c6
commit 82d9bb0f98d7c88a1b2af2e267cf36125fba17c6
Author: Avi Drissman <avi@chromium.org>
Date: Mon Oct 9 21:05:45 2023 +0000
Rename FindBrowserWithWebContents to FindBrowserWithTab
"WebContents" hasn't been synonymous with "tab" since the content
split. It's confusing to have a function that says it finds a browser
by "web contents" yet only looks at the tabs.
Rename the function so that its name accurately reflects its function.
Bug: none
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "brave/components/brave_wallet/common/buildflags/buildflags.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
#include "chrome/browser/ui/permission_bubble/permission_prompt.h"
|
||||
#include "components/permissions/request_type.h"
|
||||
|
||||
@@ -19,6 +20,7 @@
|
||||
std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt(
|
||||
content::WebContents* web_contents,
|
||||
permissions::PermissionPrompt::Delegate* delegate) {
|
||||
#if BUILDFLAG(ENABLE_BRAVE_WALLET)
|
||||
Browser* browser = chrome::FindBrowserWithTab(web_contents);
|
||||
if (!browser) {
|
||||
DLOG(WARNING) << "Permission prompt suppressed because the WebContents is "
|
||||
@@ -26,7 +28,6 @@ std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_BRAVE_WALLET)
|
||||
if (delegate->Requests()[0]->request_type() ==
|
||||
permissions::RequestType::kBraveEthereum ||
|
||||
delegate->Requests()[0]->request_type() ==
|
||||
|
||||
Reference in New Issue
Block a user