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

[pull] main from chromium:main #122

Merged
merged 45 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
93c2bf4
Updating trunk VERSION from 4770.0 to 4771.0
Dec 16, 2021
7ce9864
fingerprint: Add support for FingerprintMessage in fingerprint.mojom
duda-patryk Dec 16, 2021
1222fa2
[CodeHealth] Migrate DeprecatedMessageCallback() in people_handler*
Dec 16, 2021
656abc9
input_method: Remove unused functions
Dec 16, 2021
9b6d493
cros: Remove unused strings on Account Manager page
Dec 16, 2021
55a6678
Automated Commit: LKGM 14399.0.0 for chromeos.
Dec 16, 2021
b2725a2
Move frontchannel logout API to FedCM
pkotwicz Dec 16, 2021
6213c83
Automatic update for log_list.json
Dec 16, 2021
4478dfc
[Sheriff] Revert "[dPWA AppIdentity] Support multiple icons updating."
rogerm Dec 16, 2021
f676785
Replace the old ToV8 with new ToV8Traits interface in the files syste…
Dec 16, 2021
925de8b
[Fast Pair] Log Fast Pair pairing result and failure type.
julietlevesque Dec 16, 2021
56c50c1
fingerprint: Switch OnAuthScanDone argument to FingerprintMessage
duda-patryk Dec 16, 2021
ad47e21
Privacy Sandbox: Split existing service based on functionality
sauski-alternative Dec 16, 2021
123b68b
Shimless: Add retry provisioning to RMA service
Dec 16, 2021
21999e3
Roll DevTools Frontend from 12bcadba3580 to d3307fe8ab11 (11 revisions)
Dec 16, 2021
d8e8fe1
quick_unlock/fingerprint_storage: Add UMA histogram to track auth errors
duda-patryk Dec 16, 2021
adee961
Use enums in CanvasContextCreationAttributesCore
ccameron-chromium Dec 16, 2021
7706199
🛃 Fix Custom Tabs default handler check.
Dec 16, 2021
0fb5b19
[PA] Improve pointer adjustment code in unit tests
bartekn-chromium Dec 16, 2021
6a25c41
[base/task] Don't call base::FeatureList in PostTask().
Dec 16, 2021
9a0c20c
Introduce AshDisplayUtil helper class and improve AuraDesktopCapturer…
Dec 16, 2021
ede1712
Fix typo introduced in previous CL
bergeret Dec 16, 2021
eee9ed3
Implement window state restore history stack.
Dec 16, 2021
31a2145
Roll androidx from I4RRLMv8z... to 6d8ij5pzY...
Dec 16, 2021
670a4a4
blink/css: Introduce ids and selectors for transition pseudo elements.
khushalsagar Dec 16, 2021
bc91aeb
[UPM] Add subscription methods to PasswordStoreAndroidBackend interface
Dec 16, 2021
260f085
[Messages] Add presubmit warning for adding new Android InfoBars
Dec 16, 2021
7fc6a28
dlp: Extract base functionality from DlpContentManagerAsh
Dec 16, 2021
7da54aa
[CodeHealth] Migrate base::DictionaryValue in people_handler*
Dec 16, 2021
02846b3
EV metadata generation tool: Pull cert constants out of
Dec 16, 2021
b554b67
[Android][Passwords] Use optional to request all logins if needed
FHorschig Dec 16, 2021
9da385e
[fuchsia] Increases WebEngine size limit to provide leeway over holiday.
Dec 16, 2021
2f88bef
ash: Fix search box and folders for productivity launcher
Dec 16, 2021
2e36073
Migrated to Custom Times Histogram for Web Performance Metrics
Dec 16, 2021
42266e2
[Fast Pair] Log AccountKey failures and the result of account key write.
julietlevesque Dec 16, 2021
3a1b64d
[Media Router] Removed unhelpful constants from unit test.
google-jrw Dec 16, 2021
50eab2e
MojoLPM fuzzer for MediaStreamDispatcherHost
bookholt Dec 16, 2021
9929b5a
Roll Chrome Win32 PGO Profile
Dec 16, 2021
82f0063
Store PolicyContainerPolicies on all FrameNavigationEntries
natechapin Dec 16, 2021
c157415
Move CompositorLatency out of Others
Dec 16, 2021
e5bbb0c
[iOS] Update Passwords in Other Apps modal
Dec 16, 2021
4a7e453
Fix namespaces for sampling_event_source and derived classes
plmonette-zz Dec 16, 2021
6df468d
Roll WebRTC from 8d87c463d9de to 9754a43403e0 (2 revisions)
Dec 16, 2021
9df15b0
[LR] Add finch param for the reaction cap.
Dec 16, 2021
f0753f9
overflow-clip-margin: Ignore margin if overflow:scroll/hidden.
vmpstr Dec 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling devtools-frontend
# and whatever else without interference from each other.
'devtools_frontend_revision': '12bcadba35805a2209e10bed6dbd8ee19b2558a8',
'devtools_frontend_revision': 'd3307fe8ab11976e262d29f679b6ec894dbc662c',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling libprotobuf-mutator
# and whatever else without interference from each other.
Expand Down Expand Up @@ -805,7 +805,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/androidx',
'version': 'I4RRLMv8zGb2YSObwLllOCmDGxCPRT9KyzAV-BFZo_0C',
'version': '6d8ij5pzYh29WWjPbdbAWFBJSA1nUgkWf2p6wCVZKIsC',
},
],
'condition': 'checkout_android',
Expand Down Expand Up @@ -1648,7 +1648,7 @@ deps = {
Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'c843f8d63c8c17acfbb7d48e09059a581ba779b9',

'src/third_party/webrtc':
Var('webrtc_git') + '/src.git' + '@' + '8d87c463d9de459c1fa74289e9ad0496bc296e96',
Var('webrtc_git') + '/src.git' + '@' + '9754a43403e0b955546aff0e7d07d6f70def4043',

'src/third_party/libgifcodec':
Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'),
Expand Down
17 changes: 17 additions & 0 deletions PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -3467,6 +3467,22 @@ def _CheckAndroidXmlStyle(input_api, output_api, is_check_on_upload):
else:
return checkxmlstyle.CheckStyleOnCommit(input_api, output_api)

def _CheckAndroidInfoBarDeprecation(input_api, output_api):
"""Checks Android Infobar Deprecation """

import sys
original_sys_path = sys.path
try:
sys.path = sys.path + [input_api.os_path.join(
input_api.PresubmitLocalPath(), 'tools', 'android',
'infobar_deprecation')]
import infobar_deprecation
finally:
# Restore sys.path to what it was before.
sys.path = original_sys_path

return infobar_deprecation.CheckDeprecationOnUpload(input_api, output_api)


class PydepsChecker(object):
def __init__(self, input_api, pydeps_files):
Expand Down Expand Up @@ -4166,6 +4182,7 @@ def ChecksAndroidSpecificOnUpload(input_api, output_api):
results.extend(_CheckAndroidXmlStyle(input_api, output_api, True))
results.extend(_CheckNewImagesWarning(input_api, output_api))
results.extend(_CheckAndroidNoBannedImports(input_api, output_api))
results.extend(_CheckAndroidInfoBarDeprecation(input_api, output_api))
return results

def ChecksAndroidSpecificOnCommit(input_api, output_api):
Expand Down
11 changes: 8 additions & 3 deletions ash/accelerators/accelerator_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
#include "base/test/metrics/histogram_tester.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/test/scoped_feature_list.h"
#include "chromeos/ui/base/window_state_type.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/prefs/pref_service.h"
#include "media/base/media_switches.h"
Expand Down Expand Up @@ -606,9 +607,13 @@ TEST_F(AcceleratorControllerTest, WindowSnap) {

controller_->PerformActionIfEnabled(TOGGLE_MAXIMIZED, {});
EXPECT_FALSE(window_state->IsMaximized());
// Window gets restored to its restore bounds since side-maximized state
// is treated as a "maximized" state.
EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString());

// Window gets restored to its right snapped window bounds and its window
// state should also restore to the right snapped window state.
gfx::Rect expected_bounds = GetDefaultSnappedWindowBoundsInParent(
window.get(), SnapViewType::kSecondary);
EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString());
EXPECT_EQ(window_state->GetStateType(), WindowStateType::kSecondarySnapped);

