Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve contrast for pinned tabs outline #26213

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0d6b61d
Fixes possible crash when parsing NTT Sponsored Images component reso…
aseren Oct 24, 2024
f03c92c
Improve contrast for pinned tabs outline
aguscruiz Oct 24, 2024
c71fdd5
Minor improvements in rerun-compare-chromium-versions (#26161)
wknapik Oct 24, 2024
e55d4f3
fix(privacy): Shred private WKWebsiteDataStore data types (#26199)
StephenHeaps Oct 24, 2024
20e3864
Fix out of range element access (#26211)
darkdh Oct 24, 2024
be3fe14
Merge pull request #26202 from brave/issues/41865
aseren Oct 24, 2024
470081d
[ads] Fixes empty device id on Linux
aseren Oct 24, 2024
0208151
Fixed sidebar asan failure when closing browser window
simonhong Oct 24, 2024
144493f
1.73.47
brave-builds Oct 25, 2024
9402786
Merge pull request #26215 from brave/issues/41693
aseren Oct 25, 2024
1a7579e
Merge pull request #26194 from brave/fix_sidebar_asan_failure
simonhong Oct 25, 2024
2f6f846
[CodeHealth] Use `SafeBaseName` for `TorConfig` (#26170)
cdesouza-chromium Oct 25, 2024
8476a91
1.73.48
brave-builds Oct 25, 2024
7c79b15
[Android] Select the highest priority threat from SafetyNetClient.loo…
AlexeyBarabash Oct 25, 2024
b650615
Remove Greaselion dependency from Rewards service
zenparsing Oct 9, 2024
446a2ae
Resolve an issue with automatic flag for timezone
deeppandya Oct 24, 2024
f70f697
1.73.49
brave-builds Oct 25, 2024
7980b55
Update server selection option in settings
deeppandya Oct 25, 2024
7a40b66
Workaround for GitHub workflow limitation in rerun-compare-chromium-v…
wknapik Oct 25, 2024
e83e96e
[iOS] Fix crash when dismissing news opt-in on NTP (#26228)
StephenHeaps Oct 25, 2024
3373071
Merge pull request #26210 from brave/update_automatic_flag_behaviour_vpn
deeppandya Oct 25, 2024
6aaf5ff
Merge pull request #26238 from brave/update_server_selection_settings…
deeppandya Oct 25, 2024
dc4430d
Merge pull request #25949 from brave/ksmith-gl-dodo-2
zenparsing Oct 25, 2024
9ff1ef4
1.73.50
brave-builds Oct 25, 2024
426d035
feat(ntp): store last NTP search engine as a pref (#26137)
IanKrieger Oct 25, 2024
30881b6
[ads] Fixes earnings in rewards non-custodian state count towards ear…
tmancey Oct 25, 2024
9964975
Fix History and Bookmarks and ShieldsPanel and 3-Dot menu URL-Eliding…
Brandon-T Oct 25, 2024
9a7a73b
[iOS] - Replace NOTREACHED_IN_MIGRATION for iOS (#26224)
Brandon-T Oct 25, 2024
2a44507
[iOS] - Change LazyVStack to VStack to see if it helps. (#26047)
Brandon-T Oct 25, 2024
ba2ea46
[ads] Fixes System Notification ad is clicked and dismissed at the sa…
aseren Oct 25, 2024
6d24e98
Uses correct attribute name value (#26223)
jonathansampson Oct 26, 2024
25a2f70
Merge pull request #26251 from brave/issues/41101
aseren Oct 26, 2024
8ee53fd
Replaced NOTREACHED_IN_MIGRATION with NOTREACHED. (#26229)
boocmp Oct 26, 2024
5b399a1
Merge pull request #26235 from brave/issues/41425
tmancey Oct 26, 2024
b94c3d6
Roll perf profiles update (update-perf-profile-2024-10-27-16-16) (#26…
brave-builds Oct 27, 2024
2ec3e70
Improve contrast for pinned tabs outline
aguscruiz Oct 24, 2024
df73c13
Merge branch 'theme-contrast' of https://github.com/brave/brave-core …
aguscruiz Oct 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/rerun-compare-chromium-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ on:
branches:
- master
- '[0-9]+.[0-9]+.x'
paths:
- package.json
## TODO: If a PR touches >300 files, this filter may prevent the workflow from being executed
# paths:
# - package.json
types:
- closed

jobs:
rerun-compare-chromium-versions:
if: github.event.pull_request.merged == true
## TODO: Temporary workaround for the above issue
# if: github.event.pull_request.merged == true
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'cr1')
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
TARGET_SHA: ${{ github.event.pull_request.base.sha }}
steps:
- run: |
- name: If a major Chromium bump was merged, rerun compare-chromium-versions in all PRs targeting the same branch
run: |
shopt -s inherit_errexit
set -eEo pipefail

Expand All @@ -28,9 +32,10 @@ jobs:
pr_ver="$(chromium_ver "${PR_SHA:?}")"
target_ver="$(chromium_ver "${TARGET_SHA:?}")"

echo "::notice::PR branch: ${pr_ver:?}, target branch: ${target_ver:?}"
echo "::notice::PR branch: ${GITHUB_HEAD_REF:?} (${pr_ver:?}), target branch: ${GITHUB_BASE_REF:?} (${target_ver:?})"

if [[ "${pr_ver%%.*}" != "${target_ver%%.*}" ]]; then
echo "::notice::Rerunning compare-chromium-versions in PRs targeting ${GITHUB_BASE_REF:?}"
while read -r pr_number head_sha; do
run_id="$(gh api "/repos/$GITHUB_REPOSITORY/actions/workflows/compare-chromium-versions.yml/runs?head_sha=${head_sha:?}" -q '.workflow_runs[0].id')"
pr_url="https://github.com/brave/brave-core/pull/${pr_number:?}"
Expand All @@ -43,5 +48,5 @@ jobs:
sleep 1
done < <(gh -R "$GITHUB_REPOSITORY" pr list --limit 1000 --state open --base "$GITHUB_BASE_REF" --json number,headRefOid -q '.[]|"\(.number)\t\(.headRefOid)"')
else
echo "Chromium major versions match, nothing to do"
echo "::notice::Chromium major versions match, nothing to do"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ public void onBindViewHolder(PreferenceViewHolder holder) {
}

String serverLocationTitle = BraveVpnPrefUtils.getRegionCountry();
String optimalString = "%s - %s";
String serverLocationSummary =
BraveVpnPrefUtils.getRegionPrecision()
.equals(BraveVpnConstants.REGION_PRECISION_COUNTRY)
? mContext.getString(R.string.optimal_text)
: BraveVpnPrefUtils.getRegionNamePretty();
? String.format(
optimalString,
mContext.getString(R.string.optimal_text),
BraveVpnPrefUtils.getHostnameDisplay())
: BraveVpnPrefUtils.getHostnameDisplay();

TextView regionTitle = (TextView) holder.findViewById(R.id.region_title);
regionTitle.setText(serverLocationTitle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

import org.chromium.brave_vpn.mojom.BraveVpnConstants;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.billing.InAppPurchaseWrapper;
import org.chromium.chrome.browser.billing.PurchaseModel;
Expand Down Expand Up @@ -65,31 +66,37 @@ public static void handleOnGetTimezonesForRegions(Activity activity,
BraveVpnServerRegion braveVpnServerRegion =
BraveVpnUtils.getServerRegionForTimeZone(
jsonTimezones, TimeZone.getDefault().getID());
String region = braveVpnServerRegion.getRegionName();
if (TextUtils.isEmpty(region)) {
String regionFromTimeZone = braveVpnServerRegion.getRegionName();
if (TextUtils.isEmpty(regionFromTimeZone)) {
BraveVpnUtils.showToast(
String.format(
activity.getResources()
.getString(R.string.couldnt_get_matching_timezone),
TimeZone.getDefault().getID()));
return;
}
if (BraveVpnUtils.selectedServerRegion != null) {
if (!BraveVpnUtils.selectedServerRegion
.getRegionName()
.equals(BraveVpnPrefUtils.PREF_BRAVE_VPN_AUTOMATIC)) {
region = BraveVpnUtils.selectedServerRegion.getRegionName();
braveVpnServerRegion = BraveVpnUtils.selectedServerRegion;
}
String regionForHostName = regionFromTimeZone;
String regionPrecision = braveVpnServerRegion.getRegionPrecision();

// Determine the region for host name and precision
if (BraveVpnUtils.selectedServerRegion != null
&& !BraveVpnUtils.selectedServerRegion
.getRegionName()
.equals(BraveVpnPrefUtils.PREF_BRAVE_VPN_AUTOMATIC)) {

regionForHostName = BraveVpnUtils.selectedServerRegion.getRegionName();
braveVpnServerRegion = BraveVpnUtils.selectedServerRegion;
regionPrecision = braveVpnServerRegion.getRegionPrecision();
} else {
String serverRegion = BraveVpnPrefUtils.getRegionName();
region =
serverRegion.equals(BraveVpnPrefUtils.PREF_BRAVE_VPN_AUTOMATIC)
? region
: serverRegion;
if (serverRegion.equals(BraveVpnPrefUtils.PREF_BRAVE_VPN_AUTOMATIC)) {
regionPrecision = BraveVpnConstants.REGION_PRECISION_DEFAULT;
} else {
regionForHostName = serverRegion;
}
}
BraveVpnNativeWorker.getInstance()
.getHostnamesForRegion(region, braveVpnServerRegion.getRegionPrecision());
.getHostnamesForRegion(regionForHostName, regionPrecision);
braveVpnPrefModel.setServerRegion(braveVpnServerRegion);
} else {
BraveVpnUtils.showToast(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* Copyright (c) 2024 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 https://mozilla.org/MPL/2.0/. */

package org.chromium.chrome.browser;

import androidx.test.filters.SmallTest;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.util.Batch;
import org.chromium.components.safe_browsing.BraveSafeBrowsingUtils;
import org.chromium.components.safe_browsing.BraveSafeBrowsingUtils.SafetyNetJavaThreatType;

import java.util.ArrayList;
import java.util.Arrays;

@Batch(Batch.PER_CLASS)
@RunWith(BaseJUnit4ClassRunner.class)
public class BraveSafetyNetThreatsPrioritiesTest {

@Test
@SmallTest
public void testPriorities() throws Exception {
// Fail safe option for empty input, consider it is safe
Assert.assertEquals(
BraveSafeBrowsingUtils.getHighestPriorityThreat(new ArrayList<>()),
SafetyNetJavaThreatType.MAX_VALUE);

// Single input must return the same value
Assert.assertEquals(
BraveSafeBrowsingUtils.getHighestPriorityThreat(
Arrays.asList(new Integer[] {SafetyNetJavaThreatType.SOCIAL_ENGINEERING})),
SafetyNetJavaThreatType.SOCIAL_ENGINEERING);

// Several threats as input - return the most priority one
Assert.assertEquals(
BraveSafeBrowsingUtils.getHighestPriorityThreat(
Arrays.asList(
new Integer[] {
SafetyNetJavaThreatType.UNWANTED_SOFTWARE,
SafetyNetJavaThreatType.SUBRESOURCE_FILTER,
SafetyNetJavaThreatType.SOCIAL_ENGINEERING,
SafetyNetJavaThreatType.BILLING,
SafetyNetJavaThreatType.POTENTIALLY_HARMFUL_APPLICATION,
})),
SafetyNetJavaThreatType.SOCIAL_ENGINEERING);

Assert.assertEquals(
BraveSafeBrowsingUtils.getHighestPriorityThreat(
Arrays.asList(
new Integer[] {
SafetyNetJavaThreatType.SUBRESOURCE_FILTER,
SafetyNetJavaThreatType.CSD_ALLOWLIST,
SafetyNetJavaThreatType.POTENTIALLY_HARMFUL_APPLICATION,
SafetyNetJavaThreatType.UNWANTED_SOFTWARE,
})),
SafetyNetJavaThreatType.POTENTIALLY_HARMFUL_APPLICATION);
}
}
8 changes: 8 additions & 0 deletions browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,14 @@
FEATURE_VALUE_TYPE( \
brave_rewards::features::kAnimatedBackgroundFeature), \
}, \
{ \
"brave-rewards-platform-creator-detection", \
"Detect Brave Creators on media platform sites", \
"Enables detection of Brave Creator pages on media platform sites.", \
kOsDesktop | kOsAndroid, \
FEATURE_VALUE_TYPE( \
brave_rewards::features::kPlatformCreatorDetectionFeature), \
}, \
{ \
"brave-ads-should-launch-brave-ads-as-an-in-process-service", \
"Launch Brave Ads as an in-process service", \
Expand Down
26 changes: 23 additions & 3 deletions browser/brave_ads/device_id/device_id_impl_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,29 @@ using DiskMap = std::map<base::FilePath, base::FilePath>;
namespace {

constexpr char kDiskByUuidDirectoryName[] = "/dev/disk/by-uuid";
const char* const kDeviceNames[] = {"sda1", "hda1", "dm-0", "xvda1",
"sda2", "hda2", "dm-1", "xvda2"};
const char* const kNetDeviceNamePrefixes[] = {
constexpr const char* const kDeviceNames[] = {
"sda1", // First partition of the first SATA, SCSI, or IDE drive.
"hda1", // First partition of the first IDE/ATA drive.
"nvme0n1p1", // First partition of the first NVMe device.
"md0p1", // First partition of the first RAID array.
"mmcblk0p1", // First partition of the first MMC/SD card.
"dm-0", // First Device Mapper device.
"vda1", // First partition of the first virtual drive in KVM or QEMU
// virtualized environments.
"xvda1", // First partition of the first virtual drive in Xen virtualized
// environments.
"sda2", // Second partition of the first SATA, SCSI, or IDE drive.
"hda2", // Second partition of the first IDE/ATA drive.
"nvme0n1p2", // Second partition of the first NVMe device.
"md0p2", // Second partition of the first RAID array.
"mmcblk0p2", // Second partition of the first MMC/SD card.
"dm-1", // Second Device Mapper device.
"vda2", // Second partition of the first virtual drive in KVM or QEMU
// virtualized environments.
"xvda2", // Second partition of the first virtual drive in Xen virtualized
// environments.
};
constexpr const char* const kNetDeviceNamePrefixes[] = {
// Fedora 15 uses biosdevname feature where Embedded ethernet uses the "em"
// prefix and PCI cards use the p[0-9]c[0-9] format based on PCI slot and
// card information.
Expand Down
11 changes: 5 additions & 6 deletions browser/brave_rewards/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
# 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/. */

import("//brave/components/greaselion/browser/buildflags/buildflags.gni")
import("//extensions/buildflags/buildflags.gni")
import("//testing/test.gni")

source_set("brave_rewards") {
sources = [
"creator_detection_script_injector.h",
"rewards_service_factory.h",
"rewards_tab_helper.h",
]

deps = [
"//base",
"//brave/components/brave_rewards/browser",
"//brave/components/script_injector/common/mojom",
"//chrome/browser/profiles",
"//components/keyed_service/content",
"//components/sessions",
Expand All @@ -25,6 +26,7 @@ source_set("brave_rewards") {

source_set("brave_rewards_impl") {
sources = [
"creator_detection_script_injector.cc",
"rewards_prefs_util.cc",
"rewards_prefs_util.h",
"rewards_service_factory.cc",
Expand All @@ -40,7 +42,8 @@ source_set("brave_rewards_impl") {
"//brave/browser/ui:brave_rewards_source",
"//brave/components/brave_rewards/browser",
"//brave/components/brave_rewards/common",
"//brave/components/greaselion/browser/buildflags",
"//brave/components/brave_rewards/common:features",
"//brave/components/brave_rewards/resources/creator_detection:creator_detection_generated_grit",
"//chrome/browser/bitmap_fetcher",
"//chrome/browser/favicon",
"//chrome/browser/profiles",
Expand All @@ -65,10 +68,6 @@ source_set("brave_rewards_impl") {

deps += [ "//extensions/browser" ]
}

if (enable_greaselion) {
deps += [ "//brave/browser/greaselion" ]
}
}

source_set("util") {
Expand Down
Loading
Loading