diff --git a/BUILD.gn b/BUILD.gn
index dd75ffe7728b..6281a3a9061d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -285,6 +285,7 @@ process_version("generate_version") {
template_file = "version.version"
extra_args = [ "-e", "BRAVE_BROWSER_VERSION=\"$brave_version\"" ]
output = "$root_out_dir/version"
+ process_only = true
}
if (!is_android && !is_ios) {
diff --git a/app/app_management_strings.grdp b/app/app_management_strings.grdp
index cabba467e411..a174561ebf78 100644
--- a/app/app_management_strings.grdp
+++ b/app/app_management_strings.grdp
@@ -49,8 +49,8 @@
Permissions
-
- More permissions
+
+ More settings and permissions
This app can:
@@ -76,4 +76,13 @@
Version: $14.0
+
+ Pinned by administrator
+
+
+ Contacts
+
+
+ Storage
+
diff --git a/app/brave_main_delegate.cc b/app/brave_main_delegate.cc
index 97564b7fabe3..79c2c5dd19fb 100644
--- a/app/brave_main_delegate.cc
+++ b/app/brave_main_delegate.cc
@@ -149,17 +149,16 @@ bool BraveMainDelegate::BasicStartupComplete(int* exit_code) {
#if BUILDFLAG(ENABLE_EXTENSIONS)
extensions_features::kNewExtensionUpdaterService.name,
#endif
-#if defined(OS_LINUX)
- // Enable webui dark on linux.
+ // Enable webui dark theme: @media (prefers-color-scheme: dark) is gated on
+ // this feature.
features::kWebUIDarkMode.name,
-#endif
omnibox::kSimplifyHttpsIndicator.name,
};
// Disabled features.
const std::unordered_set disabled_features = {
autofill::features::kAutofillServerCommunication.name,
- network::features::kNetworkService.name,
+ features::kLookalikeUrlNavigationSuggestionsUI.name,
unified_consent::kUnifiedConsent.name,
};
command_line.AppendFeatures(enabled_features, disabled_features);
diff --git a/app/brave_main_delegate_browsertest.cc b/app/brave_main_delegate_browsertest.cc
index 56b7da947ee9..a1338af02ab2 100644
--- a/app/brave_main_delegate_browsertest.cc
+++ b/app/brave_main_delegate_browsertest.cc
@@ -45,7 +45,6 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
&autofill::features::kAutofillServerCommunication,
&features::kAudioServiceOutOfProcess,
&features::kDefaultEnableOopRasterization,
- &network::features::kNetworkService,
&unified_consent::kUnifiedConsent,
&features::kLookalikeUrlNavigationSuggestionsUI,
};
diff --git a/app/brave_strings.grd b/app/brave_strings.grd
index a46827ed9f07..c530baf42d46 100644
--- a/app/brave_strings.grd
+++ b/app/brave_strings.grd
@@ -589,7 +589,10 @@ Brave is unable to recover your settings.
-
+
+ About &Brave
+
+
About &Brave OS
@@ -615,9 +618,6 @@ Brave is unable to recover your settings.
-
- Sign in to sync and personalize Brave across your devices
-
Sync and personalize Brave across your devices
@@ -737,6 +737,12 @@ Signing in anyway will merge Brave information like bookmarks, history, and othe
Brave OS could not sync your data due to an error signing in.
+
+ You clear cookies when you quit Brave. To keep syncing, change this $1settings.
+
+
+ settings
+
@@ -1149,40 +1155,6 @@ Please check your email at $2jane.doe@example.com
Welcome to Brave
-
- Take Brave everywhere
-
-
- Web browsing with Brave smarts
-
-
- Not now
-
-
- Sync and personalize Brave across your devices
-
-
-
-
-
-
- Welcome to Brave
-
-
- Get to Brave faster
-
-
- Make Brave your default browser
-
-
- Pin Brave to your taskbar
-
-
- Select <div class="logo-small"></div><strong>Brave</strong>
-
-
- Click <strong>Switch anyway</strong>, if it appears
-
@@ -1247,6 +1219,12 @@ Please check your email at $2jane.doe@example.com
Share a Brave tab
+
+
+
+ Help us improve Brave
+
+
diff --git a/app/generated_resources.grd b/app/generated_resources.grd
index eb4a588171f3..3874134c36bb 100644
--- a/app/generated_resources.grd
+++ b/app/generated_resources.grd
@@ -901,8 +901,8 @@ are declared in tools/grit/grit_rule.gni.
Save page &as...
-
- Distill page
+
+ Toggle distilled page contents
More too&ls
@@ -2902,7 +2902,7 @@ are declared in tools/grit/grit_rule.gni.
Sharing $1youtube.com to $2meet.google.com
- Share this tab
+ Share this tab instead
Stop
@@ -3196,7 +3196,6 @@ are declared in tools/grit/grit_rule.gni.
No-op Service
-
Installed theme "$1Snowflake Theme"
@@ -3512,6 +3511,9 @@ are declared in tools/grit/grit_rule.gni.
Read and change anything you type
+
+ Launch and exit managed guest sessions
+
Display UI on the login screen
@@ -3687,6 +3689,9 @@ are declared in tools/grit/grit_rule.gni.
Replace the page you see when opening a new tab
+
+ Run in the background when requested by a cooperating native application
+
@@ -4403,20 +4408,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
Updated just now
-
-
- This page will use a lot of data.
-
-
- Page paused.
-
-
- Continue
-
-
- Stop using data on this page
-
-
Lite mode now makes browsing faster on all pages, including HTTPS.
@@ -4830,9 +4821,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
Restore default shortcuts
-
- Customize this page
-
Brave backgrounds
@@ -4932,12 +4920,27 @@ Keep your key file in a safe place. You will need it to create new versions of y
Most visited sites
-
+
Shortcuts are suggested based on websites you visit often
-
+
Shortcuts are curated by you
+
+ Current theme you have installed
+
+
+ Uninstall
+
+
+ Select color
+
+
+ Default
+
+
+ Hex color value
+
@@ -5034,8 +5037,8 @@ Keep your key file in a safe place. You will need it to create new versions of y
Remember my choice
-
- Use app
+
+ Open
Stay in Brave
@@ -5264,7 +5267,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
- Nope
+ No thanks
@@ -6253,6 +6256,25 @@ Keep your key file in a safe place. You will need it to create new versions of y
+
+
+
+ Call from your devices
+
+
+ Call from $1Jimmy's Pixel
+
+
+
+
+
+ Call from Your Devices
+
+
+ Call from $1Jimmy's Pixel
+
+
+
@@ -6730,45 +6752,22 @@ Keep your key file in a safe place. You will need it to create new versions of y
-
- You've signed in and turned on Sync
-
-
+
Turn on sync?
-
+
Sync your bookmarks, passwords, history, and more on all your devices
-
+
Brave may use your history to personalize Search, ads, and other Brave services
-
+
You can always choose what to sync in settings.
-
-
-
- Brave Sync
-
-
- Your bookmarks, history, passwords, and other settings will be synced to your Brave Account so you can use them on all your devices
-
-
- Personalize Brave services
-
-
- Brave may use your browsing history to personalize Search, ads, and other Brave services
-
-
- Brave may use your browsing history to personalize Search and other Brave services
-
-
- Want to manage sync and personalization before they’re turned on? Visit <a id="settingsLink" href="chrome://settings">Settings</a></a>.
-
-
+
Yes, I'm in
-
+
Settings
@@ -7137,20 +7136,17 @@ Please help our engineers fix this problem. Tell us what happened right before y
Sign in to $1Brave
-
+
Sync is disabled by your administrator.
-
+
Sync has been stopped via the Brave Dashboard.
Confirm sync settings to start sync.
-
- Error signing in.
-
-
- Oops, Sync has stopped working.
+
+ Setup in progress...
Sync isn’t working. Try signing in again.
@@ -7201,20 +7197,12 @@ Please help our engineers fix this problem. Tell us what happened right before y
Advanced settings
-
-
- Setup in progress...
-
-
-
-
- Please wait...
-
-
-
-
- Sync everything
-
+
+
+
+ Please wait...
+
+
@@ -7229,16 +7217,18 @@ Please help our engineers fix this problem. Tell us what happened right before y
$1Sept 1, 2012. This doesn't include payment methods and addresses from Brave Pay.
-
-
- Not signed in to $1Brave
-
-
- (You're missing out—$1sign in)
-
-
- sign in
-
+
+
+
+ Not signed in to $1Brave
+
+
+ (You're missing out—$1sign in)
+
+
+ sign in
+
+
@@ -7258,7 +7248,6 @@ Please help our engineers fix this problem. Tell us what happened right before y
This page could not be translated
-
Options
@@ -7269,6 +7258,12 @@ Please help our engineers fix this problem. Tell us what happened right before y
Change languages
+
+ More languages...
+
+
+ Page is not in $1French ?
+
Translate
@@ -7317,6 +7312,12 @@ Please help our engineers fix this problem. Tell us what happened right before y
Language settings
+
+ Language to translate into
+
+
+ Page language to translate
+
@@ -7328,6 +7329,12 @@ Please help our engineers fix this problem. Tell us what happened right before y
Change Languages
+
+ More Languages...
+
+
+ Page Is Not In $1French ?
+
Translate
@@ -7376,10 +7383,19 @@ Please help our engineers fix this problem. Tell us what happened right before y
Language Settings
+
+ Language To Translate Into
+
+
+ Page Language To Translate
+
Unknown
+
+ Reset
+
@@ -7598,6 +7614,22 @@ Please help our engineers fix this problem. Tell us what happened right before y
Check Grammar With Spelling
+
+
+ Substitutions
+
+
+ Show Substitutions
+
+
+ Smart Quotes
+
+
+ Smart Dashes
+
+
+ Text Replacement
+
Always Show Bookmarks Bar
@@ -8466,38 +8498,6 @@ Please help our engineers fix this problem. Tell us what happened right before y
-
-
- Identity API Token Cache
-
-
- Access Token
-
-
- Extension Name
-
-
- Extension Id
-
-
- Token Status
-
-
- Not Found
-
-
- Token Present
-
-
- Expiration Time
-
-
- Scopes
-
-
- Revoke
-
-
A fast, simple, and secure web browser, built for the modern web.
@@ -8757,10 +8757,10 @@ Please help our engineers fix this problem. Tell us what happened right before y
Entered window overview mode
-
+
Entered full screen
-
+
Exited full screen
@@ -8789,6 +8789,12 @@ Please help our engineers fix this problem. Tell us what happened right before y
Refresh
+
+ Clear
+
+
+ No log entries
+
Show:
@@ -8972,16 +8978,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
-
+
No nearby devices found.
- $1www.google.com wants to scan for nearby Bluetooth devices, the following devices have been found:
+ $1www.google.com wants to scan for nearby Bluetooth devices. The following devices have been found:
-
+
Allow
-
+
Block
@@ -9065,6 +9071,17 @@ Please help our engineers fix this problem. Tell us what happened right before y
Ads blocked on this site
+
+
+ Details
+
+
+ Ad removed.
+
+
+ This ad uses too many resources for your device, so Brave removed it.
+
+
Windows Utilities
@@ -9088,22 +9105,6 @@ Please help our engineers fix this problem. Tell us what happened right before y
-
-
-
- The web browser by Brave, for you
-
-
- Sign in to Brave with your Brave Account to get your bookmarks, history, passwords, and other settings on all your devices.
-
-
- Sign in
-
-
- No thanks
-
-
-
@@ -9138,31 +9139,6 @@ Please help our engineers fix this problem. Tell us what happened right before y
-
-
-
- Open Windows Settings
-
-
- Click <strong>Microsoft Edge</strong> under Web Browser
-
-
- Switch anyway
-
-
- Right click the <div class="logo-small"></div> icon in the taskbar
-
-
- Select <strong>Pin to taskbar</strong>
-
-
- Pin to taskbar
-
-
- Continue
-
-
-
@@ -9243,6 +9219,101 @@ Please help our engineers fix this problem. Tell us what happened right before y
Upload
+
+
+
+ Save changes to $1README.md?
+
+
+ Save changes to files?
+
+
+ $1example.com will be able to save your changes directly to $2README.md. The site can save changes until you close this tab.
+
+
+ $1example.com will be able to save your changes directly to the files in $2My Project. The site can save changes until you close this tab.
+
+
+ Save changes
+
+
+
+
+ This page is allowed to save to files.
+
+
+ This page is allowed to view all the files in a folder on your device.
+
+
+ $1example.com can save your changes directly to $2README.md
+
+
+ $1example.com can save your changes directly to the following files
+
+
+ $1example.com can save your changes directly to the files in $2My Project
+
+
+ $1example.com can save your changes directly to the following folders
+
+
+ $1example.com can save your changes directly to the following files and folders
+
+
+ $1example.com can view all the files in $2My Project
+
+
+ $1example.com can view all the files in the following folders
+
+
+ $1example.com can view and save your changes directly to the following files and folders
+
+
+ Save changes
+
+
+ View changes
+
+
+ {0, plural, offset:2
+ =1 {{1}README.md}
+ =2 {{1}README.md, {2}Brave.png}
+ other {{1}README.md, {2}Brave.png, and # more}
+ }
+
+
+ Expand...
+
+
+ Collapse...
+
+
+ Remove access
+
+
+
+
+
+ Can't save to this folder
+
+
+ $1example.com can't save your changes to this folder because it contains system files.
+
+
+ Choose a different folder
+
+
+
+
+ Let site view files?
+
+
+ $1example.com will be able to view all files in $2My Project. The site can see any changes to the folder until you close this tab.
+
+
+ View files
+
+
@@ -9505,6 +9576,9 @@ Please help our engineers fix this problem. Tell us what happened right before y
Allow
+
+ Try again
+
@@ -9531,6 +9605,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
Exit Private
+
+
+
+
+ Take Survey
+
+
+ Your feedback is important to us.
+
+
-
+
diff --git a/app/media_router_strings.grdp b/app/media_router_strings.grdp
index d57bb063745a..c2062a6f63c2 100644
--- a/app/media_router_strings.grdp
+++ b/app/media_router_strings.grdp
@@ -3,43 +3,14 @@
-
- Media Router
-
Display on another screen
&Cast...
-
- Cast
-
-
-
-
- Back
-
-
- Close
-
-
- Search
-
-
- View cast mode list
-
-
- View device list
-
-
- Stop, $1Living Room TV, $2Casting YouTube
-
-
- Cast to
-
Cast $1google.com
@@ -54,15 +25,6 @@
-
- Select source
-
-
- Share your screen
-
-
- Stream a video or audio file
-
Cast $1my_media.mp3
@@ -93,39 +55,7 @@
Optimize fullscreen videos
-
-
- Enable casting to cloud-based services like Brave Hangouts.
-
-
-
- Welcome to the Cast experience in Brave!
-
-
- You can use this feature to display content from Brave on your TV or other devices.
-
-
-
-
- Welcome to the Cast experience in Brave!
-
-
- You can use this feature to display content from Brave on your TV or other devices.
-
-
-
- Ok, got it
-
-
-
-
- Dismiss
-
-
-
- Error
-
Unable to cast $1youtube.com.
@@ -135,9 +65,6 @@
Unable to cast tab.
-
- Only one session can be created at a time.
-
Unable to cast desktop.
@@ -148,59 +75,6 @@
Unable to cast $1my_media.mp3.
-
-
- Casting: $1Video
-
-
- Cast
-
-
- Stop
-
-
- Play
-
-
- Pause
-
-
- Mute
-
-
- Unmute
-
-
- Seek
-
-
- Volume
-
-
- Current time
-
-
- Duration
-
-
- Smooth Motion [beta]
-
-
- Use high bandwidth for best video or animation. Other people with slow connections may not see your content.
-
-
- Always use mirroring
-
-
- Show fullscreen videos on
-
-
- Both screens
-
-
- Remote screen
-
-
Looking for devices
@@ -230,14 +104,6 @@
Source not supported
-
-
- Search
-
-
- No matches
-
-
Audio/Video
diff --git a/app/onboarding_welcome_strings.grdp b/app/onboarding_welcome_strings.grdp
index a06b3485c2e5..3793c632f9e2 100644
--- a/app/onboarding_welcome_strings.grdp
+++ b/app/onboarding_welcome_strings.grdp
@@ -2,9 +2,6 @@
-
- Get started
-
Next
@@ -91,9 +88,6 @@
Get Brave Search and Brave smarts everytime you browse
-
- Skip
-
Set as default
diff --git a/app/profiles_strings.grdp b/app/profiles_strings.grdp
index ecc95783e001..c4e6e84db669 100644
--- a/app/profiles_strings.grdp
+++ b/app/profiles_strings.grdp
@@ -469,6 +469,9 @@
Add person
+
+ Name
+
The new user couldn't be created. Please check your hard drive space and permissions and try again.
diff --git a/app/settings_brave_strings.grdp b/app/settings_brave_strings.grdp
index f52ba6a1365d..2c00aace09cb 100644
--- a/app/settings_brave_strings.grdp
+++ b/app/settings_brave_strings.grdp
@@ -3,13 +3,13 @@
+
+ About Brave
+
+
+ Get help with Brave
+
-
- About Brave
-
-
- Get help with Brave
-
Updating Brave
@@ -24,14 +24,19 @@
-
+
About Brave OS
-
+
Get help with Brave OS
+
+
+ Clear cookies and site data when you quit Brave
+
+
Brave Pay (copied to Brave)
diff --git a/app/settings_strings.grdp b/app/settings_strings.grdp
index a833a66f7a1d..b6a5a2494e97 100644
--- a/app/settings_strings.grdp
+++ b/app/settings_strings.grdp
@@ -12,6 +12,9 @@
+
+ Continue
+
More actions
@@ -136,9 +139,6 @@
Download update using mobile data
-
- Continue
-
@@ -150,6 +150,12 @@
Report an issue
+
+ Internet connection required
+
+
+ See what's new
+
Checking for updates
@@ -163,6 +169,78 @@
+
+ Captions
+
+
+ Text size
+
+
+ Text font
+
+
+ Text color
+
+
+ Text opacity
+
+
+ Background opacity
+
+
+ 0
+
+
+ 100
+
+
+ Text shadow
+
+
+ None
+
+
+ Raised
+
+
+ Depressed
+
+
+ Uniform
+
+
+ Drop shadow
+
+
+ Background color
+
+
+ Black
+
+
+ White
+
+
+ Red
+
+
+ Green
+
+
+ Blue
+
+
+ Yellow
+
+
+ Cyan
+
+
+ Magenta
+
+
+ Default
+
Accessibility
@@ -191,6 +269,42 @@
Select and customize text-to-speech voices
+
+ Switch Access settings
+
+
+ Switch action assignment
+
+
+ Space
+
+
+ Enter
+
+
+ None
+
+
+ Select
+
+
+ Next
+
+
+ Previous
+
+
+ Auto-scan
+
+
+ Enable auto-scan
+
+
+ Scanning speed: $11.5s
+
+
+ $11.5s
+
Show large mouse cursor
@@ -464,36 +578,6 @@
-
-
- Kiosk Next Shell (Dev)
-
-
- Kiosk Next Shell
-
-
- Enables the Kiosk Next Shell for the next sign in.
-
-
- Disable the Kiosk Next Shell and return to the normal Brave OS experience.
-
-
- Turn off
-
-
- Turn off the Kiosk Next Shell
-
-
- Turn on the Kiosk Next Shell
-
-
- This will turn off the Kiosk Next Shell, sign you out and return you to the normal Brave OS experience.
-
-
- This will sign you out and turn on the Kiosk Next Shell.
-
Linux (Beta)
@@ -543,6 +627,12 @@
Replace your Linux apps and files with a previous backup
+
+ Confirm Restore
+
+
+ Restoring from a backup will delete existing Linux applications and data in your Linux files folder.
+
USB preferences
@@ -564,7 +654,7 @@
Plugin VM
- Manage settings for running Plugin VM on your $1Bravebook
+ Set up permissions
Give access to printers
@@ -596,7 +686,7 @@
Brave Play Store
- Install apps and games from Brave Play on your Bravebook. <a target="_blank" href="$1https://google.com/">Learn more</a>
+ Install apps and games from Brave Play on your $1Bravebook. <a target="_blank" href="$2https://google.com/">Learn more</a>
Manage Android preferences
@@ -608,6 +698,8 @@
Remove Android apps?
+
Apps you’ve downloaded from Brave Play will be deleted from this Bravebook.
<br><br>
@@ -629,6 +721,9 @@
Manage your apps
+
+ Open App Management
+
@@ -1027,6 +1122,9 @@
Connected
+
+ Connected, $1100% battery
+
Not connected
@@ -1362,6 +1460,12 @@
Add Printer
+
+
+ Saved detected printers to your profile, or add a new printer.
+
+
+ Available printers to save
Edit
@@ -1369,9 +1473,15 @@
Remove
+
+ Configure
+
Search printers
+
+ Your saved printers
+
Add a nearby printer
@@ -1513,6 +1623,14 @@
End User License Agreement
+
+ Couldn't detect a printer. Please enter printer address again.
+
+
+ Unable to set up printer. Please check configuration and try again.
+
+
+
@@ -1552,7 +1670,7 @@
Set up or manage network file shares.
- Add File Share
+ Add file share
File share URL
@@ -1566,6 +1684,9 @@
Password (optional)
+
+ Remember sign-in info
+
Share mounted successfully.
@@ -1591,7 +1712,7 @@
Invalid URL format. Server must be specified as a host name when SSO authentication is used.
- Authentication Method
+ Authentication method
Standard
@@ -1601,67 +1722,127 @@
-
+
-
- Kerberos Accounts
+
+ Kerberos tickets
-
- Kerberos Accounts
+
+ Kerberos tickets
-
- All Kerberos Accounts for single sign-on into certain apps and websites and file shares can be managed here.
+
+ Choose a ticket to use for authentication. <a target="_blank" href="$1https://google.com/">Learn more</a>
-
- Accounts
+
+ Tickets
-
- Add account
+
+ Add a ticket
-
- Remove account from this device
+
+ Refresh now
-
- Signed in
+
+ Set as active ticket
-
- Sign in again
+
+ Remove from this device
-
- Sign in
+
+ Ticket removed
-
- Add Kerberos Account
+
+ Valid for $17 hours 12 minutes
-
- Username
+
+ Expired
+
+
+ Refresh
+
+
+ Active
-
+
+ Add a Kerberos ticket
+
+
+ Refresh a Kerberos ticket
+
+
+ To automatically refresh a ticket, check “Remember password.” Your password will be stored on your device only.
+
+
+ Kerberos username
+
+
Password
-
+
+ Remember password
+
+
+ Refresh
+
+
+ Advanced
+
+
+ Configure Kerberos
+
+
+ Edit the configuration file
+
+
Network problem or bad realm
-
- Username invalid (should be user@realm.com)
+
+ Username invalid
-
+
Username not known to server
-
+
+ A ticket with this username already exists
+
+
Contacting server for realm failed
-
+
Password invalid
-
+
Password expired
-
+
KDC does not support encryption type
-
- Oops! Something went wrong (error code $1123).
+
+ Couldn't get Kerberos ticket. Try again, or contact your organization's device admin. (Error code $1123).
+
+
+ Section nested in group: $1[realms] (inside a block of curly braces '{ ... })
+
+
+ Section syntax error: $1[realms
+
+
+ Expected opening curly brace: $1ticket_lifetime = 1d (in the line after 'EXAMPLE.COM = )'
+
+
+ Extra curly brace: $1} (without having a corresponding opening curly brace '{')
+
+
+ Relation syntax error: $1ticket_lifetime : 1d
+
+
+ Configuration option not supported: $1ccache_type = 1
+
+
+ Section not supported: $1[appdefaults]
+
+
+ Failed to parse configuration
@@ -1828,6 +2009,9 @@
Allow other users of this device to use this network
+
+ Automatically connecting to a hidden network allows others to see your device and some network settings, and is not recommended.
+
Save identity and password
@@ -1897,6 +2081,15 @@
Allow mobile data roaming
+
+ On, not roaming
+
+
+ On, roaming
+
+
+ Roaming off
+
Mobile data network
@@ -1984,6 +2177,8 @@
Port
+
+
Change PIN
@@ -1999,7 +2194,7 @@
Change
-
+
Enter
@@ -2032,6 +2227,22 @@
Enter PIN Unlock Key
+
+ Incorrect PIN. Retries left: $13.
+
+
+ Incorrect PUK. Retries left: $13.
+
+
+ Invalid PIN. Retries left: $13.
+
+
+ Invalid PUK. Retries left: $13.
+
+
+ PIN values do not match.
+
+
Prefer this network
@@ -2499,16 +2710,9 @@
-
-
- Languages and input
-
-
-
-
- Languages
-
-
+
+ Languages
+
Language
@@ -2876,12 +3080,6 @@
Brave Assistant
-
- Related info
-
-
- Let the Assistant show you info related to what's on your screen
-
"Ok Brave"
@@ -2903,9 +3101,6 @@
Voice match
-
- Teach your Assistant to recognize your voice
-
Retrain
@@ -2987,8 +3182,8 @@
Do not allow sites to see text and images copied to the clipboard
-
- Cookies
+
+ Cookies and site data
Handlers
@@ -3377,9 +3572,6 @@
Prevent third-party websites from saving and reading cookie data
-
- Keep local data only until you quit your browser
-
Adobe Flash Player Storage settings
@@ -3581,9 +3773,6 @@
PINs do not match
-
- Continue
-
Show lock screen when waking from sleep
@@ -3639,11 +3828,14 @@
Note: Your fingerprint may be less secure than a strong password or PIN.
- delete [$1Fingerprint 1], button
+ delete [$1Fingerprint 1]
Finger $11
+
+ Enable Brave media playback at lock screen
+
Add account
@@ -3665,12 +3857,21 @@
Not updated yet
+
+ More actions, $1abcd@google.com
+
Update account
Sign in
+
+ Update account, $1abcd@google.com
+
+
+ Sign in, $1abcd@google.com
+
Remove this account
@@ -3680,15 +3881,30 @@
Primary account
+
+ $1abcd@google.com was removed from this device
+
Set up your fingerprint
-
+
+
Touch the power button with your finger
-
+
The fingerprint sensor is in the power button. Touch it lightly with any finger.
+
+
+ Touch the fingerprint sensor with your finger
+
+
+ The fingerprint sensor is the bottom right-hand key on your keyboard. Touch it lightly with any finger.
+
+
+ The fingerprint sensor is the top right-hand key on your keyboard. Touch it lightly with any finger.
+
+
Fingerprint added.
@@ -4610,8 +4826,14 @@
Use hardware acceleration when available
-
- Open proxy settings
+
+ Open your computer's proxy settings
+
+
+ $1Brave is using proxy settings from an extension
+
+
+ $1Brave is using proxy settings from your administrator
@@ -4624,7 +4846,7 @@
Android phone
- Connect your Bravebook with your phone. <a target="_blank" href="$1https://google.com/">Learn more</a>
+ Connect your $1Bravebook with your phone. <a target="_blank" href="$2https://google.com/">Learn more</a>
No eligible devices. <a target="_blank" href="$1https://google.com/">Learn more</a>
@@ -4645,7 +4867,7 @@
Disabled
- Unlock your Bravebook with your phone. <a target="_blank" href="$1https://google.com/">Learn more</a>
+ Unlock your $1Bravebook with your phone. <a target="_blank" href="$2https://google.com/">Learn more</a>
Instant Tethering
@@ -4657,16 +4879,16 @@
Messages
- Send and receive text messages from your Bravebook. <a target="_blank" href="$1https://google.com/">Learn more</a>
+ Send and receive text messages from your $1Bravebook. <a target="_blank" href="$2https://google.com/">Learn more</a>
Forget phone
- Disconnect your phone from your Bravebook
+ Disconnect your phone from your $1Bravebook
- Disconnect your phone from your Bravebook. They will no longer connect automatically.
+ Disconnect your phone from your $1Bravebook. They will no longer connect automatically.
@@ -4929,6 +5151,9 @@
PIN must be at least 4 characters
+
+ Too short
+
PIN must be at most 63 characters
@@ -4953,4 +5178,52 @@
The security key is locked because the wrong PIN was entered too many times. To unlock it, remove and reinsert it.
+
+ Show PINs
+
+
+ Hide PINs
+
+
+ Manage sign-in data
+
+
+ View and delete the sign-in data stored on your security key
+
+
+ Security key sign-in data
+
+
+ Website
+
+
+ Username
+
+
+ To view sign-in data, insert and touch your security key
+
+
+ To view sign-in data, enter the PIN for your security key. If you don’t know the PIN, you’ll need to reset the security key.
+
+
+ This security key does not have any sign-in data
+
+
+ This security key can't store any sign-in data
+
+
+ Your security key was removed.
+
+
+ Your security key is not protected with a PIN. To manage sign-in data, first create a PIN.
+
+
+ Your security key couldn't be read
+
+
+ Your sign-in data was deleted
+
+
+ Your sign-in data couldn't be deleted
+
diff --git a/app/vr_strings.grdp b/app/vr_strings.grdp
index fabd938fef6c..353e8953e0db 100644
--- a/app/vr_strings.grdp
+++ b/app/vr_strings.grdp
@@ -7,10 +7,6 @@
Press App button to exit
-
- XR Isolated Device Service
-
-
Site is tracking your location
@@ -150,18 +146,12 @@
New private tab
-
- New private tab
-
Settings
Close private tabs
-
- Close private tabs
-
Tabs
diff --git a/browser/autocomplete/brave_autocomplete_provider_client_browsertest.cc b/browser/autocomplete/brave_autocomplete_provider_client_browsertest.cc
index ce2b4398f487..47b8370d1efd 100644
--- a/browser/autocomplete/brave_autocomplete_provider_client_browsertest.cc
+++ b/browser/autocomplete/brave_autocomplete_provider_client_browsertest.cc
@@ -36,8 +36,8 @@ IN_PROC_BROWSER_TEST_F(BraveAutocompleteProviderClientTest,
incognito_client.GetAutocompleteClassifier());
EXPECT_EQ(normal_client.GetHistoryService(),
incognito_client.GetHistoryService());
- EXPECT_EQ(normal_client.GetContextualSuggestionsService(true),
- incognito_client.GetContextualSuggestionsService(true));
+ EXPECT_EQ(normal_client.GetRemoteSuggestionsService(true),
+ incognito_client.GetRemoteSuggestionsService(true));
EXPECT_EQ(normal_client.GetDocumentSuggestionsService(true),
incognito_client.GetDocumentSuggestionsService(true));
}
diff --git a/browser/autocomplete/brave_autocomplete_scheme_classifier.cc b/browser/autocomplete/brave_autocomplete_scheme_classifier.cc
index e5f2d3f84dd9..a488758c8d17 100644
--- a/browser/autocomplete/brave_autocomplete_scheme_classifier.cc
+++ b/browser/autocomplete/brave_autocomplete_scheme_classifier.cc
@@ -31,7 +31,7 @@ metrics::OmniboxInputType
BraveAutocompleteSchemeClassifier::GetInputTypeForScheme(
const std::string& scheme) const {
if (scheme.empty()) {
- return metrics::OmniboxInputType::INVALID;
+ return metrics::OmniboxInputType::EMPTY;
}
if (base::IsStringASCII(scheme) &&
base::LowerCaseEqualsASCII(scheme, kBraveUIScheme)) {
diff --git a/browser/brave_browser_main_extra_parts.cc b/browser/brave_browser_main_extra_parts.cc
index 62f443d90613..775dec8e09a3 100644
--- a/browser/brave_browser_main_extra_parts.cc
+++ b/browser/brave_browser_main_extra_parts.cc
@@ -18,6 +18,10 @@ BraveBrowserMainExtraParts::BraveBrowserMainExtraParts() {
BraveBrowserMainExtraParts::~BraveBrowserMainExtraParts() {
}
+void BraveBrowserMainExtraParts::PostBrowserStart() {
+ g_brave_browser_process->StartBraveServices();
+}
+
void BraveBrowserMainExtraParts::PreMainMessageLoopRun() {
#if !defined(OS_ANDROID)
brave::AutoImportMuon();
diff --git a/browser/brave_browser_main_extra_parts.h b/browser/brave_browser_main_extra_parts.h
index 00c8558068bb..de6f46b7b281 100644
--- a/browser/brave_browser_main_extra_parts.h
+++ b/browser/brave_browser_main_extra_parts.h
@@ -16,6 +16,7 @@ class BraveBrowserMainExtraParts : public ChromeBrowserMainExtraParts {
~BraveBrowserMainExtraParts() override;
// ChromeBrowserMainExtraParts overrides.
+ void PostBrowserStart() override;
void PreMainMessageLoopRun() override;
private:
diff --git a/browser/brave_browser_process_impl.cc b/browser/brave_browser_process_impl.cc
index a599abcd20e0..9607fa257a92 100644
--- a/browser/brave_browser_process_impl.cc
+++ b/browser/brave_browser_process_impl.cc
@@ -25,7 +25,6 @@
#include "brave/components/brave_shields/browser/referrer_whitelist_service.h"
#include "brave/components/brave_shields/browser/tracking_protection_service.h"
#include "brave/components/greaselion/browser/greaselion_download_service.h"
-#include "chrome/browser/io_thread.h"
#include "chrome/common/chrome_paths.h"
#include "components/component_updater/component_updater_service.h"
#include "components/component_updater/timer_update_scheduler.h"
@@ -89,8 +88,14 @@ BraveBrowserProcessImpl::brave_component_updater_delegate() {
return brave_component_updater_delegate_.get();
}
-void BraveBrowserProcessImpl::ResourceDispatcherHostCreated() {
- BrowserProcessImpl::ResourceDispatcherHostCreated();
+ProfileManager* BraveBrowserProcessImpl::profile_manager() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ if (!created_profile_manager_)
+ CreateProfileManager();
+ return profile_manager_.get();
+}
+
+void BraveBrowserProcessImpl::StartBraveServices() {
ad_block_service()->Start();
ad_block_custom_filters_service()->Start();
ad_block_regional_service_manager()->Start();
@@ -106,13 +111,6 @@ void BraveBrowserProcessImpl::ResourceDispatcherHostCreated() {
local_data_files_service()->Start();
}
-ProfileManager* BraveBrowserProcessImpl::profile_manager() {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- if (!created_profile_manager_)
- CreateProfileManager();
- return profile_manager_.get();
-}
-
brave_shields::AdBlockService* BraveBrowserProcessImpl::ad_block_service() {
if (ad_block_service_)
return ad_block_service_.get();
diff --git a/browser/brave_browser_process_impl.h b/browser/brave_browser_process_impl.h
index a1cf3286c961..378136ffe96e 100644
--- a/browser/brave_browser_process_impl.h
+++ b/browser/brave_browser_process_impl.h
@@ -57,10 +57,10 @@ class BraveBrowserProcessImpl : public BrowserProcessImpl {
~BraveBrowserProcessImpl() override;
// BrowserProcess implementation.
- void ResourceDispatcherHostCreated() override;
ProfileManager* profile_manager() override;
+ void StartBraveServices();
brave_shields::AdBlockService* ad_block_service();
brave_shields::AdBlockCustomFiltersService* ad_block_custom_filters_service();
brave_shields::AdBlockRegionalServiceManager*
diff --git a/browser/brave_content_browser_client.cc b/browser/brave_content_browser_client.cc
index f5c0d1dec28e..336b2e0759cf 100644
--- a/browser/brave_content_browser_client.cc
+++ b/browser/brave_content_browser_client.cc
@@ -33,7 +33,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/common/url_constants.h"
-#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/prefs/pref_service.h"
#include "components/services/heap_profiling/public/mojom/heap_profiling_client.mojom.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
@@ -137,60 +136,6 @@ void BraveContentBrowserClient::BrowserURLHandlerCreated(
ChromeContentBrowserClient::BrowserURLHandlerCreated(handler);
}
-bool BraveContentBrowserClient::AllowAccessCookie(
- const GURL& url,
- const GURL& first_party,
- content::ResourceContext* context,
- int render_process_id,
- int render_frame_id) {
- GURL tab_origin = first_party;
-
- if (tab_origin.is_empty())
- tab_origin = BraveShieldsWebContentsObserver::GetTabURLFromRenderFrameInfo(
- render_process_id, render_frame_id, -1).GetOrigin();
-
- ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
- return
- io_data->GetCookieSettings()->IsCookieAccessAllowed(url, tab_origin) &&
- g_brave_browser_process->tracking_protection_service()->ShouldStoreState(
- io_data->GetHostContentSettingsMap(),
- render_process_id,
- render_frame_id,
- url,
- tab_origin);
-}
-
-bool BraveContentBrowserClient::AllowGetCookie(
- const GURL& url,
- const GURL& first_party,
- const net::CookieList& cookie_list,
- content::ResourceContext* context,
- int render_process_id,
- int render_frame_id) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- bool allow = AllowAccessCookie(url, first_party, context, render_process_id,
- render_frame_id);
- OnCookiesRead(render_process_id, render_frame_id, url, first_party,
- cookie_list, !allow);
-
- return allow;
-}
-
-bool BraveContentBrowserClient::AllowSetCookie(
- const GURL& url,
- const GURL& first_party,
- const net::CanonicalCookie& cookie,
- content::ResourceContext* context,
- int render_process_id,
- int render_frame_id) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- bool allow = AllowAccessCookie(url, first_party, context, render_process_id,
- render_frame_id);
- OnCookieChange(render_process_id, render_frame_id, url, first_party, cookie,
- !allow);
- return allow;
-}
-
content::ContentBrowserClient::AllowWebBluetoothResult
BraveContentBrowserClient::AllowWebBluetooth(
content::BrowserContext* browser_context,
@@ -207,8 +152,7 @@ bool BraveContentBrowserClient::HandleExternalProtocol(
bool is_main_frame,
ui::PageTransition page_transition,
bool has_user_gesture,
- network::mojom::URLLoaderFactoryRequest* factory_request,
- network::mojom::URLLoaderFactory*& out_factory) { // NOLINT
+ network::mojom::URLLoaderFactoryPtr* out_factory) {
#if BUILDFLAG(ENABLE_BRAVE_WEBTORRENT)
if (webtorrent::HandleMagnetProtocol(url, web_contents_getter,
page_transition, has_user_gesture)) {
@@ -225,7 +169,7 @@ bool BraveContentBrowserClient::HandleExternalProtocol(
return ChromeContentBrowserClient::HandleExternalProtocol(
url, web_contents_getter, child_id, navigation_data, is_main_frame,
- page_transition, has_user_gesture, factory_request, out_factory);
+ page_transition, has_user_gesture, out_factory);
}
base::Optional
@@ -278,7 +222,7 @@ bool BraveContentBrowserClient::WillCreateURLLoaderFactory(
bool is_navigation,
bool is_download,
const url::Origin& request_initiator,
- network::mojom::URLLoaderFactoryRequest* factory_request,
+ mojo::PendingReceiver* factory_receiver,
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
bool* bypass_redirect_checks) {
bool use_proxy = false;
@@ -286,13 +230,13 @@ bool BraveContentBrowserClient::WillCreateURLLoaderFactory(
use_proxy = ChromeContentBrowserClient::WillCreateURLLoaderFactory(
browser_context,
frame, render_process_id, is_navigation, is_download, request_initiator,
- factory_request, header_client, bypass_redirect_checks);
+ factory_receiver, header_client, bypass_redirect_checks);
// TODO(iefremov): Skip proxying for certain requests?
use_proxy |= BraveProxyingURLLoaderFactory::MaybeProxyRequest(
browser_context,
frame, is_navigation ? -1 : render_process_id,
- factory_request);
+ factory_receiver);
return use_proxy;
}
@@ -356,8 +300,7 @@ bool BraveContentBrowserClient::HandleURLOverrideRewrite(GURL* url,
}
// no special win10 welcome page
- if (url->host() == chrome::kChromeUIWelcomeWin10Host ||
- url->host() == chrome::kChromeUIWelcomeHost) {
+ if (url->host() == chrome::kChromeUIWelcomeHost) {
*url = GURL(chrome::kChromeUIWelcomeURL);
return true;
}
diff --git a/browser/brave_content_browser_client.h b/browser/brave_content_browser_client.h
index 6fdc0fa8d5fe..4b4167b2ee40 100644
--- a/browser/brave_content_browser_client.h
+++ b/browser/brave_content_browser_client.h
@@ -29,18 +29,6 @@ class BraveContentBrowserClient : public ChromeContentBrowserClient {
std::unique_ptr CreateBrowserMainParts(
const content::MainFunctionParams& parameters) override;
void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) override;
- bool AllowGetCookie(const GURL& url,
- const GURL& first_party,
- const net::CookieList& cookie_list,
- content::ResourceContext* context,
- int render_process_id,
- int render_frame_id) override;
- bool AllowSetCookie(const GURL& url,
- const GURL& first_party,
- const net::CanonicalCookie& cookie,
- content::ResourceContext* context,
- int render_process_id,
- int render_frame_id) override;
bool HandleExternalProtocol(
const GURL& url,
@@ -50,8 +38,7 @@ class BraveContentBrowserClient : public ChromeContentBrowserClient {
bool is_main_frame,
ui::PageTransition page_transition,
bool has_user_gesture,
- network::mojom::URLLoaderFactoryRequest* factory_request,
- network::mojom::URLLoaderFactory*& out_factory) override; // NOLINT
+ network::mojom::URLLoaderFactoryPtr* out_factory) override;
content::ContentBrowserClient::AllowWebBluetoothResult AllowWebBluetooth(
content::BrowserContext* browser_context,
@@ -73,7 +60,7 @@ class BraveContentBrowserClient : public ChromeContentBrowserClient {
bool is_navigation,
bool is_download,
const url::Origin& request_initiator,
- network::mojom::URLLoaderFactoryRequest* factory_request,
+ mojo::PendingReceiver* factory_receiver,
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
bool* bypass_redirect_checks) override;
@@ -91,9 +78,6 @@ class BraveContentBrowserClient : public ChromeContentBrowserClient {
CreateThrottlesForNavigation(content::NavigationHandle* handle) override;
private:
- bool AllowAccessCookie(const GURL& url, const GURL& first_party,
- content::ResourceContext* context, int render_process_id,
- int render_frame_id);
void OnAllowGoogleAuthChanged();
std::unique_ptr
diff --git a/browser/brave_content_browser_client_browsertest.cc b/browser/brave_content_browser_client_browsertest.cc
index fbde5e1fda3b..f8b7f1968cdc 100644
--- a/browser/brave_content_browser_client_browsertest.cc
+++ b/browser/brave_content_browser_client_browsertest.cc
@@ -236,58 +236,6 @@ IN_PROC_BROWSER_TEST_F(BraveContentBrowserClientTest,
}
#endif
-IN_PROC_BROWSER_TEST_F(BraveContentBrowserClientTest,
- RewriteWelcomeWin10Host) {
- std::vector schemes {
- "brave://",
- "chrome://",
- };
-
- for (const std::string& scheme : schemes) {
- content::WebContents* contents =
- browser()->tab_strip_model()->GetActiveWebContents();
- ui_test_utils::NavigateToURL(
- browser(),
- GURL(scheme + chrome::kChromeUIWelcomeWin10Host));
- ASSERT_TRUE(WaitForLoadStop(contents));
-
- EXPECT_STREQ(base::UTF16ToUTF8(browser()->location_bar_model()
- ->GetFormattedFullURL()).c_str(),
- "brave://welcome");
- EXPECT_STREQ(contents->GetController().GetLastCommittedEntry()
- ->GetVirtualURL().spec().c_str(),
- "chrome://welcome/");
- EXPECT_STREQ(contents->GetController().GetLastCommittedEntry()
- ->GetURL().spec().c_str(),
- "chrome://welcome/");
- }
-}
-
-IN_PROC_BROWSER_TEST_F(BraveContentBrowserClientTest,
- RewriteChromeWelcomeWin10) {
- std::vector schemes {
- "brave://",
- "chrome://",
- };
-
- for (const std::string& scheme : schemes) {
- content::WebContents* contents =
- browser()->tab_strip_model()->GetActiveWebContents();
- ui_test_utils::NavigateToURL(browser(), GURL(scheme + "welcome-win10/"));
- ASSERT_TRUE(WaitForLoadStop(contents));
-
- EXPECT_STREQ(base::UTF16ToUTF8(browser()->location_bar_model()
- ->GetFormattedFullURL()).c_str(),
- "brave://welcome");
- EXPECT_STREQ(contents->GetController().GetLastCommittedEntry()
- ->GetVirtualURL().spec().c_str(),
- "chrome://welcome/");
- EXPECT_STREQ(contents->GetController().GetLastCommittedEntry()
- ->GetURL().spec().c_str(),
- "chrome://welcome/");
- }
-}
-
IN_PROC_BROWSER_TEST_F(BraveContentBrowserClientTest, RewriteMagnetURLURLBar) {
content::WebContents* contents =
browser()->tab_strip_model()->GetActiveWebContents();
@@ -327,8 +275,7 @@ IN_PROC_BROWSER_TEST_F(BraveContentBrowserClientTest, TypedMagnetURL) {
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
content::TestNavigationObserver observer(web_contents);
- LocationBar* location_bar = browser()->window()->GetLocationBar();
- ui_test_utils::SendToOmniboxAndSubmit(location_bar, magnet_url().spec());
+ ui_test_utils::SendToOmniboxAndSubmit(browser(), magnet_url().spec());
observer.Wait();
EXPECT_EQ(magnet_url(), web_contents->GetLastCommittedURL().spec());
}
diff --git a/browser/brave_content_browser_client_unittest.cc b/browser/brave_content_browser_client_unittest.cc
index 7fe11d5d87cc..476f86db6139 100644
--- a/browser/brave_content_browser_client_unittest.cc
+++ b/browser/brave_content_browser_client_unittest.cc
@@ -87,14 +87,3 @@ TEST_F(BraveContentBrowserClientTest, ResolvesSync) {
ASSERT_TRUE(BraveContentBrowserClient::HandleURLOverrideRewrite(
&url2, nullptr));
}
-
-TEST_F(BraveContentBrowserClientTest, ResolvesWelcomePage) {
- GURL url("chrome://welcome-win10/");
- ASSERT_TRUE(BraveContentBrowserClient::HandleURLOverrideRewrite(
- &url, nullptr));
- ASSERT_STREQ(url.spec().c_str(), "chrome://welcome/");
-
- GURL url2("chrome://welcome/");
- ASSERT_TRUE(BraveContentBrowserClient::HandleURLOverrideRewrite(
- &url2, nullptr));
-}
diff --git a/browser/brave_profile_prefs.cc b/browser/brave_profile_prefs.cc
index 311f0e69d6a2..ad25ff333f5a 100644
--- a/browser/brave_profile_prefs.cc
+++ b/browser/brave_profile_prefs.cc
@@ -15,7 +15,7 @@
#include "components/content_settings/core/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/safe_browsing/common/safe_browsing_prefs.h"
-#include "components/signin/core/browser/signin_pref_names.h"
+#include "components/signin/public/base/signin_pref_names.h"
#include "components/sync/base/pref_names.h"
#include "extensions/buildflags/buildflags.h"
#include "extensions/common/feature_switch.h"
diff --git a/browser/brave_scheme_load_browsertest.cc b/browser/brave_scheme_load_browsertest.cc
index afd7b00b12a0..89f28e9b9df1 100644
--- a/browser/brave_scheme_load_browsertest.cc
+++ b/browser/brave_scheme_load_browsertest.cc
@@ -223,6 +223,7 @@ IN_PROC_BROWSER_TEST_F(BraveSchemeLoadBrowserTest, CrashURLTest) {
content::WindowedNotificationObserver observer(
content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
content::NotificationService::AllSources());
+ content::ScopedAllowRendererCrashes allow_renderer_crashes(active_contents());
browser()->OpenURL(
content::OpenURLParams(GURL("brave://crash/"), content::Referrer(),
WindowOpenDisposition::CURRENT_TAB,
diff --git a/browser/extensions/api/brave_extensions_api_client.cc b/browser/extensions/api/brave_extensions_api_client.cc
index 564b2f8bd25a..697332fe136d 100644
--- a/browser/extensions/api/brave_extensions_api_client.cc
+++ b/browser/extensions/api/brave_extensions_api_client.cc
@@ -10,11 +10,13 @@
namespace extensions {
bool BraveExtensionsAPIClient::ShouldHideBrowserNetworkRequest(
+ content::BrowserContext* context,
const WebRequestInfo& request) const {
if (IsBraveProtectedUrl(request.url)) {
return true;
}
- return ChromeExtensionsAPIClient::ShouldHideBrowserNetworkRequest(request);
+ return ChromeExtensionsAPIClient::ShouldHideBrowserNetworkRequest(context,
+ request);
}
} // namespace extensions
diff --git a/browser/extensions/api/brave_extensions_api_client.h b/browser/extensions/api/brave_extensions_api_client.h
index 486e784a4138..7de70f56d830 100644
--- a/browser/extensions/api/brave_extensions_api_client.h
+++ b/browser/extensions/api/brave_extensions_api_client.h
@@ -13,6 +13,7 @@ namespace extensions {
class BraveExtensionsAPIClient : public ChromeExtensionsAPIClient {
bool ShouldHideBrowserNetworkRequest(
+ content::BrowserContext* context,
const WebRequestInfo& request) const override;
};
diff --git a/browser/extensions/api/brave_wallet_api_browsertest.cc b/browser/extensions/api/brave_wallet_api_browsertest.cc
index a84179b3d9bb..e468658757fd 100644
--- a/browser/extensions/api/brave_wallet_api_browsertest.cc
+++ b/browser/extensions/api/brave_wallet_api_browsertest.cc
@@ -11,6 +11,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test_utils.h"
+#include "extensions/common/extension.h"
#include "extensions/common/extension_builder.h"
#include "extensions/test/extension_test_message_listener.h"
#include "net/dns/mock_host_resolver.h"
diff --git a/browser/extensions/brave_base_local_data_files_browsertest.cc b/browser/extensions/brave_base_local_data_files_browsertest.cc
index fb7955106620..ca830a948029 100644
--- a/browser/extensions/brave_base_local_data_files_browsertest.cc
+++ b/browser/extensions/brave_base_local_data_files_browsertest.cc
@@ -14,7 +14,6 @@
#include "brave/components/brave_component_updater/browser/local_data_files_observer.h"
#include "brave/components/brave_component_updater/browser/local_data_files_service.h"
#include "chrome/browser/extensions/extension_browsertest.h"
-#include "chrome/browser/net/url_request_mock_util.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_test_utils.h"
@@ -63,9 +62,6 @@ void BaseLocalDataFilesBrowserTest::MaybeSetUpEmbeddedTestServerOnMainThread() {
if (!embedded_test_server_directory())
return;
- base::PostTaskWithTraits(
- FROM_HERE, {content::BrowserThread::IO},
- base::BindOnce(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
host_resolver()->AddRule("*", "127.0.0.1");
}
diff --git a/browser/extensions/brave_component_loader.cc b/browser/extensions/brave_component_loader.cc
index aea65dff1647..475c5722f187 100644
--- a/browser/extensions/brave_component_loader.cc
+++ b/browser/extensions/brave_component_loader.cc
@@ -30,13 +30,10 @@ namespace extensions {
BraveComponentLoader::BraveComponentLoader(
ExtensionServiceInterface* extension_service,
- PrefService* profile_prefs,
- PrefService* local_state,
Profile* profile)
- : ComponentLoader(extension_service, profile_prefs, local_state, profile),
+ : ComponentLoader(extension_service, profile),
profile_(profile),
- profile_prefs_(profile_prefs) {
-}
+ profile_prefs_(profile->GetPrefs()) {}
BraveComponentLoader::~BraveComponentLoader() {
}
diff --git a/browser/extensions/brave_component_loader.h b/browser/extensions/brave_component_loader.h
index e877ad9a1b9c..cbf29ac8017c 100644
--- a/browser/extensions/brave_component_loader.h
+++ b/browser/extensions/brave_component_loader.h
@@ -19,9 +19,7 @@ namespace extensions {
class BraveComponentLoader : public ComponentLoader {
public:
BraveComponentLoader(ExtensionServiceInterface* extension_service,
- PrefService* prefs,
- PrefService* local_state,
- Profile* browser_context);
+ Profile* browser_context);
~BraveComponentLoader() override;
// Adds the default component extensions. If |skip_session_components|
diff --git a/browser/extensions/brave_extension_provider_browsertest.cc b/browser/extensions/brave_extension_provider_browsertest.cc
index 41f3996932f6..96ef5802f8c2 100644
--- a/browser/extensions/brave_extension_provider_browsertest.cc
+++ b/browser/extensions/brave_extension_provider_browsertest.cc
@@ -13,7 +13,6 @@
#include "brave/components/brave_shields/browser/https_everywhere_service.h"
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_browsertest.h"
-#include "chrome/browser/net/url_request_mock_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test_utils.h"
diff --git a/browser/importer/brave_profile_writer.cc b/browser/importer/brave_profile_writer.cc
index dfed484fb1b3..d097fb049e23 100644
--- a/browser/importer/brave_profile_writer.cc
+++ b/browser/importer/brave_profile_writer.cc
@@ -25,6 +25,7 @@
#include "brave/browser/search_engines/search_engine_provider_util.h"
#include "base/files/file_util.h"
+#include "base/optional.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "base/task/post_task.h"
@@ -404,11 +405,10 @@ void OpenImportedBrowserTabs(Browser* browser,
entry.set_is_restored(true);
e.push_back(entry);
- chrome::AddRestoredTab(
- browser, e, browser->tab_strip_model()->count(), 0,
- "", false, pinned, true,
- base::TimeTicks::UnixEpoch(), nullptr,
- "", true /* from_session_restore */);
+ chrome::AddRestoredTab(browser, e, browser->tab_strip_model()->count(), 0,
+ "", base::nullopt, false, pinned, true,
+ base::TimeTicks::UnixEpoch(), nullptr, "",
+ true /* from_session_restore */);
}
}
diff --git a/browser/net/BUILD.gn b/browser/net/BUILD.gn
index a6ccd255e8a7..e9f795c68058 100644
--- a/browser/net/BUILD.gn
+++ b/browser/net/BUILD.gn
@@ -12,10 +12,6 @@ source_set("net") {
"brave_common_static_redirect_network_delegate_helper.h",
"brave_httpse_network_delegate_helper.cc",
"brave_httpse_network_delegate_helper.h",
- "brave_network_delegate_base.cc",
- "brave_network_delegate_base.h",
- "brave_profile_network_delegate.cc",
- "brave_profile_network_delegate.h",
"brave_proxying_url_loader_factory.cc",
"brave_proxying_url_loader_factory.h",
"brave_request_handler.cc",
@@ -26,8 +22,6 @@ source_set("net") {
"brave_static_redirect_network_delegate_helper.h",
"brave_stp_util.cc",
"brave_stp_util.h",
- "brave_system_network_delegate.cc",
- "brave_system_network_delegate.h",
"brave_system_request_handler.cc",
"brave_system_request_handler.h",
"url_context.cc",
diff --git a/browser/net/brave_network_delegate_base.cc b/browser/net/brave_network_delegate_base.cc
deleted file mode 100644
index 4b03c7ea5226..000000000000
--- a/browser/net/brave_network_delegate_base.cc
+++ /dev/null
@@ -1,345 +0,0 @@
-/* Copyright (c) 2019 The Brave Authors. All rights reserved.
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "brave/browser/net/brave_network_delegate_base.h"
-
-#include
-#include
-
-#include "base/task/post_task.h"
-#include "brave/browser/brave_browser_process_impl.h"
-#include "brave/browser/net/brave_stp_util.h"
-#include "brave/common/pref_names.h"
-#include "brave/components/brave_shields/browser/brave_shields_util.h"
-#include "brave/components/brave_shields/browser/brave_shields_web_contents_observer.h"
-#include "brave/components/brave_shields/browser/tracking_protection_service.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/content_settings/tab_specific_content_settings.h"
-#include "chrome/browser/profiles/profile_io_data.h"
-#include "components/content_settings/core/browser/cookie_settings.h"
-#include "components/prefs/pref_change_registrar.h"
-#include "components/prefs/pref_service.h"
-#include "content/public/browser/browser_task_traits.h"
-#include "content/public/browser/browser_thread.h"
-#include "net/url_request/url_request.h"
-
-using content::BrowserThread;
-using content::ResourceRequestInfo;
-using net::HttpResponseHeaders;
-using net::URLRequest;
-
-namespace {
-
-bool OnAllowAccessCookies(
- const URLRequest& request,
- std::shared_ptr ctx) {
- ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(&request);
- if (info) {
- ProfileIOData* io_data =
- ProfileIOData::FromResourceContext(info->GetContext());
-
- GURL url = request.url();
- GURL tab_origin = request.site_for_cookies();
- if (tab_origin.is_empty())
- tab_origin = GURL(request.network_isolation_key().ToString());
- if (tab_origin.is_empty() && request.top_frame_origin().has_value())
- tab_origin = request.top_frame_origin()->GetURL();
-
- return
- io_data->GetCookieSettings()->IsCookieAccessAllowed(url, tab_origin) &&
- g_brave_browser_process->tracking_protection_service()
- ->ShouldStoreState(io_data->GetHostContentSettingsMap(),
- ctx->render_process_id,
- ctx->render_frame_id,
- url,
- tab_origin);
- }
-
- return true;
-}
-
-} // namespace
-
-
-BraveNetworkDelegateBase::BraveNetworkDelegateBase(
- extensions::EventRouterForwarder* event_router)
- : ChromeNetworkDelegate(event_router),
- referral_headers_list_(nullptr),
- allow_google_auth_(true) {
- // Initialize the preference change registrar.
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::UI},
- base::Bind(&BraveNetworkDelegateBase::InitPrefChangeRegistrarOnUI,
- base::Unretained(this)));
-}
-
-BraveNetworkDelegateBase::~BraveNetworkDelegateBase() {}
-
-void BraveNetworkDelegateBase::set_allow_google_auth(bool allow) {
- allow_google_auth_ = allow;
-}
-
-void BraveNetworkDelegateBase::InitPrefChangeRegistrarOnUI() {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
-#if BUILDFLAG(ENABLE_BRAVE_REFERRALS)
- PrefService* prefs = g_browser_process->local_state();
- pref_change_registrar_.reset(new PrefChangeRegistrar());
- pref_change_registrar_->Init(prefs);
- pref_change_registrar_->Add(
- kReferralHeaders,
- base::Bind(&BraveNetworkDelegateBase::OnReferralHeadersChanged,
- base::Unretained(this)));
- // Retrieve current referral headers, if any.
- OnReferralHeadersChanged();
-#endif
-}
-
-void BraveNetworkDelegateBase::OnReferralHeadersChanged() {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (const base::ListValue* referral_headers =
- g_browser_process->local_state()->GetList(kReferralHeaders)) {
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::Bind(&BraveNetworkDelegateBase::SetReferralHeaders,
- base::Unretained(this), referral_headers->DeepCopy()));
- }
-}
-
-void BraveNetworkDelegateBase::SetReferralHeaders(
- base::ListValue* referral_headers) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- referral_headers_list_.reset(referral_headers);
-}
-
-int BraveNetworkDelegateBase::OnBeforeURLRequest(
- URLRequest* request,
- net::CompletionOnceCallback callback,
- GURL* new_url) {
- if (before_url_request_callbacks_.empty() || !request) {
- return ChromeNetworkDelegate::OnBeforeURLRequest(
- request, std::move(callback), new_url);
- }
- std::shared_ptr ctx(new brave::BraveRequestInfo());
- brave::BraveRequestInfo::FillCTXFromRequest(request, ctx);
- ctx->new_url = new_url;
- ctx->event_type = brave::kOnBeforeRequest;
- callbacks_[request->identifier()] = std::move(callback);
- RunNextCallback(request, ctx);
- return net::ERR_IO_PENDING;
-}
-
-int BraveNetworkDelegateBase::OnBeforeStartTransaction(
- URLRequest* request,
- net::CompletionOnceCallback callback,
- net::HttpRequestHeaders* headers) {
- if (before_start_transaction_callbacks_.empty() || !request) {
- return ChromeNetworkDelegate::OnBeforeStartTransaction(
- request, std::move(callback), headers);
- }
- std::shared_ptr ctx(new brave::BraveRequestInfo());
- brave::BraveRequestInfo::FillCTXFromRequest(request, ctx);
- ctx->event_type = brave::kOnBeforeStartTransaction;
- ctx->headers = headers;
- ctx->referral_headers_list = referral_headers_list_.get();
- callbacks_[request->identifier()] = std::move(callback);
- RunNextCallback(request, ctx);
- return net::ERR_IO_PENDING;
-}
-
-int BraveNetworkDelegateBase::OnHeadersReceived(
- URLRequest* request,
- net::CompletionOnceCallback callback,
- const net::HttpResponseHeaders* original_response_headers,
- scoped_refptr* override_response_headers,
- GURL* allowed_unsafe_redirect_url) {
- if (request->top_frame_origin().has_value()) {
- brave::RemoveTrackableSecurityHeadersForThirdParty(
- request->url(), request->top_frame_origin().value(),
- original_response_headers, override_response_headers);
- }
-
- if (headers_received_callbacks_.empty() || !request) {
- return ChromeNetworkDelegate::OnHeadersReceived(
- request, std::move(callback), original_response_headers,
- override_response_headers, allowed_unsafe_redirect_url);
- }
-
- std::shared_ptr ctx(new brave::BraveRequestInfo());
- callbacks_[request->identifier()] = std::move(callback);
- brave::BraveRequestInfo::FillCTXFromRequest(request, ctx);
- ctx->event_type = brave::kOnHeadersReceived;
- ctx->original_response_headers = original_response_headers;
- ctx->override_response_headers = override_response_headers;
- ctx->allowed_unsafe_redirect_url = allowed_unsafe_redirect_url;
-
- // Return ERR_IO_PENDING and run callbacks later by posting a task.
- // URLRequestHttpJob::awaiting_callback_ will be set to true after we
- // return net::ERR_IO_PENDING here, callbacks need to be run later than this
- // to set awaiting_callback_ back to false.
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::Bind(&BraveNetworkDelegateBase::RunNextCallback,
- base::Unretained(this), request, ctx));
- return net::ERR_IO_PENDING;
-}
-
-bool BraveNetworkDelegateBase::OnCanGetCookies(
- const URLRequest& request,
- const net::CookieList& cookie_list,
- bool allowed_from_caller) {
- std::shared_ptr ctx(new brave::BraveRequestInfo());
- ctx->allow_google_auth = allow_google_auth_;
- brave::BraveRequestInfo::FillCTXFromRequest(&request, ctx);
- ctx->event_type = brave::kOnCanGetCookies;
-
- return OnAllowAccessCookies(request, ctx);
-}
-
-bool BraveNetworkDelegateBase::OnCanSetCookie(
- const URLRequest& request,
- const net::CanonicalCookie& cookie,
- net::CookieOptions* options,
- bool allowed_from_caller) {
- std::shared_ptr ctx(new brave::BraveRequestInfo());
- ctx->allow_google_auth = allow_google_auth_;
- brave::BraveRequestInfo::FillCTXFromRequest(&request, ctx);
- ctx->event_type = brave::kOnCanSetCookies;
-
- return OnAllowAccessCookies(request, ctx);
-}
-
-void BraveNetworkDelegateBase::RunCallbackForRequestIdentifier(
- uint64_t request_identifier,
- int rv) {
- std::map::iterator it =
- callbacks_.find(request_identifier);
- std::move(it->second).Run(rv);
-}
-
-void BraveNetworkDelegateBase::RunNextCallback(
- URLRequest* request,
- std::shared_ptr ctx) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
-
- if (!ContainsKey(callbacks_, ctx->request_identifier)) {
- return;
- }
-
- if (request->status().status() == net::URLRequestStatus::CANCELED) {
- return;
- }
-
- // Continue processing callbacks until we hit one that returns PENDING
- int rv = net::OK;
-
- if (ctx->event_type == brave::kOnBeforeRequest) {
- while (before_url_request_callbacks_.size() !=
- ctx->next_url_request_index) {
- brave::OnBeforeURLRequestCallback callback =
- before_url_request_callbacks_[ctx->next_url_request_index++];
- brave::ResponseCallback next_callback =
- base::Bind(&BraveNetworkDelegateBase::RunNextCallback,
- base::Unretained(this), request, ctx);
- rv = callback.Run(next_callback, ctx);
- if (rv == net::ERR_IO_PENDING) {
- return;
- }
- if (rv != net::OK) {
- break;
- }
- }
- } else if (ctx->event_type == brave::kOnBeforeStartTransaction) {
- while (before_start_transaction_callbacks_.size() !=
- ctx->next_url_request_index) {
- brave::OnBeforeStartTransactionCallback callback =
- before_start_transaction_callbacks_[ctx->next_url_request_index++];
- brave::ResponseCallback next_callback =
- base::Bind(&BraveNetworkDelegateBase::RunNextCallback,
- base::Unretained(this), request, ctx);
- rv = callback.Run(ctx->headers, next_callback, ctx);
- if (rv == net::ERR_IO_PENDING) {
- return;
- }
- if (rv != net::OK) {
- break;
- }
- }
- } else if (ctx->event_type == brave::kOnHeadersReceived) {
- while (headers_received_callbacks_.size() != ctx->next_url_request_index) {
- brave::OnHeadersReceivedCallback callback =
- headers_received_callbacks_[ctx->next_url_request_index++];
- brave::ResponseCallback next_callback =
- base::Bind(&BraveNetworkDelegateBase::RunNextCallback,
- base::Unretained(this), request, ctx);
- rv = callback.Run(ctx->original_response_headers,
- ctx->override_response_headers,
- ctx->allowed_unsafe_redirect_url, next_callback, ctx);
- if (rv == net::ERR_IO_PENDING) {
- return;
- }
- if (rv != net::OK) {
- break;
- }
- }
- }
-
- if (rv != net::OK) {
- RunCallbackForRequestIdentifier(ctx->request_identifier, rv);
- return;
- }
-
- net::CompletionOnceCallback wrapped_callback =
- base::BindOnce(&BraveNetworkDelegateBase::RunCallbackForRequestIdentifier,
- base::Unretained(this), ctx->request_identifier);
-
- if (ctx->event_type == brave::kOnBeforeRequest) {
- if (!ctx->new_url_spec.empty() &&
- (ctx->new_url_spec != ctx->request_url.spec()) &&
- IsRequestIdentifierValid(ctx->request_identifier)) {
- *ctx->new_url = GURL(ctx->new_url_spec);
- }
- if (ctx->blocked_by == brave::kAdBlocked) {
- // We are going to intercept this request and block it later in the
- // network stack.
- if (ctx->cancel_request_explicitly) {
- RunCallbackForRequestIdentifier(ctx->request_identifier,
- net::ERR_ABORTED);
- return;
- }
- request->SetExtraRequestHeaderByName("X-Brave-Block", "", true);
- }
- if (!ctx->new_referrer.is_empty()) {
- request->SetReferrer(ctx->new_referrer.spec());
- }
- rv = ChromeNetworkDelegate::OnBeforeURLRequest(
- request, std::move(wrapped_callback), ctx->new_url);
- } else if (ctx->event_type == brave::kOnBeforeStartTransaction) {
- rv = ChromeNetworkDelegate::OnBeforeStartTransaction(
- request, std::move(wrapped_callback), ctx->headers);
- } else if (ctx->event_type == brave::kOnHeadersReceived) {
- rv = ChromeNetworkDelegate::OnHeadersReceived(
- request, std::move(wrapped_callback), ctx->original_response_headers,
- ctx->override_response_headers, ctx->allowed_unsafe_redirect_url);
- }
-
- // ChromeNetworkDelegate returns net::ERR_IO_PENDING if an extension is
- // intercepting the request and OK if the request should proceed normally.
- if (rv != net::ERR_IO_PENDING) {
- RunCallbackForRequestIdentifier(ctx->request_identifier, rv);
- }
-}
-
-void BraveNetworkDelegateBase::OnURLRequestDestroyed(URLRequest* request) {
- if (ContainsKey(callbacks_, request->identifier())) {
- callbacks_.erase(request->identifier());
- }
- ChromeNetworkDelegate::OnURLRequestDestroyed(request);
-}
-
-bool BraveNetworkDelegateBase::IsRequestIdentifierValid(
- uint64_t request_identifier) {
- return ContainsKey(callbacks_, request_identifier);
-}
diff --git a/browser/net/brave_network_delegate_base.h b/browser/net/brave_network_delegate_base.h
deleted file mode 100644
index 0a3a9db1f384..000000000000
--- a/browser/net/brave_network_delegate_base.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Copyright (c) 2019 The Brave Authors. All rights reserved.
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef BRAVE_BROWSER_NET_BRAVE_NETWORK_DELEGATE_BASE_H_
-#define BRAVE_BROWSER_NET_BRAVE_NETWORK_DELEGATE_BASE_H_
-
-#include