controller_->PerformActionIfEnabled(TOGGLE_MAXIMIZED, {});
controller_->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_LEFT, {});
Expand Down
2 changes: 1 addition & 1 deletion ash/ambient/ambient_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void AmbientController::SuspendDone(base::TimeDelta sleep_duration) {
}

void AmbientController::OnAuthScanDone(
device::mojom::ScanResult scan_result,
const device::mojom::FingerprintMessagePtr msg,
const base::flat_map<std::string, std::vector<std::string>>& matches) {
DismissUI();
}
Expand Down
2 changes: 1 addition & 1 deletion ash/ambient/ambient_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ASH_EXPORT AmbientController

// fingerprint::mojom::FingerprintObserver:
void OnAuthScanDone(
device::mojom::ScanResult scan_result,
const device::mojom::FingerprintMessagePtr msg,
const base::flat_map<std::string, std::vector<std::string>>& matches)
override;
void OnSessionFailed() override {}
Expand Down
7 changes: 6 additions & 1 deletion ash/app_list/views/app_list_bubble_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,11 @@ void AppListBubbleView::ShowPage(AppListBubblePage page) {
case AppListBubblePage::kApps:
case AppListBubblePage::kSearch:
search_box_view_->SetSearchBoxActive(true, /*event_type=*/ui::ET_UNKNOWN);
// Explicitly request focus in case the search box was active before.
search_box_view_->search_box()->RequestFocus();
break;
case AppListBubblePage::kAssistant:
// Explicitly set search box inactive so the next attempt to active it
// Explicitly set search box inactive so the next attempt to activate it
// will succeed.
search_box_view_->SetSearchBoxActive(false,
/*event_type=*/ui::ET_UNKNOWN);
Expand Down Expand Up @@ -556,6 +558,9 @@ void AppListBubbleView::OnHideAnimationEnded(const gfx::Rect& layer_bounds) {
// Restore the layer bounds. This isn't visible because opacity is 0.
layer()->SetBounds(layer_bounds);

// Hide any open folder by showing the apps page.
ShowApps(/*folder_item_view=*/nullptr, /*select_folder=*/false);

if (on_hide_animation_ended_)
std::move(on_hide_animation_ended_).Run();
}
Expand Down
40 changes: 40 additions & 0 deletions ash/app_list/views/app_list_bubble_view_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class AppListBubbleViewTest : public AshTestBase {
// Shows the app list on the primary display.
void ShowAppList() { GetAppListTestHelper()->ShowAppList(); }

void DismissAppList() { GetAppListTestHelper()->Dismiss(); }

void AddContinueSuggestionResult(int num_suggestions) {
GetAppListTestHelper()->AddContinueSuggestionResults(num_suggestions);
}
Expand Down Expand Up @@ -430,6 +432,26 @@ TEST_F(AppListBubbleViewTest, OpeningBubbleFocusesSearchBox) {
EXPECT_TRUE(search_box_view->is_search_box_active());
}

TEST_F(AppListBubbleViewTest, OpeningBubbleTwiceFocusesSearchBox) {
AddAppItems(1);
ShowAppList();

// Click on an item, which takes focus out of the search field.
AppListItemView* item =
GetAppListTestHelper()->GetScrollableAppsGridView()->GetItemViewAt(0);
LeftClickOn(item);
SearchBoxView* search_box_view = GetSearchBoxView();
ASSERT_FALSE(search_box_view->search_box()->HasFocus());

// The app list view and widget are cached after this close.
DismissAppList();

// Search box is focused on next show.
ShowAppList();
EXPECT_TRUE(search_box_view->search_box()->HasFocus());
EXPECT_TRUE(search_box_view->is_search_box_active());
}

TEST_F(AppListBubbleViewTest, SearchBoxTextUsesPrimaryTextColor) {
ShowAppList();

Expand Down Expand Up @@ -843,6 +865,24 @@ TEST_F(AppListBubbleViewTest, ClickOnFolderOpensFolder) {
EXPECT_TRUE(GetAppListTestHelper()->GetBubbleFolderView()->GetVisible());
}

TEST_F(AppListBubbleViewTest, FolderClosedOnAppListDismiss) {
AddFolderWithApps(3);
ShowAppList();

AppListItemView* folder_item = GetAppsGridView()->GetItemViewAt(0);
LeftClickOn(folder_item);
ASSERT_TRUE(GetAppListTestHelper()->IsInFolderView());
ASSERT_TRUE(GetAppListTestHelper()->GetBubbleFolderView()->GetVisible());

// The bubble view and widget are cached after dismiss.
DismissAppList();

// The folder is closed when the app list is reopened.
ShowAppList();
EXPECT_FALSE(GetAppListTestHelper()->IsInFolderView());
EXPECT_FALSE(GetAppListTestHelper()->GetBubbleFolderView()->GetVisible());
}

TEST_F(AppListBubbleViewTest, LargeFolderViewFitsInsideMainBubble) {
// Create more apps than fit in the default sized folder.
AddFolderWithApps(30);
Expand Down
92 changes: 92 additions & 0 deletions ash/quick_pair/common/fast_pair/fast_pair_metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,32 @@ const char kRetroactivePairingResultMetric[] =
"Bluetooth.ChromeOS.FastPair.RetroactivePairing.Result";
const char kTotalGattConnectionTimeMetric[] =
"Bluetooth.ChromeOS.FastPair.TotalGattConnectionTime";
const char kFastPairPairFailureInitialMetric[] =
"Bluetooth.ChromeOS.FastPair.PairFailure.InitialPairingProtocol";
const char kFastPairPairFailureSubsequentMetric[] =
"Bluetooth.ChromeOS.FastPair.PairFailure.SubsequentPairingProtocol";
const char kFastPairPairFailureRetroactiveMetric[] =
"Bluetooth.ChromeOS.FastPair.PairFailure.RetroactivePairingProtocol";
const char kFastPairPairResultInitialMetric[] =
"Bluetooth.ChromeOS.FastPair.Pairing.Result.InitialPairingProtocol";
const char kFastPairPairResultSubsequentMetric[] =
"Bluetooth.ChromeOS.FastPair.Pairing.Result.SubsequentPairingProtocol";
const char kFastPairPairResultRetroactiveMetric[] =
"Bluetooth.ChromeOS.FastPair.Pairing.Result.RetroactivePairingProtocol";
const char kFastPairAccountKeyWriteResultInitialMetric[] =
"Bluetooth.ChromeOS.FastPair.AccountKeyWrite.Result.InitialPairingProtocol";
const char kFastPairAccountKeyWriteResultSubsequentMetric[] =
"Bluetooth.ChromeOS.FastPair.AccountKeyWrite.Result."
"SubsequentPairingProtocol";
const char kFastPairAccountKeyWriteResultRetroactiveMetric[] =
"Bluetooth.ChromeOS.FastPair.AccountKeyWrite.Result."
"RetroactivePairingProtocol";
const char kFastPairAccountKeyWriteFailureInitialMetric[] =
"Bluetooth.ChromeOS.FastPair.AccountKeyFailure.InitialPairingProtocol";
const char kFastPairAccountKeyWriteFailureSubsequentMetric[] =
"Bluetooth.ChromeOS.FastPair.AccountKeyFailure.SubsequentPairingProtocol";
const char kFastPairAccountKeyWriteFailureRetroactiveMetric[] =
"Bluetooth.ChromeOS.FastPair.AccountKeyFailure.RetroactivePairingProtocol";

} // namespace

Expand Down Expand Up @@ -91,5 +117,71 @@ void RecordTotalGattConnectionTime(base::TimeDelta total_gatt_connection_time) {
total_gatt_connection_time);
}

void RecordPairingResult(const Device& device, bool success) {
switch (device.protocol) {
case Protocol::kFastPairInitial:
base::UmaHistogramBoolean(kFastPairPairResultInitialMetric, success);
break;
case Protocol::kFastPairRetroactive:
base::UmaHistogramBoolean(kFastPairPairResultRetroactiveMetric, success);
break;
case Protocol::kFastPairSubsequent:
base::UmaHistogramBoolean(kFastPairPairResultSubsequentMetric, success);
break;
}
}

void RecordPairingFailureReason(const Device& device, PairFailure failure) {
switch (device.protocol) {
case Protocol::kFastPairInitial:
base::UmaHistogramSparse(kFastPairPairFailureInitialMetric,
static_cast<int>(failure));
break;
case Protocol::kFastPairRetroactive:
base::UmaHistogramSparse(kFastPairPairFailureRetroactiveMetric,
static_cast<int>(failure));
break;
case Protocol::kFastPairSubsequent:
base::UmaHistogramSparse(kFastPairPairFailureSubsequentMetric,
static_cast<int>(failure));
break;
}
}

void RecordAccountKeyFailureReason(const Device& device,
AccountKeyFailure failure) {
switch (device.protocol) {
case Protocol::kFastPairInitial:
base::UmaHistogramSparse(kFastPairAccountKeyWriteFailureInitialMetric,
static_cast<int>(failure));
break;
case Protocol::kFastPairRetroactive:
base::UmaHistogramSparse(kFastPairAccountKeyWriteFailureRetroactiveMetric,
static_cast<int>(failure));
break;
case Protocol::kFastPairSubsequent:
base::UmaHistogramSparse(kFastPairAccountKeyWriteFailureSubsequentMetric,
static_cast<int>(failure));
break;
}
}

void RecordAccountKeyResult(const Device& device, bool success) {
switch (device.protocol) {
case Protocol::kFastPairInitial:
base::UmaHistogramBoolean(kFastPairAccountKeyWriteResultInitialMetric,
success);
break;
case Protocol::kFastPairRetroactive:
base::UmaHistogramBoolean(kFastPairAccountKeyWriteResultRetroactiveMetric,
success);
break;
case Protocol::kFastPairSubsequent:
base::UmaHistogramBoolean(kFastPairAccountKeyWriteResultSubsequentMetric,
success);
break;
}
}

} // namespace quick_pair
} // namespace ash
16 changes: 16 additions & 0 deletions ash/quick_pair/common/fast_pair/fast_pair_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
#ifndef ASH_QUICK_PAIR_COMMON_FAST_PAIR_FAST_PAIR_METRICS_H_
#define ASH_QUICK_PAIR_COMMON_FAST_PAIR_FAST_PAIR_METRICS_H_

#include "ash/quick_pair/common/account_key_failure.h"
#include "ash/quick_pair/common/pair_failure.h"
#include "base/component_export.h"
#include "base/time/time.h"
#include "third_party/abseil-cpp/absl/types/optional.h"

namespace ash {
namespace quick_pair {
Expand Down Expand Up @@ -78,6 +81,19 @@ void RecordRetroactivePairingResult(bool success);
COMPONENT_EXPORT(QUICK_PAIR_COMMON)
void RecordTotalGattConnectionTime(base::TimeDelta total_gatt_connection_time);

COMPONENT_EXPORT(QUICK_PAIR_COMMON)
void RecordPairingFailureReason(const Device& device, PairFailure failure);

COMPONENT_EXPORT(QUICK_PAIR_COMMON)
void RecordPairingResult(const Device& device, bool success);

COMPONENT_EXPORT(QUICK_PAIR_COMMON)
void RecordAccountKeyFailureReason(const Device& device,
AccountKeyFailure failure);

COMPONENT_EXPORT(QUICK_PAIR_COMMON)
void RecordAccountKeyResult(const Device& device, bool success);

} // namespace quick_pair
} // namespace ash

Expand Down
3 changes: 3 additions & 0 deletions ash/quick_pair/common/pair_failure.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
namespace ash {
namespace quick_pair {

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused. This enum should be kept in sync with
// the FastPairPairFailure enum in src/tools/metrics/histograms/enums.xml.
enum class PairFailure {
// Failed to create a GATT connection to the device.
kCreateGattConnection = 0,
Expand Down
13 changes: 11 additions & 2 deletions ash/quick_pair/keyed_service/quick_pair_metrics_logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ void QuickPairMetricsLogger::DevicePairedChanged(
void QuickPairMetricsLogger::OnDevicePaired(scoped_refptr<Device> device) {
AttemptRecordingFastPairEngagementFlow(
*device, FastPairEngagementFlowEvent::kPairingSucceeded);
RecordPairingResult(*device, /*success=*/true);
feature_usage_metrics_logger_->RecordUsage(/*success=*/true);

base::TimeDelta total_pair_time =
Expand Down Expand Up @@ -89,6 +90,8 @@ void QuickPairMetricsLogger::OnPairFailure(scoped_refptr<Device> device,
AttemptRecordingTotalUxPairTime(*device, total_pair_time);

feature_usage_metrics_logger_->RecordUsage(/*success=*/false);
RecordPairingFailureReason(*device, failure);
RecordPairingResult(*device, /*success=*/false);
}

void QuickPairMetricsLogger::OnDiscoveryAction(scoped_refptr<Device> device,
Expand Down Expand Up @@ -206,10 +209,16 @@ void QuickPairMetricsLogger::OnAssociateAccountAction(
void QuickPairMetricsLogger::OnAccountKeyWrite(
scoped_refptr<Device> device,
absl::optional<AccountKeyFailure> error) {
if (device->protocol != Protocol::kFastPairRetroactive)
if (device->protocol == Protocol::kFastPairRetroactive)
RecordRetroactivePairingResult(/*success=*/!error.has_value());

if (error) {
RecordAccountKeyResult(*device, /*success=*/false);
RecordAccountKeyFailureReason(*device, error.value());
return;
}

RecordRetroactivePairingResult(/*success=*/!error.has_value());
RecordAccountKeyResult(*device, /*success=*/true);
}

void QuickPairMetricsLogger::OnCompanionAppAction(scoped_refptr<Device> device,
Expand Down
Loading