diff --git a/DEPS b/DEPS index fee6084..475309b 100644 --- a/DEPS +++ b/DEPS
@@ -280,7 +280,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '57ce997fccad6ef8bff909f4f92fd5c0f1efcb3c', + 'skia_revision': '3f9d5dc80a958b569d9b7012911d49892d0593ec', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. @@ -307,7 +307,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Fuchsia sdk # and whatever else without interference from each other. - 'fuchsia_version': 'version:8.20220625.0.1', + 'fuchsia_version': 'version:8.20220626.2.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling google-toolbox-for-mac # and whatever else without interference from each other. @@ -359,7 +359,7 @@ # 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': '55f9826aff6f4fa22d0967b6d108c563292f49c7', + 'devtools_frontend_revision': '4987ae25cb768fb462edd6d4ae5e46d05025f44a', # 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. @@ -395,7 +395,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'dawn_revision': 'bd8449f37d312f633c7409d77d5a9419a9748dac', + 'dawn_revision': 'fcf9fdcad813691915fc313a7a1af1bbf3d9523f', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -850,7 +850,7 @@ 'packages': [ { 'package': 'chromium/rts/model/linux-amd64', - 'version': 'gioT_ILQD5Im7qEYjiExY2OLSLO2c6ue1gneplCh4BsC', + 'version': 'nG6AncubmrAP-eF2hN4DcUy2PBswQd1Q858Wmo45TmYC', }, ], 'dep_type': 'cipd', @@ -861,7 +861,7 @@ 'packages': [ { 'package': 'chromium/rts/model/mac-amd64', - 'version': 'MID1BtIK7htPyOLiz2zdNu6LHLKjY-z_70ZO_hikkEwC', + 'version': 'wiN7bcSq4QYkoOQAizwJYfjKHCcxfKD3EoqNN2tKAdgC', }, ], 'dep_type': 'cipd', @@ -872,7 +872,7 @@ 'packages': [ { 'package': 'chromium/rts/model/windows-amd64', - 'version': 'Zrfuy4pV0aWqeZo0zJlsCV3pm2wpkc4O3uxUdVGq1aQC', + 'version': 'gPqqbG-Feb8qAWJEQA9cMlMuv9Dy7IB9HHJukKKJIcwC', }, ], 'dep_type': 'cipd', @@ -929,7 +929,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': '2H7GLo5z3yyGsMjTD2H2azjJmArnYc6gJHZDHVDL7X8C', + 'version': 'QKIQEnyHdMNKoGCzyRNZ7FlELo3qz54hih1Rkh1UslMC', }, ], 'condition': 'checkout_android', @@ -1723,7 +1723,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '21e01f20feaa79eb125c34e7da02444715a19078', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '446c407bba5b7838883345d7a09b0feae4cfb4ac', + Var('webrtc_git') + '/src.git' + '@' + '6d4cf63a3c488267d8fbe2a87110f6a60fac68c0', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1796,7 +1796,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@67a7affd49619f0ab430f65ffaf97daadceaeb99', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@e7d87780bdbc1932540bd8085f20e0b062583d0f', 'condition': 'checkout_src_internal', }, @@ -1826,7 +1826,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/help_app/app', - 'version': 'KNrmbu7i7dvvxk46RGAgpVuc7pJ9mOyMaWhaKGkcud0C', + 'version': '-6tfPiC-tl4DErnlvar3SY-mesNNq9Y4YR7Hq1Vb-F4C', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -1837,7 +1837,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/media_app/app', - 'version': 'eZSdoBLs1E62rJ9nHJnqRV5jYn7jAP0gCfIGUexCvaIC', + 'version': 'WsmCtJ_DmkP5Pbw9a5dbqXendI4L_kIJX-S9ykYePXsC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -1848,7 +1848,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/projector_app/app', - 'version': 'SUOawKs7D8d9s81tTqcq1ihr9fA_5aL16Vn61aYAEm4C', + 'version': '8248SeAROalAOjJr_yVuo9y38T-LRFHzyR19Xez7VSYC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal',
diff --git a/ash/components/arc/arc_features_parser.cc b/ash/components/arc/arc_features_parser.cc index 180ae68..762ec0c 100644 --- a/ash/components/arc/arc_features_parser.cc +++ b/ash/components/arc/arc_features_parser.cc
@@ -31,16 +31,18 @@ absl::optional<ArcFeatures> ParseFeaturesJson(base::StringPiece input_json) { ArcFeatures arc_features; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(input_json); - if (!parsed_json.value || !parsed_json.value->is_dict()) { - LOG(ERROR) << "Error parsing feature JSON: " << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(input_json); + if (!parsed_json.has_value()) { + LOG(ERROR) << "Error parsing feature JSON: " << parsed_json.error().message; + return absl::nullopt; + } else if (!parsed_json->is_dict()) { + LOG(ERROR) << "Error parsing feature JSON: Expected a dictionary."; return absl::nullopt; } // Parse each item under features. const base::Value* feature_list = - parsed_json.value->FindKeyOfType("features", base::Value::Type::LIST); + parsed_json->FindKeyOfType("features", base::Value::Type::LIST); if (!feature_list) { LOG(ERROR) << "No feature list in JSON."; return absl::nullopt; @@ -63,9 +65,8 @@ } // Parse each item under unavailable_features. - const base::Value* unavailable_feature_list = - parsed_json.value->FindKeyOfType("unavailable_features", - base::Value::Type::LIST); + const base::Value* unavailable_feature_list = parsed_json->FindKeyOfType( + "unavailable_features", base::Value::Type::LIST); if (!unavailable_feature_list) { LOG(ERROR) << "No unavailable feature list in JSON."; return absl::nullopt; @@ -84,8 +85,8 @@ } // Parse each item under properties. - const base::Value* properties = parsed_json.value->FindKeyOfType( - "properties", base::Value::Type::DICTIONARY); + const base::Value* properties = + parsed_json->FindKeyOfType("properties", base::Value::Type::DICTIONARY); if (!properties) { LOG(ERROR) << "No properties in JSON."; return absl::nullopt; @@ -100,7 +101,7 @@ } // Parse the Play Store version - const base::Value* play_version = parsed_json.value->FindKeyOfType( + const base::Value* play_version = parsed_json->FindKeyOfType( "play_store_version", base::Value::Type::STRING); if (!play_version) { LOG(ERROR) << "No Play Store version in JSON.";
diff --git a/ash/components/geolocation/simple_geolocation_request.cc b/ash/components/geolocation/simple_geolocation_request.cc index b9b42e69..174cc2d 100644 --- a/ash/components/geolocation/simple_geolocation_request.cc +++ b/ash/components/geolocation/simple_geolocation_request.cc
@@ -192,14 +192,14 @@ // Parse the response, ignoring comments. auto response_result = base::JSONReader::ReadAndReturnValueWithError(response_body); - if (!response_result.value) { - PrintGeolocationError(server_url, - "JSONReader failed: " + response_result.error_message, - position); + if (!response_result.has_value()) { + PrintGeolocationError( + server_url, "JSONReader failed: " + response_result.error().message, + position); RecordUmaEvent(SIMPLE_GEOLOCATION_REQUEST_EVENT_RESPONSE_MALFORMED); return false; } - base::Value response_value = std::move(*response_result.value); + base::Value response_value = std::move(*response_result); if (!response_value.is_dict()) { PrintGeolocationError(
diff --git a/ash/components/timezone/timezone_request.cc b/ash/components/timezone/timezone_request.cc index 8e3d86c7..d1becfd 100644 --- a/ash/components/timezone/timezone_request.cc +++ b/ash/components/timezone/timezone_request.cc
@@ -227,24 +227,23 @@ << response_body; // Parse the response, ignoring comments. - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(response_body); - if (!parsed_json.value) { + if (!parsed_json.has_value()) { PrintTimeZoneError(server_url, - "JSONReader failed: " + parsed_json.error_message, + "JSONReader failed: " + parsed_json.error().message, timezone); RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_MALFORMED); return false; } const base::DictionaryValue* response_object = NULL; - if (!parsed_json.value->GetAsDictionary(&response_object)) { - PrintTimeZoneError( - server_url, - "Unexpected response type : " + - base::StringPrintf( - "%u", static_cast<unsigned int>(parsed_json.value->type())), - timezone); + if (!parsed_json->GetAsDictionary(&response_object)) { + PrintTimeZoneError(server_url, + "Unexpected response type : " + + base::StringPrintf("%u", static_cast<unsigned int>( + parsed_json->type())), + timezone); RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_MALFORMED); return false; }
diff --git a/ash/components/trial_group/trial_group_checker.cc b/ash/components/trial_group/trial_group_checker.cc index 2f11a2e..9de4f701 100644 --- a/ash/components/trial_group/trial_group_checker.cc +++ b/ash/components/trial_group/trial_group_checker.cc
@@ -51,16 +51,14 @@ return; } - base::JSONReader::ValueWithError membership_info = - base::JSONReader::ReadAndReturnValueWithError(*response_body, - base::JSON_PARSE_RFC); - if (!membership_info.value || !membership_info.value->is_dict()) { + auto membership_info = base::JSONReader::ReadAndReturnValueWithError( + *response_body, base::JSON_PARSE_RFC); + if (!membership_info.has_value() || !membership_info->is_dict()) { std::move(callback_).Run(false); return; } - base::Value* member_status = - membership_info.value->FindKey("membership_info"); + base::Value* member_status = membership_info->FindKey("membership_info"); if (member_status == nullptr || !member_status->is_int()) { std::move(callback_).Run(false); return;
diff --git a/ash/strings/ash_strings_en-GB.xtb b/ash/strings/ash_strings_en-GB.xtb index 40ba116..d760aad 100644 --- a/ash/strings/ash_strings_en-GB.xtb +++ b/ash/strings/ash_strings_en-GB.xtb
@@ -536,6 +536,7 @@ <translation id="4115378294792113321">Magenta</translation> <translation id="412298498316631026">window</translation> <translation id="4123259114412175274">To unlock your Chromebook, make sure that your phone's Bluetooth is on</translation> +<translation id="4125970834901680537">Can't stream apps in tablet mode. Try again in laptop mode.</translation> <translation id="4129129681837227511">To see notifications on your lock screen, unlock to change the setting</translation> <translation id="4136724716305260864">On until sunrise</translation> <translation id="4146833061457621061">Play music</translation> @@ -553,6 +554,7 @@ <translation id="4215497585250573029">VPN settings</translation> <translation id="4217571870635786043">Dictation</translation> <translation id="4221957499226645091"><ph name="APP_NAME" />, installed app, paused</translation> +<translation id="423685346499232137">Can't copy or paste content at this time</translation> <translation id="4239069858505860023">GPRS</translation> <translation id="4242533952199664413">Open settings</translation> <translation id="4250229828105606438">Screenshot</translation>
diff --git a/ash/strings/ash_strings_pt-PT.xtb b/ash/strings/ash_strings_pt-PT.xtb index 1e2d972..f2420bc 100644 --- a/ash/strings/ash_strings_pt-PT.xtb +++ b/ash/strings/ash_strings_pt-PT.xtb
@@ -695,7 +695,7 @@ <ph name="NUM_OTHER_NOTIFICATION" /></translation> <translation id="5003993274120026347">Frase seguinte</translation> <translation id="5016558321564993266">Ative/desative o marcador. <ph name="STATE_TEXT" /></translation> -<translation id="5030687792513154421">O tempo terminou</translation> +<translation id="5030687792513154421">Acabou o tempo</translation> <translation id="5033299697334913360">Clique em qualquer local para capturar o ecrã inteiro.</translation> <translation id="5035236842988137213">O dispositivo <ph name="DEVICE_NAME" /> estabeleceu ligação a um novo telemóvel.</translation> <translation id="5035389544768382859">Confirme a configuração do ecrã</translation>
diff --git a/ash/system/message_center/ash_notification_view.cc b/ash/system/message_center/ash_notification_view.cc index 5b7d864..f894b5f 100644 --- a/ash/system/message_center/ash_notification_view.cc +++ b/ash/system/message_center/ash_notification_view.cc
@@ -822,8 +822,19 @@ void AshNotificationView::RemoveGroupNotification( const std::string& notification_id) { - AshNotificationView* to_be_removed = static_cast<AshNotificationView*>( - FindGroupNotificationView(notification_id)); + auto* child_view = FindGroupNotificationView(notification_id); + if (!child_view) + return; + + base::WeakPtr<AshNotificationView> to_be_removed = + static_cast<AshNotificationView*>(child_view)->weak_factory_.GetWeakPtr(); + if (to_be_removed) { + // Abort any previously queued animations, if a remove animation was in + // progress this will cause `to_be_removed` to be deleted. Because of this + // we need to use a weakptr to ensure we do not try to animate an already + // deleted view. + to_be_removed->layer()->GetAnimator()->AbortAllAnimations(); + } if (!to_be_removed) return; @@ -847,12 +858,32 @@ }, weak_factory_.GetWeakPtr(), notification_id); + auto on_animation_aborted = base::BindRepeating( + [](base::WeakPtr<AshNotificationView> self, + const std::string& notification_id) { + if (!self) + return; + + views::View* to_be_removed = + self->FindGroupNotificationView(notification_id); + if (!to_be_removed) + return; + + self->total_grouped_notifications_--; + self->expand_button_->UpdateGroupedNotificationsCount( + self->total_grouped_notifications_); + + self->grouped_notifications_container_->RemoveChildViewT(to_be_removed); + self->PreferredSizeChanged(); + }, + weak_factory_.GetWeakPtr(), notification_id); + // If the removed notification has a layer transform it has already been slid // out (For example user swiped it by dragging). We only need to animate a // slide out if there is no transform. - if (to_be_removed->layer()->transform().IsIdentity()) { + if (to_be_removed && to_be_removed->layer()->transform().IsIdentity()) { message_center_utils::SlideOutView( - to_be_removed, on_notification_slid_out, + to_be_removed.get(), on_notification_slid_out, on_animation_aborted, /*delay_in_ms=*/0, /*duration_in_ms=*/kSlideOutGroupedNotificationAnimationDurationMs, gfx::Tween::LINEAR, @@ -1491,6 +1522,7 @@ grouped_notifications_container_->height(); int removed_index = grouped_notifications_container_->GetIndexOf(to_be_removed); + LOG(ERROR) << "Removed after animation"; grouped_notifications_container_->RemoveChildViewT(to_be_removed).reset(); auto* notification_view_controller = message_center_utils::
diff --git a/ash/system/message_center/ash_notification_view_unittest.cc b/ash/system/message_center/ash_notification_view_unittest.cc index 890b81a..9e1bf21 100644 --- a/ash/system/message_center/ash_notification_view_unittest.cc +++ b/ash/system/message_center/ash_notification_view_unittest.cc
@@ -1078,4 +1078,30 @@ EXPECT_EQ(nullptr, GetMessageLabel(notification_view())); } +TEST_F(AshNotificationViewTest, DuplicateGroupChildRemovalWithAnimation) { + message_center::MessageCenter::Get()->RemoveAllNotifications( + /*by_user=*/true, message_center::MessageCenter::RemoveType::ALL); + + auto notification = CreateTestNotification(); + + GetPrimaryUnifiedSystemTray()->ShowBubble(); + auto* notification_view = + GetNotificationViewFromMessageCenter(notification->id()); + MakeNotificationGroupParent( + notification_view, + 2 * message_center_style::kMaxGroupedNotificationsInCollapsedState); + + notification_view->ToggleExpand(); + EXPECT_TRUE(notification_view->IsExpanded()); + + // Enable animations. + ui::ScopedAnimationDurationScaleMode duration( + ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION); + + // Ensure a duplicate call to RemoveGroupNotification does not cause a crash. + auto* child_view = GetFirstGroupedChildNotificationView(notification_view); + notification_view->RemoveGroupNotification(child_view->notification_id()); + notification_view->RemoveGroupNotification(child_view->notification_id()); +} + } // namespace ash
diff --git a/ash/system/message_center/message_center_utils.cc b/ash/system/message_center/message_center_utils.cc index 72b211f..dd5293dc 100644 --- a/ash/system/message_center/message_center_utils.cc +++ b/ash/system/message_center/message_center_utils.cc
@@ -177,6 +177,7 @@ void SlideOutView(views::View* view, base::OnceClosure on_animation_ended, + base::OnceClosure on_animation_aborted, int delay_in_ms, int duration_in_ms, gfx::Tween::Type tween_type, @@ -188,9 +189,6 @@ delay_in_ms = 0; } - std::pair<base::OnceClosure, base::OnceClosure> split = - base::SplitOnceCallback(std::move(on_animation_ended)); - // The view must have a layer to perform animation. DCHECK(view->layer()); @@ -205,8 +203,8 @@ views::AnimationBuilder() .SetPreemptionStrategy( ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET) - .OnEnded(std::move(split.first)) - .OnAborted(std::move(split.second)) + .OnEnded(std::move(on_animation_ended)) + .OnAborted(std::move(on_animation_aborted)) .Once() .At(base::Milliseconds(delay_in_ms)) .SetDuration(base::Milliseconds(duration_in_ms))
diff --git a/ash/system/message_center/message_center_utils.h b/ash/system/message_center/message_center_utils.h index d128ee2..0c86c6e 100644 --- a/ash/system/message_center/message_center_utils.h +++ b/ash/system/message_center/message_center_utils.h
@@ -75,6 +75,7 @@ // Slide out animation using AnimationBuilder. void SlideOutView(views::View* view, base::OnceClosure on_animation_ended, + base::OnceClosure on_animation_aborted, int delay_in_ms, int duration_in_ms, gfx::Tween::Type tween_type = gfx::Tween::LINEAR,
diff --git a/ash/system/power/power_prefs_unittest.cc b/ash/system/power/power_prefs_unittest.cc index 841958d..baab688a 100644 --- a/ash/system/power/power_prefs_unittest.cc +++ b/ash/system/power/power_prefs_unittest.cc
@@ -178,12 +178,10 @@ void DecodeJsonStringAndNormalize(const std::string& json_string, base::Value* value) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json_string, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_EQ(parsed_json.error_message, ""); - ASSERT_TRUE(parsed_json.value); - *value = std::move(*parsed_json.value); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json_string, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + *value = std::move(*parsed_json); } void SetQuickDimPreference(bool enabled) {
diff --git a/ash/webui/eche_app_ui/apps_access_manager.h b/ash/webui/eche_app_ui/apps_access_manager.h index 2e9911d..caf7291 100644 --- a/ash/webui/eche_app_ui/apps_access_manager.h +++ b/ash/webui/eche_app_ui/apps_access_manager.h
@@ -45,13 +45,20 @@ // The permission request time out after 20 seconds. kUserActionTimeout = 4, - // The permission request is canceled because the device screen off. - kUserActionCanceled = 5, + // The permission request is canceled from the remote device, e.g. device + // screen off. + kUserActionRemoteInterrupt = 5, // System exceptions thrown out. kSystemError = 6, - kMaxValue = kSystemError + // The permission request is canceled from the onboarding UI. + kUserActionCanceled = 7, + + // The permission request is canceled when the device is disconnected. + kFailedConnection = 8, + + kMaxValue = kFailedConnection }; class Observer : public base::CheckedObserver { @@ -68,6 +75,7 @@ virtual ~AppsAccessManager(); virtual AccessStatus GetAccessStatus() const = 0; + virtual void NotifyAppsAccessCanceled() = 0; // Starts an attempt to enable the apps access. std::unique_ptr<AppsAccessSetupOperation> AttemptAppsAccessSetup(
diff --git a/ash/webui/eche_app_ui/apps_access_manager_impl.cc b/ash/webui/eche_app_ui/apps_access_manager_impl.cc index db42033..d39537d 100644 --- a/ash/webui/eche_app_ui/apps_access_manager_impl.cc +++ b/ash/webui/eche_app_ui/apps_access_manager_impl.cc
@@ -97,6 +97,18 @@ } } +void AppsAccessManagerImpl::NotifyAppsAccessCanceled() { + if (connection_manager_->GetStatus() == ConnectionStatus::kDisconnected) { + base::UmaHistogramEnumeration( + kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kFailedConnection); + } else { + base::UmaHistogramEnumeration( + kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kUserActionCanceled); + } +} + void AppsAccessManagerImpl::OnGetAppsAccessStateResponseReceived( proto::GetAppsAccessStateResponse apps_access_state_response) { if (apps_access_state_response.result() == proto::Result::RESULT_NO_ERROR) { @@ -111,16 +123,21 @@ proto::SendAppsSetupResponse apps_setup_response) { if (apps_setup_response.result() == proto::Result::RESULT_NO_ERROR) { current_apps_access_state_ = apps_setup_response.apps_access_state(); + + // Log the no error response after |current_apps_access_state_| is updated. + LogAppsSetupResponse(apps_setup_response.result()); AccessStatus access_status = ComputeAppsAccessState(); SetAccessStatusInternal(access_status); } else if (IsSetupOperationInProgress()) { + // Log the error response before we change the setup operation to not in + // progress. + LogAppsSetupResponse(apps_setup_response.result()); SetAppsSetupOperationStatus( (apps_setup_response.result() == proto::Result::RESULT_ERROR_USER_REJECTED) ? AppsAccessSetupOperation::Status::kCompletedUserRejected : AppsAccessSetupOperation::Status::kOperationFailedOrCancelled); } - LogAppsSetupResponse(apps_setup_response.result()); } void AppsAccessManagerImpl::OnAppPolicyStateChange( @@ -334,9 +351,13 @@ void AppsAccessManagerImpl::LogAppsSetupResponse( proto::Result apps_setup_result) { + if (!IsSetupOperationInProgress()) + return; + switch (apps_setup_result) { case proto::Result::RESULT_NO_ERROR: - if (GetAccessStatus() == AccessStatus::kAccessGranted) { + if (current_apps_access_state_ == + proto::AppsAccessState::ACCESS_GRANTED) { base::UmaHistogramEnumeration( kEcheOnboardingHistogramName, OnboardingUserActionMetric::kUserActionPermissionGranted); @@ -355,7 +376,7 @@ case proto::Result::RESULT_ERROR_ACTION_CANCELED: base::UmaHistogramEnumeration( kEcheOnboardingHistogramName, - OnboardingUserActionMetric::kUserActionCanceled); + OnboardingUserActionMetric::kUserActionRemoteInterrupt); break; case proto::Result::RESULT_ERROR_SYSTEM: base::UmaHistogramEnumeration(kEcheOnboardingHistogramName,
diff --git a/ash/webui/eche_app_ui/apps_access_manager_impl.h b/ash/webui/eche_app_ui/apps_access_manager_impl.h index b4b53a2..313d8df 100644 --- a/ash/webui/eche_app_ui/apps_access_manager_impl.h +++ b/ash/webui/eche_app_ui/apps_access_manager_impl.h
@@ -52,6 +52,7 @@ AccessStatus GetAccessStatus() const override; void SetAccessStatusInternal(AccessStatus access_status) override; void OnSetupRequested() override; + void NotifyAppsAccessCanceled() override; // EcheMessageReceiver::Observer: void OnGetAppsAccessStateResponseReceived(
diff --git a/ash/webui/eche_app_ui/apps_access_manager_impl_unittest.cc b/ash/webui/eche_app_ui/apps_access_manager_impl_unittest.cc index 083ed58d..09830738 100644 --- a/ash/webui/eche_app_ui/apps_access_manager_impl_unittest.cc +++ b/ash/webui/eche_app_ui/apps_access_manager_impl_unittest.cc
@@ -15,6 +15,7 @@ #include "ash/webui/eche_app_ui/fake_feature_status_provider.h" #include "ash/webui/eche_app_ui/pref_names.h" #include "ash/webui/eche_app_ui/proto/exo_messages.pb.h" +#include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "components/prefs/testing_pref_service.h" #include "testing/gtest/include/gtest/gtest.h" @@ -25,6 +26,9 @@ using AccessStatus = ash::phonehub::MultideviceFeatureAccessManager::AccessStatus; +using OnboardingUserActionMetric = + AppsAccessManagerImpl::OnboardingUserActionMetric; + namespace { class FakeObserver : public AppsAccessManager::Observer { public: @@ -165,6 +169,10 @@ fake_multidevice_setup_client_.SetFeatureState(feature, feature_state); } + void NotifyAppsAccessCanceled() { + return apps_access_manager_->NotifyAppsAccessCanceled(); + } + multidevice_setup::FakeMultiDeviceSetupClient* fake_multidevice_setup_client() { return &fake_multidevice_setup_client_; @@ -293,6 +301,8 @@ } TEST_F(AppsAccessManagerImplTest, StartConnectingAndNoAccess) { + base::HistogramTester histograms; + // Set initial state to connecting. SetConnectionStatus(secure_channel::ConnectionManager::Status::kConnecting); SetFeatureStatus(FeatureStatus::kConnecting); @@ -324,6 +334,9 @@ EXPECT_EQ(AppsAccessSetupOperation::Status::kCompletedSuccessfully, GetAppsAccessSetupOperationStatus()); EXPECT_FALSE(IsSetupOperationInProgress()); + histograms.ExpectBucketCount( + kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kUserActionPermissionGranted, 1); } TEST_F(AppsAccessManagerImplTest, StartConnectedAndNoAccess) { @@ -356,6 +369,8 @@ } TEST_F(AppsAccessManagerImplTest, SimulateUserRejectedError) { + base::HistogramTester histograms; + // Set initial state to connected. SetConnectionStatus(secure_channel::ConnectionManager::Status::kConnected); SetFeatureStatus(FeatureStatus::kConnected); @@ -383,9 +398,14 @@ EXPECT_EQ(AppsAccessSetupOperation::Status::kCompletedUserRejected, GetAppsAccessSetupOperationStatus()); EXPECT_FALSE(IsSetupOperationInProgress()); + histograms.ExpectBucketCount( + kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kUserActionPermissionRejected, 1); } -TEST_F(AppsAccessManagerImplTest, SimulateOperationFailedOrCancelled) { +TEST_F(AppsAccessManagerImplTest, SimulateOperationFailedOrCanceled) { + base::HistogramTester histograms; + // Set initial state to connected. SetConnectionStatus(secure_channel::ConnectionManager::Status::kConnected); SetFeatureStatus(FeatureStatus::kConnected); @@ -413,6 +433,9 @@ EXPECT_EQ(AppsAccessSetupOperation::Status::kOperationFailedOrCancelled, GetAppsAccessSetupOperationStatus()); EXPECT_FALSE(IsSetupOperationInProgress()); + histograms.ExpectBucketCount(kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kUserActionTimeout, + 1); // Simulate flipping the access state to not granted. FakeGetAppsAccessStateResponse( @@ -439,6 +462,9 @@ EXPECT_EQ(AppsAccessSetupOperation::Status::kOperationFailedOrCancelled, GetAppsAccessSetupOperationStatus()); EXPECT_FALSE(IsSetupOperationInProgress()); + histograms.ExpectBucketCount( + kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kUserActionRemoteInterrupt, 1); // Simulate flipping the access state to not granted. FakeGetAppsAccessStateResponse( @@ -465,6 +491,8 @@ EXPECT_EQ(AppsAccessSetupOperation::Status::kOperationFailedOrCancelled, GetAppsAccessSetupOperationStatus()); EXPECT_FALSE(IsSetupOperationInProgress()); + histograms.ExpectBucketCount(kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kSystemError, 1); } TEST_F(AppsAccessManagerImplTest, SimulateConnectingToDisconnected) { @@ -769,5 +797,82 @@ EXPECT_EQ(1u, GetNumObserverCalls()); } +TEST_F(AppsAccessManagerImplTest, LogSetupCancelWhenAppsAccessCanceled) { + base::HistogramTester histograms; + + // Set initial state to connecting. + SetConnectionStatus(secure_channel::ConnectionManager::Status::kConnecting); + SetFeatureStatus(FeatureStatus::kConnecting); + + Initialize(AccessStatus::kAvailableButNotGranted); + VerifyAppsAccessGrantedState(AccessStatus::kAvailableButNotGranted); + + // Start a setup operation with enabled and connecting status and access + // not granted. + auto operation = StartSetupOperation(); + EXPECT_TRUE(operation); + + // Simulate changing states from connecting to connected. + SetConnectionStatus(secure_channel::ConnectionManager::Status::kConnected); + SetFeatureStatus(FeatureStatus::kConnected); + + // Verify that the request message has been sent and our operation status + // is updated. + EXPECT_EQ(1u, GetAppsSetupRequestCount()); + EXPECT_EQ(AppsAccessSetupOperation::Status:: + kSentMessageToPhoneAndWaitingForResponse, + GetAppsAccessSetupOperationStatus()); + EXPECT_TRUE(IsSetupOperationInProgress()); + + // Notify the apps access setup operation is canceled. + NotifyAppsAccessCanceled(); + + // Verify the metric logs the expected event. + histograms.ExpectBucketCount(kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kUserActionCanceled, + 1); +} + +TEST_F(AppsAccessManagerImplTest, + LogFailConnectionWhenCanceledAndDisconnected) { + base::HistogramTester histograms; + + // Set initial state to connecting. + SetConnectionStatus(secure_channel::ConnectionManager::Status::kConnecting); + SetFeatureStatus(FeatureStatus::kConnecting); + + Initialize(AccessStatus::kAvailableButNotGranted); + VerifyAppsAccessGrantedState(AccessStatus::kAvailableButNotGranted); + + // Start a setup operation with enabled and connecting status and access + // not granted. + auto operation = StartSetupOperation(); + EXPECT_TRUE(operation); + + // Simulate changing states from connecting to connected. + SetConnectionStatus(secure_channel::ConnectionManager::Status::kConnected); + SetFeatureStatus(FeatureStatus::kConnected); + + // Verify that the request message has been sent and our operation status + // is updated. + EXPECT_EQ(1u, GetAppsSetupRequestCount()); + EXPECT_EQ(AppsAccessSetupOperation::Status:: + kSentMessageToPhoneAndWaitingForResponse, + GetAppsAccessSetupOperationStatus()); + EXPECT_TRUE(IsSetupOperationInProgress()); + + // Simulate changing states from connected to disconnected. + SetConnectionStatus(secure_channel::ConnectionManager::Status::kDisconnected); + SetFeatureStatus(FeatureStatus::kDisconnected); + + // Notify the apps access setup operation is canceled. + NotifyAppsAccessCanceled(); + + // Verify the metric logs the expected event. + histograms.ExpectBucketCount(kEcheOnboardingHistogramName, + OnboardingUserActionMetric::kFailedConnection, + 1); +} + } // namespace eche_app } // namespace ash
diff --git a/ash/webui/eche_app_ui/fake_apps_access_manager.cc b/ash/webui/eche_app_ui/fake_apps_access_manager.cc index efba2fc9..d8cc48cc 100644 --- a/ash/webui/eche_app_ui/fake_apps_access_manager.cc +++ b/ash/webui/eche_app_ui/fake_apps_access_manager.cc
@@ -26,6 +26,8 @@ NotifyAppsAccessChanged(); } +void FakeAppsAccessManager::NotifyAppsAccessCanceled() {} + void FakeAppsAccessManager::OnSetupRequested() {} void FakeAppsAccessManager::SetAppsSetupOperationStatus(
diff --git a/ash/webui/eche_app_ui/fake_apps_access_manager.h b/ash/webui/eche_app_ui/fake_apps_access_manager.h index 9fc2ae27..a62bda5 100644 --- a/ash/webui/eche_app_ui/fake_apps_access_manager.h +++ b/ash/webui/eche_app_ui/fake_apps_access_manager.h
@@ -38,6 +38,7 @@ friend class chromeos::settings::MultideviceHandlerTest; // AppsAccessManager: void SetAccessStatusInternal(AccessStatus access_status) override; + void NotifyAppsAccessCanceled() override; AccessStatus access_status_; };
diff --git a/base/json/json_correctness_fuzzer.cc b/base/json/json_correctness_fuzzer.cc index 179c866..a710b2d 100644 --- a/base/json/json_correctness_fuzzer.cc +++ b/base/json/json_correctness_fuzzer.cc
@@ -32,21 +32,20 @@ base::StringPiece input_string(input.get(), size - 1); const int options = data[size - 1]; - base::JSONReader::ValueWithError result = + auto result = base::JSONReader::ReadAndReturnValueWithError(input_string, options); - if (!result.value) + if (!result.has_value()) return 0; std::string parsed_output; - bool b = base::JSONWriter::Write(*result.value, &parsed_output); + bool b = base::JSONWriter::Write(*result, &parsed_output); LOG_ASSERT(b); - base::JSONReader::ValueWithError double_result = + auto double_result = base::JSONReader::ReadAndReturnValueWithError(parsed_output, options); - LOG_ASSERT(double_result.value); + LOG_ASSERT(double_result.has_value()); std::string double_parsed_output; - bool b2 = - base::JSONWriter::Write(*double_result.value, &double_parsed_output); + bool b2 = base::JSONWriter::Write(*double_result, &double_parsed_output); LOG_ASSERT(b2); LOG_ASSERT(parsed_output == double_parsed_output)
diff --git a/base/json/json_perftest_decodebench.cc b/base/json/json_perftest_decodebench.cc index 47a65962..eeb096a 100644 --- a/base/json/json_perftest_decodebench.cc +++ b/base/json/json_perftest_decodebench.cc
@@ -71,11 +71,12 @@ if (i == 0) { if (average) { - error_message = std::move(v.error_message); + error_message = + !v.has_value() ? std::move(v.error().message) : std::string(); } else { std::cout << "# " << filename; - if (!v.error_message.empty()) { - std::cout << ": " << v.error_message; + if (!v.has_value() && !v.error().message.empty()) { + std::cout << ": " << v.error().message; } std::cout << std::endl; }
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc index ce986df..8591df6 100644 --- a/base/json/json_reader.cc +++ b/base/json/json_reader.cc
@@ -23,9 +23,8 @@ namespace { -base::JSONReader::ValueWithError DecodeJSONInRust(const base::StringPiece& json, - int options, - size_t max_depth) { +base::expected<Value, JSONReader::Error> +DecodeJSONInRust(const base::StringPiece& json, int options, size_t max_depth) { int32_t error_line; int32_t error_column; base::ffi::json::json_parser::JsonOptions rust_options; @@ -38,38 +37,41 @@ rust_options.allow_control_chars = options & base::JSON_ALLOW_CONTROL_CHARS; rust_options.allow_x_escapes = options & base::JSON_ALLOW_X_ESCAPES; rust_options.max_depth = max_depth; - base::JSONReader::ValueWithError ret; + base::JSONReader::Error error; + absl::optional<base::Value> value; bool ok = base::ffi::json::json_parser::decode_json_from_cpp( - base::StringPieceToRustSlice(json), rust_options, ret.value, error_line, - error_column, ret.error_message); + base::StringPieceToRustSlice(json), rust_options, value, error_line, + error_column, error.message); if (!ok) { - ret.value.reset(); - ret.error_line = error_line; - ret.error_column = error_column; + error.line = error_line; + error.column = error_column; + return base::unexpected(std::move(error)); } - return ret; + return std::move(*value); } } // anonymous namespace #endif // BUILDFLAG(BUILD_RUST_JSON_PARSER) -JSONReader::ValueWithError::ValueWithError() = default; +JSONReader::Error::Error() = default; -JSONReader::ValueWithError::ValueWithError(ValueWithError&& other) = default; +JSONReader::Error::Error(Error&& other) = default; -JSONReader::ValueWithError::~ValueWithError() = default; +JSONReader::Error::~Error() = default; -JSONReader::ValueWithError& JSONReader::ValueWithError::operator=( - ValueWithError&& other) = default; +JSONReader::Error& JSONReader::Error::operator=(Error&& other) = default; // static absl::optional<Value> JSONReader::Read(StringPiece json, int options, size_t max_depth) { #if BUILDFLAG(BUILD_RUST_JSON_PARSER) - ValueWithError result = DecodeJSONInRust(json, options, max_depth); - return std::move(result.value); + auto result = DecodeJSONInRust(json, options, max_depth); + if (!result.has_value()) { + return absl::nullopt; + } + return std::move(*result); #else // BUILDFLAG(BUILD_RUST_JSON_PARSER) internal::JSONParser parser(options, max_depth); return parser.Parse(json); @@ -85,21 +87,22 @@ } // static -JSONReader::ValueWithError JSONReader::ReadAndReturnValueWithError( - StringPiece json, - int options) { +JSONReader::Result JSONReader::ReadAndReturnValueWithError(StringPiece json, + int options) { #if BUILDFLAG(BUILD_RUST_JSON_PARSER) return DecodeJSONInRust(json, options, internal::kAbsoluteMaxDepth); #else // BUILDFLAG(BUILD_RUST_JSON_PARSER) internal::JSONParser parser(options); - ValueWithError ret; - ret.value = parser.Parse(json); - if (!ret.value) { - ret.error_message = parser.GetErrorMessage(); - ret.error_line = parser.error_line(); - ret.error_column = parser.error_column(); + auto value = parser.Parse(json); + if (!value) { + Error error; + error.message = parser.GetErrorMessage(); + error.line = parser.error_line(); + error.column = parser.error_column(); + return base::unexpected(std::move(error)); } - return ret; + + return std::move(*value); #endif // BUILDFLAG(BUILD_RUST_JSON_PARSER) }
diff --git a/base/json/json_reader.h b/base/json/json_reader.h index 84b303d..1246eca6 100644 --- a/base/json/json_reader.h +++ b/base/json/json_reader.h
@@ -42,6 +42,7 @@ #include "base/base_export.h" #include "base/json/json_common.h" #include "base/strings/string_piece.h" +#include "base/types/expected.h" #include "base/values.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -86,25 +87,23 @@ class BASE_EXPORT JSONReader { public: - struct BASE_EXPORT ValueWithError { - ValueWithError(); - ValueWithError(ValueWithError&& other); - ValueWithError& operator=(ValueWithError&& other); + struct BASE_EXPORT Error { + Error(); + Error(Error&& other); + Error& operator=(Error&& other); - ValueWithError(const ValueWithError&) = delete; - ValueWithError& operator=(const ValueWithError&) = delete; + Error(const Error&) = delete; + Error& operator=(const Error&) = delete; - ~ValueWithError(); + ~Error(); - absl::optional<Value> value; - - // Contains default values if |value| exists, or the error status if |value| - // is absl::nullopt. - std::string error_message; - int error_line = 0; - int error_column = 0; + std::string message; + int line = 0; + int column = 0; }; + using Result = base::expected<Value, Error>; + // This class contains only static methods. JSONReader() = delete; JSONReader(const JSONReader&) = delete; @@ -127,10 +126,11 @@ int options = JSON_PARSE_CHROMIUM_EXTENSIONS, size_t max_depth = internal::kAbsoluteMaxDepth); - // Reads and parses |json| like Read(). Returns a ValueWithError, which on - // error, will be populated with a formatted error message, an error code, and - // the error location if appropriate. - static ValueWithError ReadAndReturnValueWithError( + // Reads and parses |json| like Read(). On success returns a Value as the + // expected value. Otherwise, it returns an Error instance, populated with a + // formatted error message, an error code, and the error location if + // appropriate as the error value of the expected type. + static Result ReadAndReturnValueWithError( StringPiece json, int options = JSON_PARSE_CHROMIUM_EXTENSIONS); };
diff --git a/base/json/json_reader_fuzzer.cc b/base/json/json_reader_fuzzer.cc index 7267d26..3cde253 100644 --- a/base/json/json_reader_fuzzer.cc +++ b/base/json/json_reader_fuzzer.cc
@@ -23,12 +23,12 @@ const int options = data[size - 1]; - JSONReader::ValueWithError json_val = + auto json_val = JSONReader::ReadAndReturnValueWithError(input_string, options); - if (json_val.value) { + if (json_val.has_value()) { // Check that the value can be serialized and deserialized back to an // equivalent |Value|. - const Value& value = json_val.value.value(); + const Value& value = *json_val; std::string serialized; CHECK(JSONWriter::Write(value, &serialized));
diff --git a/base/json/json_reader_unittest.cc b/base/json/json_reader_unittest.cc index 16ebccb..a2eca9f5 100644 --- a/base/json/json_reader_unittest.cc +++ b/base/json/json_reader_unittest.cc
@@ -202,9 +202,9 @@ EXPECT_DOUBLE_EQ(122.416294033786585, root->GetDouble()); // This is syntaxtically valid, but out of range of a double. - auto value_with_error = + auto value = JSONReader::ReadAndReturnValueWithError("1e1000", JSON_PARSE_RFC); - ASSERT_FALSE(value_with_error.value); + ASSERT_FALSE(value.has_value()); } TEST(JSONReaderTest, FractionalNumbers) { @@ -678,10 +678,9 @@ std::string input; ASSERT_TRUE(ReadFileToString(path.AppendASCII("bom_feff.json"), &input)); - JSONReader::ValueWithError root = - JSONReader::ReadAndReturnValueWithError(input); - ASSERT_TRUE(root.value) << root.error_message; - EXPECT_TRUE(root.value->is_dict()); + auto root = JSONReader::ReadAndReturnValueWithError(input); + ASSERT_TRUE(root.has_value()) << root.error().message; + EXPECT_TRUE(root->is_dict()); } // Tests that the root of a JSON object can be deleted safely while its @@ -768,20 +767,18 @@ for (size_t i = 0; i < std::size(kInvalidJson); ++i) { LOG(INFO) << "Sanity test " << i << ": <" << kInvalidJson[i] << ">"; - JSONReader::ValueWithError root = - JSONReader::ReadAndReturnValueWithError(kInvalidJson[i]); - EXPECT_FALSE(root.value); - EXPECT_NE("", root.error_message); + auto root = JSONReader::ReadAndReturnValueWithError(kInvalidJson[i]); + EXPECT_FALSE(root.has_value()); + EXPECT_NE("", root.error().message); } } TEST(JSONReaderTest, IllegalTrailingNull) { const char json[] = {'"', 'n', 'u', 'l', 'l', '"', '\0'}; std::string json_string(json, sizeof(json)); - JSONReader::ValueWithError root = - JSONReader::ReadAndReturnValueWithError(json_string); - EXPECT_FALSE(root.value); - EXPECT_NE("", root.error_message); + auto root = JSONReader::ReadAndReturnValueWithError(json_string); + EXPECT_FALSE(root.has_value()); + EXPECT_NE("", root.error().message); } TEST(JSONReaderTest, ASCIIControlCodes) { @@ -1038,11 +1035,11 @@ auto test_case = kCases[i]; SCOPED_TRACE(StringPrintf("case %u: \"%s\"", i, test_case.input)); - JSONReader::ValueWithError root = JSONReader::ReadAndReturnValueWithError( + auto root = JSONReader::ReadAndReturnValueWithError( test_case.input, JSON_PARSE_RFC | JSON_ALLOW_CONTROL_CHARS); - EXPECT_FALSE(root.value); - EXPECT_EQ(test_case.error_line, root.error_line); - EXPECT_EQ(test_case.error_column, root.error_column); + EXPECT_FALSE(root.has_value()); + EXPECT_EQ(test_case.error_line, root.error().line); + EXPECT_EQ(test_case.error_column, root.error().column); } } @@ -1071,21 +1068,21 @@ SCOPED_TRACE(testing::Message() << "case " << i); const auto& test_case = kCases[i]; - JSONReader::ValueWithError result = JSONReader::ReadAndReturnValueWithError( - test_case.input, JSON_PARSE_RFC); - EXPECT_FALSE(result.value); + auto result = JSONReader::ReadAndReturnValueWithError(test_case.input, + JSON_PARSE_RFC); + EXPECT_FALSE(result.has_value()); result = JSONReader::ReadAndReturnValueWithError( test_case.input, JSON_PARSE_RFC | test_case.option); - EXPECT_TRUE(result.value); + EXPECT_TRUE(result.has_value()); result = JSONReader::ReadAndReturnValueWithError( test_case.input, JSON_PARSE_CHROMIUM_EXTENSIONS); - EXPECT_TRUE(result.value); + EXPECT_TRUE(result.has_value()); result = JSONReader::ReadAndReturnValueWithError( test_case.input, JSON_PARSE_CHROMIUM_EXTENSIONS & ~test_case.option); - EXPECT_FALSE(result.value); + EXPECT_FALSE(result.has_value()); } }
diff --git a/base/json/json_string_value_serializer.cc b/base/json/json_string_value_serializer.cc index cc3c0bd..279b1bd1 100644 --- a/base/json/json_string_value_serializer.cc +++ b/base/json/json_string_value_serializer.cc
@@ -49,14 +49,14 @@ std::unique_ptr<Value> JSONStringValueDeserializer::Deserialize( int* error_code, std::string* error_str) { - base::JSONReader::ValueWithError ret = + auto ret = base::JSONReader::ReadAndReturnValueWithError(json_string_, options_); - if (ret.value) - return base::Value::ToUniquePtrValue(std::move(*ret.value)); + if (ret.has_value()) + return base::Value::ToUniquePtrValue(std::move(*ret)); if (error_code) *error_code = base::ValueDeserializer::kErrorCodeInvalidFormat; if (error_str) - *error_str = std::move(ret.error_message); + *error_str = std::move(ret.error().message); return nullptr; }
diff --git a/base/json/json_writer_unittest.cc b/base/json/json_writer_unittest.cc index cd6e5f0..709d215 100644 --- a/base/json/json_writer_unittest.cc +++ b/base/json/json_writer_unittest.cc
@@ -203,10 +203,10 @@ } // Ensure we can read and write the JSON - JSONReader::ValueWithError json_val = JSONReader::ReadAndReturnValueWithError( + auto json_val = JSONReader::ReadAndReturnValueWithError( nested_json, JSON_ALLOW_TRAILING_COMMAS); - EXPECT_TRUE(json_val.value); - const Value& value = json_val.value.value(); + EXPECT_TRUE(json_val.has_value()); + const Value& value = *json_val; std::string serialized; EXPECT_TRUE(JSONWriter::Write(value, &serialized)); }
diff --git a/base/test/values_test_util.cc b/base/test/values_test_util.cc index 82d048d..5a7c560 100644 --- a/base/test/values_test_util.cc +++ b/base/test/values_test_util.cc
@@ -198,13 +198,12 @@ // This is almost the same logic as ParseJson, but the parser uses stricter // options for JSON data that is assumed to be generated by the code under // test rather than written by hand as part of a unit test. - JSONReader::ValueWithError ret = - JSONReader::ReadAndReturnValueWithError(json, JSON_PARSE_RFC); - if (!ret.value) { - *listener << "Failed to parse \"" << json << "\": " << ret.error_message; + auto ret = JSONReader::ReadAndReturnValueWithError(json, JSON_PARSE_RFC); + if (!ret.has_value()) { + *listener << "Failed to parse \"" << json << "\": " << ret.error().message; return false; } - return MatchAndExplain(*ret.value, listener); + return MatchAndExplain(*ret, listener); } bool IsJsonMatcher::MatchAndExplain( @@ -234,14 +233,14 @@ } Value ParseJson(StringPiece json) { - JSONReader::ValueWithError result = JSONReader::ReadAndReturnValueWithError( + auto result = JSONReader::ReadAndReturnValueWithError( json, JSON_PARSE_CHROMIUM_EXTENSIONS | JSON_ALLOW_TRAILING_COMMAS); - if (!result.value) { + if (!result.has_value()) { ADD_FAILURE() << "Failed to parse \"" << json - << "\": " << result.error_message; + << "\": " << result.error().message; return Value(); } - return std::move(result.value.value()); + return std::move(*result); } std::unique_ptr<Value> ParseJsonDeprecated(StringPiece json) {
diff --git a/build/fuchsia/linux_internal.sdk.sha1 b/build/fuchsia/linux_internal.sdk.sha1 index 6197b01..22781644 100644 --- a/build/fuchsia/linux_internal.sdk.sha1 +++ b/build/fuchsia/linux_internal.sdk.sha1
@@ -1 +1 @@ -8.20220624.3.1 +8.20220626.1.1
diff --git a/chrome/VERSION b/chrome/VERSION index ea329e37..c5df2c53 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=105 MINOR=0 -BUILD=5142 +BUILD=5145 PATCH=0
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt index 2653080..2cd3405 100644 --- a/chrome/android/profiles/newest.txt +++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-105.0.5134.0_rc-r1-merged.afdo.bz2 +chromeos-chrome-amd64-105.0.5140.0_rc-r1-merged.afdo.bz2
diff --git a/chrome/app/resources/generated_resources_en-GB.xtb b/chrome/app/resources/generated_resources_en-GB.xtb index 87438516..5c45e66 100644 --- a/chrome/app/resources/generated_resources_en-GB.xtb +++ b/chrome/app/resources/generated_resources_en-GB.xtb
@@ -159,6 +159,7 @@ <translation id="1148063863818152153">Your device EID</translation> <translation id="1148624853678088576">You’re all set!</translation> <translation id="1149401351239820326">Expiry month</translation> +<translation id="1149483087970735785">Assistive technology</translation> <translation id="1149725087019908252">Scanning <ph name="FILE_NAME" /></translation> <translation id="1150490752229770117">This is the last automatic software and security update for this <ph name="DEVICE_TYPE" />. To get future updates, upgrade to a newer model. <ph name="LINK_BEGIN" />Learn more<ph name="LINK_END" /></translation> <translation id="1150565364351027703">Sunglasses</translation> @@ -732,6 +733,7 @@ <translation id="1680849702532889074">An error occurred during installation of your Linux application.</translation> <translation id="16815041330799488">Do not allow sites to see text and images copied to the clipboard</translation> <translation id="1682548588986054654">New Incognito Window</translation> +<translation id="1682696837763999627">Big mouse cursor</translation> <translation id="1682867089915960590">Turn on Caret Browsing?</translation> <translation id="1686550358074589746">Enable glide typing</translation> <translation id="168715261339224929">To get your bookmarks on all your devices, turn on sync.</translation> @@ -843,6 +845,7 @@ <translation id="178092663238929451">Set up Nearby Share to receive and send files with people around you</translation> <translation id="1781291988450150470">Current PIN</translation> <translation id="1781502536226964113">Open the New Tab page</translation> +<translation id="1781553166608855614">Spoken language</translation> <translation id="1781771911845953849">Accounts and sync</translation> <translation id="1781979858217752599">Share window audio</translation> <translation id="1782101999402987960">Updates are blocked by your administrator</translation> @@ -1571,6 +1574,7 @@ <translation id="244475495405467108">Close Tabs to the Left</translation> <translation id="2445081178310039857">Extension root directory is required.</translation> <translation id="2445484935443597917">Create a new profile</translation> +<translation id="2445726032315793326">Partial magnifier</translation> <translation id="244641233057214044">Related to your search</translation> <translation id="2448312741937722512">Types</translation> <translation id="2448810255793562605">Switch Access auto-scan</translation> @@ -1863,6 +1867,7 @@ <translation id="2724841811573117416">WebRTC logs</translation> <translation id="272488616838512378">Unit conversion</translation> <translation id="2725200716980197196">Network connectivity restored</translation> +<translation id="272741954544380994">Search image with <ph name="VISUAL_SEARCH_PROVIDER" /></translation> <translation id="2727633948226935816">Don't remind me again</translation> <translation id="2727712005121231835">Actual Size</translation> <translation id="2729314457178420145">Also clear browsing data (<ph name="URL" />) which may sign you out of Google.com. <ph name="LEARN_MORE" /></translation> @@ -2204,6 +2209,7 @@ <translation id="3030967311408872958">Sunset to sunrise</translation> <translation id="3031417829280473749">Agent X</translation> <translation id="3031557471081358569">Select items to be imported:</translation> +<translation id="3032204772252313646">Auto captions</translation> <translation id="3033348223765101500">Control your data</translation> <translation id="3034627908241330765">Another Steam setup is running. Please wait for it to complete before running setup again.</translation> <translation id="3036327949511794916">The deadline to return this <ph name="DEVICE_TYPE" /> has passed.</translation> @@ -2636,6 +2642,7 @@ <translation id="3480612136143976912">Customise caption size and style for Live Caption. Some apps and sites will also use this setting.</translation> <translation id="3480827850068960424">Found <ph name="NUM" /> tabs</translation> <translation id="3481268647794498892">Opening in <ph name="ALTERNATIVE_BROWSER_NAME" /> in <ph name="COUNTDOWN_SECONDS" /> seconds</translation> +<translation id="348268549820508141">Speech recognition</translation> <translation id="3482719661246593752"><ph name="ORIGIN" /> can view the following files</translation> <translation id="3484273680291419129">Removing harmful software...</translation> <translation id="3484869148456018791">Get new certificate</translation> @@ -2794,6 +2801,7 @@ <translation id="3640214691812501263">Add "<ph name="EXTENSION_NAME" />" for <ph name="USER_NAME" />?</translation> <translation id="3640613767643722554">Teach your Assistant to recognise your voice</translation> <translation id="3641456520301071208">Sites can ask for your location</translation> +<translation id="3642070413432681490">Circle cursor</translation> <translation id="3642699533549879077">When someone else looks at your screen, you'll get an alert and notification content will be hidden.</translation> <translation id="3645372836428131288">Move slightly to capture a different part of the fingerprint.</translation> <translation id="3647998456578545569">{COUNT,plural, =1{<ph name="ATTACHMENTS" /> received from <ph name="DEVICE_NAME" />}other{<ph name="ATTACHMENTS" /> received from <ph name="DEVICE_NAME" />}}</translation> @@ -2828,6 +2836,7 @@ <translation id="368019053277764111">Open search in side panel</translation> <translation id="3680683624079082902">Text-to-speech voice</translation> <translation id="3681311097828166361">Thank you for your feedback. You are offline now, and your report will be sent later.</translation> +<translation id="3681548574519135185">Focus ring</translation> <translation id="3682824389861648626">Movement threshold</translation> <translation id="3683524264665795342"><ph name="APP_NAME" /> screen sharing request</translation> <translation id="3685598397738512288">Linux USB preferences</translation> @@ -3127,6 +3136,7 @@ <translation id="3948507072814225786"><ph name="ORIGIN" /> can edit files in the following folders</translation> <translation id="394984172568887996">Imported From IE</translation> <translation id="3950820424414687140">Sign in</translation> +<translation id="3950841222883198950">Voice typing</translation> <translation id="3953834000574892725">My accounts</translation> <translation id="3954354850384043518">In progress</translation> <translation id="3954469006674843813"><ph name="WIDTH" /> x <ph name="HEIGHT" /> (<ph name="REFRESH_RATE" /> Hertz)</translation> @@ -3187,6 +3197,7 @@ <translation id="3994878504415702912">&Zoom</translation> <translation id="3995138139523574647">USB-C device (right-hand-side back port)</translation> <translation id="3995963973192100066">Play animation</translation> +<translation id="4001540981461989979">Highlight mouse cursor when moving</translation> <translation id="4002329649066944389">Manage site specific exceptions</translation> <translation id="4002440992267487163">Pin setup</translation> <translation id="4005817994523282006">Time zone detection method</translation> @@ -3420,6 +3431,7 @@ <translation id="4252996741873942488"><ph name="WINDOW_TITLE" /> – Tab content shared</translation> <translation id="4253168017788158739">Note</translation> <translation id="4253183225471855471">No network found. Please insert your SIM and reboot your device before trying again.</translation> +<translation id="4254414375763576535">Big pointer</translation> <translation id="4254813446494774748">Translation Language:</translation> <translation id="425573743389990240">Battery Discharge Rate in Watts (Negative value means battery is charging)</translation> <translation id="4256316378292851214">Sa&ve Video As...</translation> @@ -3570,6 +3582,7 @@ <translation id="4400963414856942668">You can click the star to bookmark a tab</translation> <translation id="4401912261345737180">Connect with a code to cast</translation> <translation id="4402755511846832236">Block sites from knowing when you're actively using this device</translation> +<translation id="4403012369005671154">Speech-to-text</translation> <translation id="4403266582403435904">Easily restore data or switch devices at any time. Backups are uploaded to Google and encrypted using your child's Google Account password.</translation> <translation id="4403775189117163360">Choose a different folder</translation> <translation id="4404136731284211429">Scan again</translation> @@ -3914,6 +3927,7 @@ <translation id="4733161265940833579"><ph name="BATTERY_PERCENTAGE" />% (left)</translation> <translation id="4733793249294335256">Location</translation> <translation id="473546211690256853">This account is managed by <ph name="DOMAIN" /></translation> +<translation id="4735506354605317060">Circle pointer</translation> <translation id="4735803855089279419">The system failed to determine device identifiers for this device.</translation> <translation id="4736292055110123391">Sync your bookmarks, passwords, history and more on all your devices</translation> <translation id="473775607612524610">Update</translation> @@ -3934,6 +3948,7 @@ <translation id="4759202969060787081">Don’t open</translation> <translation id="4759238208242260848">Downloads</translation> <translation id="4761104368405085019">Use your microphone</translation> +<translation id="4762489666082647806">Pointer colour</translation> <translation id="4762718786438001384">Device disk space critically low</translation> <translation id="4763408175235639573">The following cookies were set when you viewed this page</translation> <translation id="4765524037138975789">{MONTHS,plural, =1{This device will be saved for one month and you can connect without a code next time. This is set by your administrator.}other{This device will be saved for {MONTHS} months and you can connect without a code next time. This is set by your administrator.}}</translation> @@ -4029,6 +4044,7 @@ <translation id="485053257961878904">Could not set up notifications syncing</translation> <translation id="4850886885716139402">View</translation> <translation id="485088796993065002">Sites might play sound to provide audio for music, videos and other media</translation> +<translation id="4852916668365817106">Mouse colour</translation> <translation id="4853020600495124913">Open in &new window</translation> <translation id="4854317507773910281">Choose parent account for approval</translation> <translation id="485480310608090163">More settings and permissions</translation> @@ -4082,6 +4098,7 @@ <translation id="4893522937062257019">On the lock screen</translation> <translation id="4897496410259333978">For more information, contact your administrator.</translation> <translation id="4898011734382862273">The certificate '<ph name="CERTIFICATE_NAME" />' represents a Certification Authority</translation> +<translation id="4899052647152077033">Invert colours</translation> <translation id="4899696330053002588">Contains ads</translation> <translation id="489985760463306091">To finish removing harmful software, restart your computer</translation> <translation id="4900392736118574277">Your start-up page was changed to <ph name="URL" />.</translation> @@ -4288,6 +4305,7 @@ <translation id="5125751979347152379">Invalid URL.</translation> <translation id="5125967981703109366">About this card</translation> <translation id="5126611267288187364">View changes</translation> +<translation id="5126735406625174440">Setup is complete!</translation> <translation id="5127242257756472928">Not allowed to use info about your screens to open and place windows</translation> <translation id="5127620150973591153">Secure connection ID: <ph name="TOKEN" /></translation> <translation id="5127805178023152808">Sync is off</translation> @@ -4572,6 +4590,7 @@ <translation id="5414566801737831689">Read the icons of the websites that you visit</translation> <translation id="5414836363063783498">Verifying…</translation> <translation id="5417312524372586921">Browser themes</translation> +<translation id="541737483547792035">Magnify screen</translation> <translation id="5419405654816502573">Voice match</translation> <translation id="5420274697768050645">Require password to unlock device for added security</translation> <translation id="5420438158931847627">Determines sharpness of text and images</translation> @@ -4617,6 +4636,7 @@ <translation id="5459864179070366255">Continue to install</translation> <translation id="5461050611724244538">Connection lost with your phone</translation> <translation id="5463275305984126951">Index of <ph name="LOCATION" /></translation> +<translation id="5463450804024056231">Sign up for <ph name="DEVICE_TYPE" /> emails</translation> <translation id="5463625433003343978">Finding devices…</translation> <translation id="5463845647891602726">To increase free space, delete files from your device</translation> <translation id="5463856536939868464">Menu containing hidden bookmarks</translation> @@ -4765,6 +4785,7 @@ <translation id="5588033542900357244">(<ph name="RATING_COUNT" />)</translation> <translation id="558918721941304263">Loading apps...</translation> <translation id="5592595402373377407">Not enough data available yet.</translation> +<translation id="5595307023264033512">Total storage used by sites: <ph name="TOTAL_USAGE" /></translation> <translation id="5595485650161345191">Edit address</translation> <translation id="5596627076506792578">More options</translation> <translation id="5600348067066185292">Installation takes a few easy steps. You’ll have another chance to confirm before changes are made to your computer.</translation> @@ -4967,6 +4988,7 @@ <translation id="5801568494490449797">Preferences</translation> <translation id="5804241973901381774">Permissions</translation> <translation id="5805697420284793859">Window manager</translation> +<translation id="5806447147478173900">Total storage used by displayed sites: <ph name="TOTAL_USAGE" /></translation> <translation id="5806773519584576205">0° (Default)</translation> <translation id="5810809306422959727">This account isn't eligible for parental controls</translation> <translation id="5811614940486072060">This file is not commonly downloaded and may be dangerous</translation> @@ -5643,6 +5665,7 @@ <translation id="6474884162850599008">Disconnect Google Drive account</translation> <translation id="6475294023568239942">Free up disk space or resize the Linux disk in settings</translation> <translation id="6476138569087741884">Full-screen zoom level</translation> +<translation id="6476482583633999078">Speech speed</translation> <translation id="6477822444490674459">Notification syncing is not supported for phones in a work profile. <ph name="LINK_BEGIN" />Learn more<ph name="LINK_END" /></translation> <translation id="6478248366783946499">Keep dangerous file?</translation> <translation id="6480327114083866287">Managed by <ph name="MANAGER" /></translation> @@ -5919,6 +5942,7 @@ <translation id="6750757184909117990">Disable mobile</translation> <translation id="6751344591405861699"><ph name="WINDOW_TITLE" /> (Incognito)</translation> <translation id="6756157672127672536">The Files app provides Quick access to files that you've saved on Google Drive, external storage or your Chrome OS device.</translation> +<translation id="6756643207511618722">Speech engines</translation> <translation id="6758056191028427665">Let us know how we’re doing.</translation> <translation id="6759193508432371551">Factory reset</translation> <translation id="6761431452438552910">Make sure that your Bluetooth device is in pairing mode and nearby. Only pair with devices that you trust.</translation> @@ -6067,6 +6091,7 @@ <translation id="6889957081990109136">Switch hasn’t been assigned yet</translation> <translation id="689007770043972343">Try dragging other open tabs to your group</translation> <translation id="6892812721183419409">Open Link as <ph name="USER" /></translation> +<translation id="6893164346922798247">eSpeak</translation> <translation id="6895032998810961280">Report details to Google about harmful software, system settings and processes that were found on your computer during this clean up</translation> <translation id="6896758677409633944">Copy</translation> <translation id="6897363604023044284">Choose sites to clear</translation> @@ -6134,6 +6159,7 @@ <translation id="6960507406838246615">Linux update required</translation> <translation id="6960648667961844909">Couldn’t download <ph name="LANGUAGE" /> speech files. Download will be attempted later. Speech is sent to Google for processing until download is completed.</translation> <translation id="696103774840402661">All files and local data for all users on this <ph name="DEVICE_TYPE" /> has been permanently deleted.</translation> +<translation id="6963872466817251924">Text cursor highlighter</translation> <translation id="6964390816189577014">Hero</translation> <translation id="6964760285928603117">Remove From Group</translation> <translation id="6965382102122355670">OK</translation> @@ -6333,6 +6359,7 @@ <translation id="7160182524506337403">You can now view your phone's notifications</translation> <translation id="7163202347044721291">Verifying activation code…</translation> <translation id="716640248772308851">"<ph name="EXTENSION" />" can read images, video and sound files in the ticked locations.</translation> +<translation id="7167327771183668296">Auto clicks</translation> <translation id="7167486101654761064">&Always open files of this type</translation> <translation id="716775164025088943">Your bookmarks, history, passwords and more will no longer be synced.</translation> <translation id="716810439572026343">Downloading <ph name="FILE_NAME" /></translation> @@ -7215,6 +7242,7 @@ <translation id="8017176852978888182">Linux shared directories</translation> <translation id="8017335670460187064"><ph name="LABEL" /></translation> <translation id="8017679124341497925">Shortcut edited</translation> +<translation id="8018140635032674020">Open the Explore app after setup to start gaming. Access hundreds of the latest games, see gaming offers and get an immersive gaming experience.</translation> <translation id="8018298733481692628">Delete this profile?</translation> <translation id="8018313076035239964">Control what information websites can use and what content they can show you</translation> <translation id="8023133589013344428">Manage languages in Chrome OS Flex settings</translation> @@ -7425,6 +7453,7 @@ <translation id="8213449224684199188">Photo mode entered</translation> <translation id="8214489666383623925">Open File...</translation> <translation id="8215129063232901118">Access your phone's capabilities from your <ph name="DEVICE_TYPE" /></translation> +<translation id="8217212468862726597">Highlight pointer</translation> <translation id="8217399928341212914">Continue blocking automatic downloads of multiple files</translation> <translation id="822050276545350872">From here on out, no waiting required</translation> <translation id="8221491193165283816">You usually block notifications. To let this site notify you, click here.</translation> @@ -7663,6 +7692,7 @@ <translation id="8457451314607652708">Import bookmarks</translation> <translation id="8458341576712814616">Shortcut</translation> <translation id="8458627787104127436">Open all (<ph name="URL_COUNT" />) in new window</translation> +<translation id="8459940671591713946">Get ready to start gaming</translation> <translation id="8460448946170646641">Review key privacy and security controls</translation> <translation id="8460490661223303637">To save memory, Chrome removed some content</translation> <translation id="8460932807646981183">Manage search engines and site search</translation> @@ -7981,6 +8011,7 @@ <ph name="DOMAIN" /> requires you to keep your smart card inserted.}}</translation> <translation id="8776294611668764629">Your organisation has blocked this file because it is too big for a security check. You can open files up to 50 MB.</translation> <translation id="8777628254805677039">root password</translation> +<translation id="8778393144535275552">Clear displayed data</translation> <translation id="8779944680596936487">Sites can only use cookies to see your browsing activity on their own site</translation> <translation id="8780123805589053431">Get image descriptions from Google</translation> <translation id="8780443667474968681">Voice search has been turned off.</translation> @@ -8459,6 +8490,7 @@ <translation id="957960681186851048">This site attempted to download multiple files automatically</translation> <translation id="960987915827980018">About 1 hour left</translation> <translation id="962802172452141067">Bookmark folder tree</translation> +<translation id="963000966785016697">Search image with <ph name="VISUAL_SEARCH_PROVIDER" /></translation> <translation id="964286338916298286">Your IT administrator has disabled Chrome Goodies for your device.</translation> <translation id="964439421054175458">{NUM_APLLICATIONS,plural, =1{Application}other{Applications}}</translation> <translation id="964790508619473209">Screen arrangement</translation> @@ -8475,6 +8507,7 @@ <translation id="971774202801778802">Bookmark URL</translation> <translation id="972996901592717370">Touch the power button with your finger. Your data is stored securely and never leaves your <ph name="DEVICE_TYPE" />.</translation> <translation id="973473557718930265">Quit</translation> +<translation id="973558314812359997">Mouse size</translation> <translation id="975893173032473675">Language to Translate into</translation> <translation id="976499800099896273">Autocorrect undo dialogue is shown for <ph name="TYPED_WORD" /> corrected to <ph name="CORRECTED_WORD" />. Press up arrow to access, escape to ignore.</translation> <translation id="978146274692397928">Initial punctuation width is Full</translation>
diff --git a/chrome/app/resources/generated_resources_te.xtb b/chrome/app/resources/generated_resources_te.xtb index 9eb46ccb9..aa98189 100644 --- a/chrome/app/resources/generated_resources_te.xtb +++ b/chrome/app/resources/generated_resources_te.xtb
@@ -40,7 +40,7 @@ <translation id="1039337018183941703">ఫైల్ చెల్లదు లేదా పాడైంది</translation> <translation id="1041175011127912238">ఈ పేజీ ప్రతిస్పందించడం లేదు</translation> <translation id="1041263367839475438">అందుబాటులో ఉన్న పరికరాలు</translation> -<translation id="1042174272890264476">మీ కంప్యూటర్లో కూడా <ph name="SHORT_PRODUCT_NAME" /> యొక్క అంతర్గత RLZ లైబ్రరీ ఉంటుంది. RLZ సెర్చ్లను మరియు నిర్దిష్ట ప్రమోషనల్ ప్రచారం ద్వారా ఉపయోగించబడిన <ph name="SHORT_PRODUCT_NAME" /> వినియోగాన్ని లెక్కించడానికి, ప్రత్యేకం కానటువంటి, వ్యక్తిగతంగా గుర్తించలేని ట్యాగ్ను సమర్పిస్తుంది. ఈ లేబుళ్లు కొన్నిసార్లు <ph name="PRODUCT_NAME" />లోని Google శోధన ప్రశ్నలలో కనిపిస్తాయి.</translation> +<translation id="1042174272890264476">మీ కంప్యూటర్లో కూడా <ph name="SHORT_PRODUCT_NAME" /> యొక్క అంతర్గత RLZ లైబ్రరీ ఉంటుంది. RLZ సెర్చ్లను మరియు నిర్దిష్ట ప్రమోషనల్ ప్రచారం ద్వారా ఉపయోగించబడిన <ph name="SHORT_PRODUCT_NAME" /> వినియోగాన్ని లెక్కించడానికి, ప్రత్యేకం కానటువంటి, వ్యక్తిగతంగా గుర్తించలేని ట్యాగ్ను సమర్పిస్తుంది. ఈ లేబుళ్లు కొన్నిసార్లు <ph name="PRODUCT_NAME" />లోని Google Search ప్రశ్నలలో కనిపిస్తాయి.</translation> <translation id="1043505821207197890">ఏదో తప్పు జరిగింది. Linux పాక్షికంగా మాత్రమే అప్గ్రేడ్ అయి ఉండవచ్చు. మరింత సమాచారం కోసం లాగ్స్ను రివ్యూ చేయండి. Files > నా ఫైల్స్ > <ph name="LOG_FILE" /> అనే సెట్టింగ్లో లాగ్స్ సేవ్ చేయబడ్డాయి</translation> <translation id="1043818413152647937">అలాగే, ఈ యాప్ల నుండి డేటాను క్లియర్ చేయాలా?</translation> <translation id="1043824690776631483">ఈ సైట్కు వెళ్లడానికి మీకు అనుమతి అవసరం. ఇందులో అనుచితమైన కంటెంట్ ఉండవచ్చు.</translation> @@ -6360,7 +6360,7 @@ <translation id="7193374945610105795"><ph name="ORIGIN" /> కోసం పాస్వర్డ్లు సేవ్ చేయబడలేదు</translation> <translation id="7194873994243265344">ఈ ఫైల్ ఎన్క్రిప్ట్ చేయబడింది, కాబట్టి మీ సంస్థ దీన్ని బ్లాక్ చేసింది. డిక్రిప్ట్ చేయమని ఫైల్ ఓనర్ను అడగండి.</translation> <translation id="7196913789568937443">Google Driveకు బ్యాకప్ చేయండి. ఏ సమయంలో అయినా సులభంగా మీ డేటాని పునరుద్ధరించండి లేదా పరికరాన్ని మార్చండి. ఈ బ్యాకప్లో యాప్ డేటా ఉంటుంది. బ్యాకప్లు Googleకి అప్లోడ్ చేయబడతాయి మరియు మీ Google ఖాతా పాస్వర్డ్ని ఉపయోగించి ఎన్క్రిప్ట్ చేయబడతాయి. <ph name="BEGIN_LINK1" />మరింత తెలుసుకోండి<ph name="END_LINK1" /></translation> -<translation id="7197190419934240522">మీరు బ్రౌజ్ చేసే ప్రతిసారి Google శోధన మరియు Google స్మార్ట్లను పొందండి</translation> +<translation id="7197190419934240522">మీరు బ్రౌజ్ చేసే ప్రతిసారి Google Search మరియు Google స్మార్ట్లను పొందండి</translation> <translation id="719791532916917144">కీబోర్డ్ షార్ట్కట్</translation> <translation id="7198503619164954386">మీరు ఎంటర్ప్రైజ్-ఎన్రోల్ చేసిన పరికరంలో ఉండాలి</translation> <translation id="7199158086730159431">సహా&యం పొందండి</translation>
diff --git a/chrome/browser/apps/app_discovery_service/recommended_arc_app_fetcher_unittest.cc b/chrome/browser/apps/app_discovery_service/recommended_arc_app_fetcher_unittest.cc index c3538114..56a2187 100644 --- a/chrome/browser/apps/app_discovery_service/recommended_arc_app_fetcher_unittest.cc +++ b/chrome/browser/apps/app_discovery_service/recommended_arc_app_fetcher_unittest.cc
@@ -99,8 +99,7 @@ EXPECT_EQ(play_extras->GetContainsAds(), true); EXPECT_EQ(play_extras->GetOptimizedForChrome(), true); })); - absl::optional<base::Value> output = - base::JSONReader::ReadAndReturnValueWithError(response).value; + auto output = base::JSONReader::ReadAndReturnValueWithError(response); ASSERT_TRUE(output.has_value()); arc_app_fetcher()->OnLoadSuccess(std::move(output.value())); }
diff --git a/chrome/browser/ash/arc/input_overlay/actions/dependent_position_unittest.cc b/chrome/browser/ash/arc/input_overlay/actions/dependent_position_unittest.cc index 9c744e9..1e1aa7d 100644 --- a/chrome/browser/ash/arc/input_overlay/actions/dependent_position_unittest.cc +++ b/chrome/browser/ash/arc/input_overlay/actions/dependent_position_unittest.cc
@@ -173,10 +173,10 @@ // Parse valid Json for aspect ratio dependent position. std::unique_ptr<DependentPosition> pos = std::make_unique<DependentPosition>(); - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonAspectRatio); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_TRUE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_TRUE(pos->ParseFromJson(*json_value)); EXPECT_TRUE(std::abs(*pos->aspect_ratio() - 1.5) < kEpsilon); EXPECT_TRUE(std::abs(*pos->x_on_y() - 0.8) < kEpsilon); EXPECT_TRUE(std::abs(*pos->y_on_x() - 0.6) < kEpsilon); @@ -185,15 +185,15 @@ pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kInValidJsonAspectRatioNoXonY); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_FALSE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_FALSE(pos->ParseFromJson(*json_value)); // Parse valid Json for height dependent position. pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonHeightDependent); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_TRUE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_TRUE(pos->ParseFromJson(*json_value)); EXPECT_TRUE(std::abs(*pos->x_on_y() - 0.8) < kEpsilon); // Parse invalid Json for non-aspect-ratio-dependent position - present both @@ -201,23 +201,23 @@ pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError(kInvalidJsonBothDependent); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_FALSE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_FALSE(pos->ParseFromJson(*json_value)); // Parse Json with invalid x_on_y value. pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError(kInValidXonYJson); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_FALSE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_FALSE(pos->ParseFromJson(*json_value)); } TEST(DependentPositionTest, TestCalculatePositionHeightDependent) { // Parse the position with the default anchor. auto pos = std::make_unique<DependentPosition>(); - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonHeightDependent); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - pos->ParseFromJson(json_value.value.value()); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + pos->ParseFromJson(*json_value); gfx::RectF bounds(200, 400); gfx::PointF target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 160) < kEpsilon); @@ -233,7 +233,7 @@ pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kValidJsonHeightDepAnchorBR); - pos->ParseFromJson(json_value.value.value()); + pos->ParseFromJson(*json_value); bounds.set_height(400); target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 40) < kEpsilon); @@ -249,7 +249,7 @@ pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kValidJsonHeightDepAnchorBL); - pos->ParseFromJson(json_value.value.value()); + pos->ParseFromJson(*json_value); bounds.set_height(400); target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 160) < kEpsilon); @@ -259,7 +259,7 @@ pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kValidJsonHeightDepAnchorTR); - pos->ParseFromJson(json_value.value.value()); + pos->ParseFromJson(*json_value); bounds.set_height(400); target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 40) < kEpsilon); @@ -269,10 +269,10 @@ TEST(DependentPositionTest, TestCalculatePositionWidthDependent) { // Parse the position with the default anchor. auto pos = std::make_unique<DependentPosition>(); - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonWidthDependent); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - pos->ParseFromJson(json_value.value.value()); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + pos->ParseFromJson(*json_value); gfx::RectF bounds(200, 400); gfx::PointF target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 100) < kEpsilon); @@ -288,7 +288,7 @@ pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonWidthDepAnchorBR); - pos->ParseFromJson(json_value.value.value()); + pos->ParseFromJson(*json_value); bounds.set_width(200); target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 100) < kEpsilon); @@ -304,7 +304,7 @@ pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonWidthDepAnchorBL); - pos->ParseFromJson(json_value.value.value()); + pos->ParseFromJson(*json_value); bounds.set_width(200); target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 100) < kEpsilon); @@ -314,7 +314,7 @@ pos = std::make_unique<DependentPosition>(); json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonWidthDepAnchorTR); - pos->ParseFromJson(json_value.value.value()); + pos->ParseFromJson(*json_value); bounds.set_width(200); target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 100) < kEpsilon); @@ -323,10 +323,10 @@ TEST(DependentPositionTest, TestCalculatePositionAspectRatioDependent) { auto pos = std::make_unique<DependentPosition>(); - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonAspectRatio); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - pos->ParseFromJson(json_value.value.value()); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + pos->ParseFromJson(*json_value); gfx::RectF bounds(200, 400); gfx::PointF target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 100) < kEpsilon);
diff --git a/chrome/browser/ash/arc/input_overlay/actions/position_unittest.cc b/chrome/browser/ash/arc/input_overlay/actions/position_unittest.cc index c05b63e..d76ffd5f 100644 --- a/chrome/browser/ash/arc/input_overlay/actions/position_unittest.cc +++ b/chrome/browser/ash/arc/input_overlay/actions/position_unittest.cc
@@ -104,10 +104,9 @@ TEST(PositionTest, TestParseJson) { // Parse valid Json. std::unique_ptr<Position> pos = std::make_unique<Position>(); - base::JSONReader::ValueWithError json_value = - base::JSONReader::ReadAndReturnValueWithError(kValidJson); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_TRUE(pos->ParseFromJson(json_value.value.value())); + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJson); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_TRUE(pos->ParseFromJson(*json_value)); EXPECT_TRUE(pos->anchor() == gfx::PointF(0, 0)); EXPECT_TRUE(pos->anchor_to_target() == gfx::Vector2dF(0.5, 0.5)); pos.reset(); @@ -116,8 +115,8 @@ pos = std::make_unique<Position>(); json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonNoAnchorPoint); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_TRUE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_TRUE(pos->ParseFromJson(*json_value)); EXPECT_TRUE(pos->anchor() == gfx::PointF(0, 0)); EXPECT_TRUE(pos->anchor_to_target() == gfx::Vector2dF(0.1796875, 0.25)); pos.reset(); @@ -126,49 +125,48 @@ pos = std::make_unique<Position>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kInValidJsonWrongAnchorPoint); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_FALSE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_FALSE(pos->ParseFromJson(*json_value)); pos.reset(); // Parse invalid Json with incomplete anchor point. pos = std::make_unique<Position>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kInValidJsonIncompleteAnchorPoint); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_FALSE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_FALSE(pos->ParseFromJson(*json_value)); pos.reset(); // Parse invalid Json with too much values for vector to target. pos = std::make_unique<Position>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kInValidJsonTooMuchVectorToTarget); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_FALSE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_FALSE(pos->ParseFromJson(*json_value)); pos.reset(); // Parse invalid Json with wrong vector to target. pos = std::make_unique<Position>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kInValidJsonWrongVectorToTarget); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_FALSE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_FALSE(pos->ParseFromJson(*json_value)); pos.reset(); // Parse invalid Json with target position outside of the window. pos = std::make_unique<Position>(); json_value = base::JSONReader::ReadAndReturnValueWithError(kInValidJsonOutSideWindow); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - EXPECT_FALSE(pos->ParseFromJson(json_value.value.value())); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + EXPECT_FALSE(pos->ParseFromJson(*json_value)); pos.reset(); } TEST(PositionTest, TestCalculatePosition) { // Calculate the target position in the center. std::unique_ptr<Position> pos = std::make_unique<Position>(); - base::JSONReader::ValueWithError json_value = - base::JSONReader::ReadAndReturnValueWithError(kValidJson); - pos->ParseFromJson(json_value.value.value()); + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJson); + pos->ParseFromJson(*json_value); gfx::RectF bounds(200, 400); gfx::PointF target = pos->CalculatePosition(bounds); EXPECT_TRUE(target == gfx::PointF(100, 200)); @@ -178,7 +176,7 @@ pos = std::make_unique<Position>(); json_value = base::JSONReader::ReadAndReturnValueWithError( kJsonCalculateTargetUpperLeft); - pos->ParseFromJson(json_value.value.value()); + pos->ParseFromJson(*json_value); target = pos->CalculatePosition(bounds); EXPECT_TRUE(std::abs(target.x() - 40) < 0.0001); EXPECT_TRUE(std::abs(target.y() - 80) < 0.0001);
diff --git a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager.cc b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager.cc index e986093d..9d6217a0 100644 --- a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager.cc +++ b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager.cc
@@ -129,14 +129,13 @@ LOG(WARNING) << "No content for: " << package_name; return nullptr; } - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError(json_file); - DCHECK(result.value) << "Could not load input overlay data file: " - << result.error_message; - if (!result.value) + auto result = base::JSONReader::ReadAndReturnValueWithError(json_file); + DCHECK(result.has_value()) + << "Could not load input overlay data file: " << result.error().message; + if (!result.has_value()) return nullptr; - base::Value& root = result.value.value(); + base::Value& root = *result; std::unique_ptr<input_overlay::TouchInjector> injector = std::make_unique<input_overlay::TouchInjector>( top_level_window,
diff --git a/chrome/browser/ash/arc/input_overlay/display_overlay_controller_unittest.cc b/chrome/browser/ash/arc/input_overlay/display_overlay_controller_unittest.cc index e7672e9b..cd8cfb9b 100644 --- a/chrome/browser/ash/arc/input_overlay/display_overlay_controller_unittest.cc +++ b/chrome/browser/ash/arc/input_overlay/display_overlay_controller_unittest.cc
@@ -65,9 +65,8 @@ arc_test_window_->GetWindow(), base::BindLambdaForTesting( [&](std::unique_ptr<AppDataProto>, const std::string&) {})); - base::JSONReader::ValueWithError json_value = - base::JSONReader::ReadAndReturnValueWithError(kValidJson); - injector_->ParseActions(json_value.value.value()); + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJson); + injector_->ParseActions(*json_value); controller_ = std::make_unique<DisplayOverlayController>(injector_.get(), false); }
diff --git a/chrome/browser/ash/arc/input_overlay/touch_injector_unittest.cc b/chrome/browser/ash/arc/input_overlay/touch_injector_unittest.cc index b60af11de..cc12ddca 100644 --- a/chrome/browser/ash/arc/input_overlay/touch_injector_unittest.cc +++ b/chrome/browser/ash/arc/input_overlay/touch_injector_unittest.cc
@@ -307,9 +307,9 @@ }; TEST_F(TouchInjectorTest, TestEventRewriterActionTapKey) { - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonActionTapKey); - injector_->ParseActions(json_value.value.value()); + injector_->ParseActions(*json_value); // Extra Action with the same ID is removed. EXPECT_EQ(2, (int)injector_->actions().size()); auto* actionA = injector_->actions()[0].get(); @@ -461,10 +461,10 @@ TEST_F(TouchInjectorTest, TestEventRewriterActionTapMouse) { injector_->set_enable_mouse_lock(true); - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonActionTapMouse); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - injector_->ParseActions(json_value.value.value()); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + injector_->ParseActions(*json_value); EXPECT_EQ(2u, injector_->actions().size()); injector_->RegisterEventRewriter(); @@ -524,9 +524,9 @@ } TEST_F(TouchInjectorTest, TestEventRewriterActionMoveKey) { - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonActionMoveKey); - injector_->ParseActions(json_value.value.value()); + injector_->ParseActions(*json_value); EXPECT_EQ(1u, injector_->actions().size()); auto* action = injector_->actions()[0].get(); injector_->RegisterEventRewriter(); @@ -620,10 +620,10 @@ TEST_F(TouchInjectorTest, TestEventRewriterActionMoveMouse) { injector_->set_enable_mouse_lock(true); - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonActionMoveMouse); - EXPECT_FALSE(!json_value.value || !json_value.value->is_dict()); - injector_->ParseActions(json_value.value.value()); + EXPECT_TRUE(json_value.has_value() && json_value->is_dict()); + injector_->ParseActions(*json_value); EXPECT_EQ(2u, injector_->actions().size()); injector_->RegisterEventRewriter(); auto* hover_action = static_cast<ActionMove*>(injector_->actions()[0].get()); @@ -701,9 +701,9 @@ TEST_F(TouchInjectorTest, TestEventRewriterTouchToTouch) { // Setup. - base::JSONReader::ValueWithError json_value = + auto json_value = base::JSONReader::ReadAndReturnValueWithError(kValidJsonActionTapKey); - injector_->ParseActions(json_value.value.value()); + injector_->ParseActions(*json_value); injector_->RegisterEventRewriter(); // Verify initial states.
diff --git a/chrome/browser/ash/customization/customization_document.cc b/chrome/browser/ash/customization/customization_document.cc index 5d00ef0..bbc9c442 100644 --- a/chrome/browser/ash/customization/customization_document.cc +++ b/chrome/browser/ash/customization/customization_document.cc
@@ -269,17 +269,16 @@ bool CustomizationDocument::LoadManifestFromString( const std::string& manifest) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - manifest, base::JSON_ALLOW_TRAILING_COMMAS | - base::JSON_PARSE_CHROMIUM_EXTENSIONS); - if (!parsed_json.value) { - LOG(ERROR) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + manifest, + base::JSON_ALLOW_TRAILING_COMMAS | base::JSON_PARSE_CHROMIUM_EXTENSIONS); + if (!parsed_json.has_value()) { + LOG(ERROR) << parsed_json.error().message; NOTREACHED(); return false; } std::unique_ptr<base::Value> root = - base::Value::ToUniquePtrValue(std::move(*parsed_json.value)); + base::Value::ToUniquePtrValue(std::move(*parsed_json)); root_ = base::DictionaryValue::From(std::move(root)); if (!root_) {
diff --git a/chrome/browser/ash/file_system_provider/operations/get_actions_unittest.cc b/chrome/browser/ash/file_system_provider/operations/get_actions_unittest.cc index 799a7906..dd52887 100644 --- a/chrome/browser/ash/file_system_provider/operations/get_actions_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/get_actions_unittest.cc
@@ -80,13 +80,12 @@ using extensions::api::file_system_provider_internal:: GetActionsRequestedSuccess::Params; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; - ASSERT_TRUE(parsed_json.value->is_list()); + ASSERT_TRUE(parsed_json->is_list()); std::unique_ptr<Params> params( - Params::Create(parsed_json.value->GetListDeprecated())); + Params::Create(parsed_json->GetListDeprecated())); ASSERT_TRUE(params.get()); *result = RequestValue::CreateForGetActionsSuccess(std::move(params)); ASSERT_TRUE(result->get());
diff --git a/chrome/browser/ash/file_system_provider/operations/get_metadata_unittest.cc b/chrome/browser/ash/file_system_provider/operations/get_metadata_unittest.cc index daf3cb3..69e669f 100644 --- a/chrome/browser/ash/file_system_provider/operations/get_metadata_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/get_metadata_unittest.cc
@@ -45,13 +45,12 @@ using extensions::api::file_system_provider_internal:: GetMetadataRequestedSuccess::Params; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; - ASSERT_TRUE(parsed_json.value->is_list()); + ASSERT_TRUE(parsed_json->is_list()); std::unique_ptr<Params> params( - Params::Create(parsed_json.value->GetListDeprecated())); + Params::Create(parsed_json->GetListDeprecated())); ASSERT_TRUE(params.get()); *result = RequestValue::CreateForGetMetadataSuccess(std::move(params)); ASSERT_TRUE(result->get());
diff --git a/chrome/browser/ash/file_system_provider/operations/read_directory_unittest.cc b/chrome/browser/ash/file_system_provider/operations/read_directory_unittest.cc index c1b22587..71617e93 100644 --- a/chrome/browser/ash/file_system_provider/operations/read_directory_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/read_directory_unittest.cc
@@ -91,13 +91,12 @@ using extensions::api::file_system_provider_internal:: ReadDirectoryRequestedSuccess::Params; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; - ASSERT_TRUE(parsed_json.value->is_list()); + ASSERT_TRUE(parsed_json->is_list()); std::unique_ptr<Params> params( - Params::Create(parsed_json.value->GetListDeprecated())); + Params::Create(parsed_json->GetListDeprecated())); ASSERT_TRUE(params.get()); *result = RequestValue::CreateForReadDirectorySuccess(std::move(params)); ASSERT_TRUE(result->get());
diff --git a/chrome/browser/ash/input_method/ime_rules_config.cc b/chrome/browser/ash/input_method/ime_rules_config.cc index 735ffbd..baafa4c 100644 --- a/chrome/browser/ash/input_method/ime_rules_config.cc +++ b/chrome/browser/ash/input_method/ime_rules_config.cc
@@ -47,13 +47,15 @@ VLOG(2) << "Field trial parameter not set"; return; } - absl::optional<base::Value> dict = base::JSONReader::Read(params); - if (!dict || !dict->is_dict()) { + auto dict = base::JSONReader::ReadAndReturnValueWithError(params); + if (!dict.has_value() || !dict->is_dict()) { VLOG(1) << "Failed to parse field trial params as JSON object: " << params; if (VLOG_IS_ON(1)) { - auto err = base::JSONReader::ReadAndReturnValueWithError(params); - VLOG(1) << err.error_message << ", line: " << err.error_line - << ", col: " << err.error_column; + if (dict.has_value()) + VLOG(1) << "Expecting a dictionary"; + else + VLOG(1) << dict.error().message << ", line: " << dict.error().line + << ", col: " << dict.error().column; } return; }
diff --git a/chrome/browser/ash/login/oobe_configuration.cc b/chrome/browser/ash/login/oobe_configuration.cc index 483dbb1..825b75e8 100644 --- a/chrome/browser/ash/login/oobe_configuration.cc +++ b/chrome/browser/ash/login/oobe_configuration.cc
@@ -82,18 +82,16 @@ return; } - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - configuration, base::JSON_PARSE_CHROMIUM_EXTENSIONS | - base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value) { + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + configuration, + base::JSON_PARSE_CHROMIUM_EXTENSIONS | base::JSON_ALLOW_TRAILING_COMMAS); + if (!parsed_json.has_value()) { LOG(ERROR) << "Error parsing OOBE configuration: " - << parsed_json.error_message; - } else if (!configuration::ValidateConfiguration(*parsed_json.value)) { + << parsed_json.error().message; + } else if (!configuration::ValidateConfiguration(*parsed_json)) { LOG(ERROR) << "Invalid OOBE configuration"; } else { - configuration_ = - base::Value::ToUniquePtrValue(std::move(*parsed_json.value)); + configuration_ = base::Value::ToUniquePtrValue(std::move(*parsed_json)); UpdateConfigurationValues(); } NotifyObservers();
diff --git a/chrome/browser/ash/login/screens/recommend_apps_screen_browsertest.cc b/chrome/browser/ash/login/screens/recommend_apps_screen_browsertest.cc index a3c0a090..c97ac3d 100644 --- a/chrome/browser/ash/login/screens/recommend_apps_screen_browsertest.cc +++ b/chrome/browser/ash/login/screens/recommend_apps_screen_browsertest.cc
@@ -144,10 +144,9 @@ delegate_->OnLoadSuccess(base::Value()); return; } - absl::optional<base::Value> output = - base::JSONReader::ReadAndReturnValueWithError(kJsonResponse).value; + auto output = base::JSONReader::ReadAndReturnValueWithError(kJsonResponse); ASSERT_TRUE(output.has_value()); - delegate_->OnLoadSuccess(std::move(output.value())); + delegate_->OnLoadSuccess(std::move(*output)); } void SimulateParseError() {
diff --git a/chrome/browser/ash/policy/active_directory/component_active_directory_policy_service.cc b/chrome/browser/ash/policy/active_directory/component_active_directory_policy_service.cc index 52f8daa..c151067 100644 --- a/chrome/browser/ash/policy/active_directory/component_active_directory_policy_service.cc +++ b/chrome/browser/ash/policy/active_directory/component_active_directory_policy_service.cc
@@ -73,16 +73,15 @@ // Parses |json| to a base::Value. Returns nullptr and prints errors // on failure. absl::optional<base::Value> ParseJsonToDict(const std::string& json) { - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_ALLOW_TRAILING_COMMAS); - if (!value_with_error.value) { + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSON_ALLOW_TRAILING_COMMAS); + if (!value_with_error.has_value()) { LOG(ERROR) << "Could not parse policy value as JSON: " - << value_with_error.error_message; + << value_with_error.error().message; return absl::nullopt; } - base::Value value = std::move(value_with_error.value.value()); + base::Value value = std::move(*value_with_error); if (!value.is_dict()) { LOG(ERROR) << "The JSON policy value is not a dictionary."; return absl::nullopt;
diff --git a/chrome/browser/ash/policy/core/device_policy_decoder.cc b/chrome/browser/ash/policy/core/device_policy_decoder.cc index bd5cfd3..8b0d676 100644 --- a/chrome/browser/ash/policy/core/device_policy_decoder.cc +++ b/chrome/browser/ash/policy/core/device_policy_decoder.cc
@@ -2047,14 +2047,13 @@ const std::string& json_string, const std::string& policy_name, std::string* error) { - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - json_string, base::JSON_ALLOW_TRAILING_COMMAS); - if (!value_with_error.value) { - *error = "Invalid JSON string: " + value_with_error.error_message; + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + json_string, base::JSON_ALLOW_TRAILING_COMMAS); + if (!value_with_error.has_value()) { + *error = "Invalid JSON string: " + value_with_error.error().message; return absl::nullopt; } - base::Value root = std::move(value_with_error.value.value()); + base::Value root = std::move(*value_with_error); const Schema& schema = GetChromeSchema().GetKnownProperty(policy_name); CHECK(schema.valid());
diff --git a/chrome/browser/ash/policy/scheduled_task_handler/test/scheduled_task_test_util.cc b/chrome/browser/ash/policy/scheduled_task_handler/test/scheduled_task_test_util.cc index b3aafb6..0290fd2 100644 --- a/chrome/browser/ash/policy/scheduled_task_handler/test/scheduled_task_test_util.cc +++ b/chrome/browser/ash/policy/scheduled_task_handler/test/scheduled_task_test_util.cc
@@ -26,12 +26,10 @@ namespace { void DecodeJsonStringAndNormalize(const std::string& json_string, base::Value* value) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json_string, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_EQ(parsed_json.error_message, ""); - ASSERT_TRUE(parsed_json.value); - *value = std::move(*parsed_json.value); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json_string, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + *value = std::move(*parsed_json); } // Creates a JSON policy for daily device scheduled tasks.
diff --git a/chrome/browser/ash/printing/bulk_printers_calculator.cc b/chrome/browser/ash/printing/bulk_printers_calculator.cc index d077d0e..89de22f 100644 --- a/chrome/browser/ash/printing/bulk_printers_calculator.cc +++ b/chrome/browser/ash/printing/bulk_printers_calculator.cc
@@ -51,19 +51,18 @@ // This could be really slow. base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::MAY_BLOCK); - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - *data, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + *data, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - if (!value_with_error.value) { + if (!value_with_error.has_value()) { LOG(WARNING) << "Failed to parse printers policy (" - << value_with_error.error_message << ") on line " - << value_with_error.error_line << " at position " - << value_with_error.error_column; + << value_with_error.error().message << ") on line " + << value_with_error.error().line << " at position " + << value_with_error.error().column; return nullptr; } - base::Value& json_blob = value_with_error.value.value(); + base::Value& json_blob = *value_with_error; if (!json_blob.is_list()) { LOG(WARNING) << "Failed to parse printers policy (an array was expected)"; return nullptr;
diff --git a/chrome/browser/ash/printing/print_servers_provider.cc b/chrome/browser/ash/printing/print_servers_provider.cc index 7ffe2e7..2bc3731 100644 --- a/chrome/browser/ash/printing/print_servers_provider.cc +++ b/chrome/browser/ash/printing/print_servers_provider.cc
@@ -49,18 +49,17 @@ return task_data; } - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - *data, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - if (!value_with_error.value) { + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + *data, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + if (!value_with_error.has_value()) { LOG(WARNING) << "Failed to parse print servers policy (" - << value_with_error.error_message << ") on line " - << value_with_error.error_line << " at position " - << value_with_error.error_column; + << value_with_error.error().message << ") on line " + << value_with_error.error().line << " at position " + << value_with_error.error().column; return task_data; } - base::Value& json_blob = value_with_error.value.value(); + base::Value& json_blob = *value_with_error; if (!json_blob.is_list()) { LOG(WARNING) << "Failed to parse print servers policy " << "(an array was expected)";
diff --git a/chrome/browser/autofill/automated_tests/cache_replayer.cc b/chrome/browser/autofill/automated_tests/cache_replayer.cc index ec2655d..65daf2b 100644 --- a/chrome/browser/autofill/automated_tests/cache_replayer.cc +++ b/chrome/browser/autofill/automated_tests/cache_replayer.cc
@@ -611,16 +611,15 @@ // Parse json text content to json value node. base::Value root_node; { - JSONReader::ValueWithError value_with_error = - JSONReader::ReadAndReturnValueWithError( - decompressed_json_text, JSONParserOptions::JSON_PARSE_RFC); - if (!value_with_error.value) { + auto value_with_error = JSONReader::ReadAndReturnValueWithError( + decompressed_json_text, JSONParserOptions::JSON_PARSE_RFC); + if (!value_with_error.has_value()) { return ServerCacheReplayer::Status{ ServerCacheReplayer::StatusCode::kBadRead, base::StrCat({"Could not load cache from json file ", - "because: ", value_with_error.error_message})}; + "because: ", value_with_error.error().message})}; } - root_node = std::move(value_with_error.value.value()); + root_node = std::move(*value_with_error); } {
diff --git a/chrome/browser/autofill/captured_sites_test_utils.cc b/chrome/browser/autofill/captured_sites_test_utils.cc index 348a81c4..e93aead 100644 --- a/chrome/browser/autofill/captured_sites_test_utils.cc +++ b/chrome/browser/autofill/captured_sites_test_utils.cc
@@ -325,16 +325,15 @@ // Parse json text content to json value node. base::Value root_node; { - JSONReader::ValueWithError value_with_error = - JSONReader::ReadAndReturnValueWithError( - json_text, JSONParserOptions::JSON_PARSE_RFC); - if (!value_with_error.value) { + auto value_with_error = JSONReader::ReadAndReturnValueWithError( + json_text, JSONParserOptions::JSON_PARSE_RFC); + if (!value_with_error.has_value()) { LOG(WARNING) << "Could not load test config from json file: " << "`testcases.json` because: " - << value_with_error.error_message; + << value_with_error.error().message; return sites; } - root_node = std::move(value_with_error.value.value()); + root_node = std::move(*value_with_error); } base::Value* list_node = root_node.FindListKey("tests"); if (!list_node) {
diff --git a/chrome/browser/extensions/extension_management_unittest.cc b/chrome/browser/extensions/extension_management_unittest.cc index 6f36960..d8cfb65 100644 --- a/chrome/browser/extensions/extension_management_unittest.cc +++ b/chrome/browser/extensions/extension_management_unittest.cc
@@ -217,13 +217,12 @@ } void SetExampleDictPref(const base::StringPiece example_dict_preference) { - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError( - example_dict_preference, - base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(result.value && result.value->is_dict()) - << result.error_message; - SetPref(true, pref_names::kExtensionManagement, std::move(*result.value)); + auto result = base::JSONReader::ReadAndReturnValueWithError( + example_dict_preference, + base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(result.has_value()) << result.error().message; + ASSERT_TRUE(result->is_dict()); + SetPref(true, pref_names::kExtensionManagement, std::move(*result)); } // Wrapper of ExtensionManagement::GetInstallationMode, |id| and
diff --git a/chrome/browser/extensions/policy_handlers_unittest.cc b/chrome/browser/extensions/policy_handlers_unittest.cc index 8ac4465..1628deb5 100644 --- a/chrome/browser/extensions/policy_handlers_unittest.cc +++ b/chrome/browser/extensions/policy_handlers_unittest.cc
@@ -397,10 +397,9 @@ } TEST(ExtensionSettingsPolicyHandlerTest, CheckPolicySettings) { - base::JSONReader::ValueWithError policy_result = - base::JSONReader::ReadAndReturnValueWithError(kTestManagementPolicy1, - kJsonParseOptions); - ASSERT_TRUE(policy_result.value) << policy_result.error_message; + auto policy_result = base::JSONReader::ReadAndReturnValueWithError( + kTestManagementPolicy1, kJsonParseOptions); + ASSERT_TRUE(policy_result.has_value()) << policy_result.error().message; policy::Schema chrome_schema = policy::Schema::Wrap(policy::GetChromeSchemaData()); @@ -411,7 +410,7 @@ policy_map.Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - policy::POLICY_SOURCE_CLOUD, std::move(*policy_result.value), + policy::POLICY_SOURCE_CLOUD, std::move(*policy_result), nullptr); // CheckPolicySettings() has an error message because of the missing update // URL. @@ -453,8 +452,7 @@ policy_map.Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - policy::POLICY_SOURCE_CLOUD, - policy_value.value.value().Clone(), nullptr); + policy::POLICY_SOURCE_CLOUD, policy_value->Clone(), nullptr); EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); EXPECT_EQ(2u, errors.size()); @@ -472,10 +470,9 @@ TEST(ExtensionSettingsPolicyHandlerTest, ApplyPolicySettings) { // Mark as enterprise managed. - base::JSONReader::ValueWithError policy_result = - base::JSONReader::ReadAndReturnValueWithError(kTestManagementPolicy2, - kJsonParseOptions); - ASSERT_TRUE(policy_result.value) << policy_result.error_message; + auto policy_result = base::JSONReader::ReadAndReturnValueWithError( + kTestManagementPolicy2, kJsonParseOptions); + ASSERT_TRUE(policy_result.has_value()) << policy_result.error().message; policy::Schema chrome_schema = policy::Schema::Wrap(policy::GetChromeSchemaData()); @@ -486,29 +483,26 @@ policy_map.Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - policy::POLICY_SOURCE_CLOUD, policy_result.value->Clone(), - nullptr); + policy::POLICY_SOURCE_CLOUD, policy_result->Clone(), nullptr); EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); handler.ApplyPolicySettings(policy_map, &prefs); base::Value* value = NULL; ASSERT_TRUE(prefs.GetValue(pref_names::kExtensionManagement, &value)); - EXPECT_EQ(*policy_result.value, *value); + EXPECT_EQ(*policy_result, *value); } TEST(ExtensionSettingsPolicyHandlerTest, DropInvalidKeys) { // Check that invalid keys are dropped from the dictionary, but the rest of // the settings apply correctly. - base::JSONReader::ValueWithError policy_result = - base::JSONReader::ReadAndReturnValueWithError(kTestManagementPolicy5, - kJsonParseOptions); - ASSERT_TRUE(policy_result.value) << policy_result.error_message; + auto policy_result = base::JSONReader::ReadAndReturnValueWithError( + kTestManagementPolicy5, kJsonParseOptions); + ASSERT_TRUE(policy_result.has_value()) << policy_result.error().message; - base::JSONReader::ValueWithError stripped_policy_result = - base::JSONReader::ReadAndReturnValueWithError( - kSanitizedTestManagementPolicy5, kJsonParseOptions); - ASSERT_TRUE(stripped_policy_result.value) - << stripped_policy_result.error_message; + auto stripped_policy_result = base::JSONReader::ReadAndReturnValueWithError( + kSanitizedTestManagementPolicy5, kJsonParseOptions); + ASSERT_TRUE(stripped_policy_result.has_value()) + << stripped_policy_result.error().message; policy::Schema chrome_schema = policy::Schema::Wrap(policy::GetChromeSchemaData()); @@ -519,7 +513,7 @@ policy_map.Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - policy::POLICY_SOURCE_CLOUD, std::move(*policy_result.value), + policy::POLICY_SOURCE_CLOUD, std::move(*policy_result), nullptr); // CheckPolicySettings() has an error message because of the missing update // URL. @@ -530,7 +524,7 @@ handler.ApplyPolicySettings(policy_map, &prefs); base::Value* value = nullptr; ASSERT_TRUE(prefs.GetValue(pref_names::kExtensionManagement, &value)); - EXPECT_EQ(*stripped_policy_result.value, *value); + EXPECT_EQ(*stripped_policy_result, *value); } // Only enterprise managed machines can auto install extensions from a location @@ -539,12 +533,12 @@ // Mark as not enterprise managed. auto policy_result = base::JSONReader::ReadAndReturnValueWithError( kSensitiveTestManagementPolicy, kJsonParseOptions); - ASSERT_TRUE(policy_result.value) << policy_result.error_message; + ASSERT_TRUE(policy_result.has_value()) << policy_result.error().message; auto sanitized_policy_result = base::JSONReader::ReadAndReturnValueWithError( kSanitizedTestManagementPolicy, kJsonParseOptions); - ASSERT_TRUE(sanitized_policy_result.value) - << sanitized_policy_result.error_message; + ASSERT_TRUE(sanitized_policy_result.has_value()) + << sanitized_policy_result.error().message; policy::Schema chrome_schema = policy::Schema::Wrap(policy::GetChromeSchemaData()); @@ -555,15 +549,14 @@ policy_map.Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - policy::POLICY_SOURCE_CLOUD, policy_result.value->Clone(), - nullptr); + policy::POLICY_SOURCE_CLOUD, policy_result->Clone(), nullptr); EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); EXPECT_FALSE(errors.empty()); handler.ApplyPolicySettings(policy_map, &prefs); base::Value* value = nullptr; ASSERT_TRUE(prefs.GetValue(pref_names::kExtensionManagement, &value)); - EXPECT_EQ(*sanitized_policy_result.value, *value); + EXPECT_EQ(*sanitized_policy_result, *value); } } // namespace extensions
diff --git a/chrome/browser/media/webrtc/webrtc_mediadevices_interactive_uitest.cc b/chrome/browser/media/webrtc/webrtc_mediadevices_interactive_uitest.cc index d05e281c..6227acf0 100644 --- a/chrome/browser/media/webrtc/webrtc_mediadevices_interactive_uitest.cc +++ b/chrome/browser/media/webrtc/webrtc_mediadevices_interactive_uitest.cc
@@ -86,14 +86,13 @@ std::string devices_as_json = ExecuteJavascript("enumerateDevices()", tab); EXPECT_FALSE(devices_as_json.empty()); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - EXPECT_EQ(parsed_json.value->type(), base::Value::Type::LIST); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + EXPECT_EQ(parsed_json->type(), base::Value::Type::LIST); - base::Value& values = *parsed_json.value; + base::Value& values = *parsed_json; ASSERT_TRUE(values.is_list()); ASSERT_FALSE(values.GetListDeprecated().empty()); bool found_audio_input = false;
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc index 71f3a3b2..bed300c 100644 --- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc +++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
@@ -76,7 +76,10 @@ #if BUILDFLAG(IS_WIN) #include <windows.h> +#include "base/files/file_path.h" +#include "base/path_service.h" #include "base/win/base_win_buildflags.h" +#include "base/win/registry.h" #include "base/win/scoped_handle.h" #include "base/win/windows_version.h" #include "chrome/browser/shell_integration_win.h" @@ -187,57 +190,6 @@ base::SysInfo::NumberOfProcessors()); } -#if BUILDFLAG(IS_WIN) -bool IsApplockerRunning(); -#endif // BUILDFLAG(IS_WIN) - -// Called on a background thread, with low priority to avoid slowing down -// startup with metrics that aren't trivial to compute. -void RecordStartupMetrics() { -#if BUILDFLAG(IS_WIN) - const base::win::OSInfo& os_info = *base::win::OSInfo::GetInstance(); - int patch = os_info.version_number().patch; - int build = os_info.version_number().build; - int patch_level = 0; - - if (patch < 65536 && build < 65536) - patch_level = MAKELONG(patch, build); - DCHECK(patch_level) << "Windows version too high!"; - base::UmaHistogramSparse("Windows.PatchLevel", patch_level); - - int kernel32_patch = os_info.Kernel32VersionNumber().patch; - int kernel32_build = os_info.Kernel32VersionNumber().build; - int kernel32_patch_level = 0; - if (kernel32_patch < 65536 && kernel32_build < 65536) - kernel32_patch_level = MAKELONG(kernel32_patch, kernel32_build); - DCHECK(kernel32_patch_level) << "Windows kernel32.dll version too high!"; - base::UmaHistogramSparse("Windows.PatchLevelKernel32", kernel32_patch_level); - - base::UmaHistogramBoolean("Windows.HasHighResolutionTimeTicks", - base::TimeTicks::IsHighResolution()); - - // Determine if Applocker is enabled and running. This does not check if - // Applocker rules are being enforced. - base::UmaHistogramBoolean("Windows.ApplockerRunning", IsApplockerRunning()); - crypto::MeasureTPMAvailabilityWin(); -#endif // BUILDFLAG(IS_WIN) - - bluetooth_utility::ReportBluetoothAvailability(); - - // Record whether Chrome is the default browser or not. - // Disabled on Linux due to hanging browser tests, see crbug.com/1216328. -#if !BUILDFLAG(IS_LINUX) - shell_integration::DefaultWebClientState default_state = - shell_integration::GetDefaultBrowser(); - base::UmaHistogramEnumeration("DefaultBrowser.State", default_state, - shell_integration::NUM_DEFAULT_STATES); -#endif // !BUILDFLAG(IS_LINUX) - -#if BUILDFLAG(IS_CHROMEOS_LACROS) - RecordChromeOSChannel(); -#endif -} - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) @@ -495,6 +447,35 @@ return status.dwCurrentState == SERVICE_RUNNING; } +// This registry key is not fully documented but there is information on it +// here: +// https://blogs.blackberry.com/en/2017/10/windows-10-parallel-loading-breakdown. +bool IsParallelDllLoadingEnabled() { + // Parallel DLL loading is only available on Windows 10 and above. + if (base::win::GetVersion() < base::win::Version::WIN10) + return false; + base::FilePath exe_path; + if (!base::PathService::Get(base::FILE_EXE, &exe_path)) + return false; + const wchar_t kIFEOKey[] = + L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution " + L"Options\\"; + std::wstring browser_process_key = kIFEOKey + exe_path.BaseName().value(); + + base::win::RegKey key; + if (ERROR_SUCCESS != key.Open(HKEY_LOCAL_MACHINE, browser_process_key.c_str(), + KEY_QUERY_VALUE)) + return true; + + const wchar_t kMaxLoaderThreads[] = L"MaxLoaderThreads"; + DWORD max_loader_threads = 0; + if (ERROR_SUCCESS != key.ReadValueDW(kMaxLoaderThreads, &max_loader_threads)) + return true; + + // Note: If LoaderThreads is 0, it will be set to the default value of 4. + return max_loader_threads != 1; +} + #endif // BUILDFLAG(IS_WIN) void RecordDisplayHDRStatus(const display::Display& display) { @@ -502,6 +483,61 @@ display.color_spaces().SupportsHDR()); } +// Called on a background thread, with low priority to avoid slowing down +// startup with metrics that aren't trivial to compute. +void RecordStartupMetrics() { +#if BUILDFLAG(IS_WIN) + const base::win::OSInfo& os_info = *base::win::OSInfo::GetInstance(); + int patch = os_info.version_number().patch; + int build = os_info.version_number().build; + int patch_level = 0; + + if (patch < 65536 && build < 65536) + patch_level = MAKELONG(patch, build); + DCHECK(patch_level) << "Windows version too high!"; + base::UmaHistogramSparse("Windows.PatchLevel", patch_level); + + int kernel32_patch = os_info.Kernel32VersionNumber().patch; + int kernel32_build = os_info.Kernel32VersionNumber().build; + int kernel32_patch_level = 0; + if (kernel32_patch < 65536 && kernel32_build < 65536) + kernel32_patch_level = MAKELONG(kernel32_patch, kernel32_build); + DCHECK(kernel32_patch_level) << "Windows kernel32.dll version too high!"; + base::UmaHistogramSparse("Windows.PatchLevelKernel32", kernel32_patch_level); + + base::UmaHistogramBoolean("Windows.HasHighResolutionTimeTicks", + base::TimeTicks::IsHighResolution()); + + // Determine if Applocker is enabled and running. This does not check if + // Applocker rules are being enforced. + base::UmaHistogramBoolean("Windows.ApplockerRunning", IsApplockerRunning()); + + // Determine whether parallel DLL loading is enabled for the browser process + // executable. This is disabled by default on fresh Windows installations, but + // the registry key that controls this might have been removed. Having the + // parallel DLL loader enabled might affect both sandbox and early startup + // behavior. + base::UmaHistogramBoolean("Windows.ParallelDllLoadingEnabled", + IsParallelDllLoadingEnabled()); + crypto::MeasureTPMAvailabilityWin(); +#endif // BUILDFLAG(IS_WIN) + + bluetooth_utility::ReportBluetoothAvailability(); + + // Record whether Chrome is the default browser or not. + // Disabled on Linux due to hanging browser tests, see crbug.com/1216328. +#if !BUILDFLAG(IS_LINUX) + shell_integration::DefaultWebClientState default_state = + shell_integration::GetDefaultBrowser(); + base::UmaHistogramEnumeration("DefaultBrowser.State", default_state, + shell_integration::NUM_DEFAULT_STATES); +#endif // !BUILDFLAG(IS_LINUX) + +#if BUILDFLAG(IS_CHROMEOS_LACROS) + RecordChromeOSChannel(); +#endif +} + } // namespace ChromeBrowserMainExtraPartsMetrics::ChromeBrowserMainExtraPartsMetrics()
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc index c7b4ff7..bcbc8720 100644 --- a/chrome/browser/password_manager/chrome_password_manager_client.cc +++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -249,6 +249,9 @@ mojo::PendingAssociatedReceiver<autofill::mojom::PasswordGenerationDriver> receiver, content::RenderFrameHost* rfh) { + // [spec] https://wicg.github.io/anonymous-iframe/#spec-autofill + if (rfh->IsAnonymous()) + return; auto* web_contents = content::WebContents::FromRenderFrameHost(rfh); if (!web_contents) return;
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc index a118cfa..9f677394 100644 --- a/chrome/browser/password_manager/password_manager_browsertest.cc +++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -81,6 +81,7 @@ #include "content/public/common/content_switches.h" #include "content/public/test/back_forward_cache_util.h" #include "content/public/test/browser_test.h" +#include "content/public/test/content_browser_test_utils.h" #include "content/public/test/prerender_test_util.h" #include "content/public/test/test_utils.h" #include "google_apis/gaia/gaia_switches.h" @@ -4434,21 +4435,25 @@ }); } - void WaitForPasswordFormParsedAndRendered() { + void WaitFor(uint32_t wait_type) { base::RunLoop run_loop; quit_closure_ = run_loop.QuitClosure(); - wait_type_ = WAIT_FOR_PASSWORD_FORMS::WAIT_FOR_PARSED | - WAIT_FOR_PASSWORD_FORMS::WAIT_FOR_RENDERED; + wait_type_ = wait_type; run_loop.Run(); } - private: + void WaitForPasswordFormParsedAndRendered() { + WaitFor(WAIT_FOR_PASSWORD_FORMS::WAIT_FOR_PARSED | + WAIT_FOR_PASSWORD_FORMS::WAIT_FOR_RENDERED); + } + enum WAIT_FOR_PASSWORD_FORMS { WAIT_FOR_NOTHING = 0, WAIT_FOR_PARSED = 1 << 0, // Waits for PasswordFormsParsed(). WAIT_FOR_RENDERED = 1 << 1, // Waits for PasswordFormsRendered(). }; + private: void RemoveWaitType(uint32_t arrived) { wait_type_ &= ~arrived; if (wait_type_ == WAIT_FOR_NOTHING && quit_closure_) @@ -4793,6 +4798,152 @@ mock->WaitForPasswordFormParsedAndRendered(); } +/// Inject the mock driver when navigation happens in main frame. +class MockPasswordManagerDriverInjector : public content::WebContentsObserver { + public: + explicit MockPasswordManagerDriverInjector(content::WebContents* web_contents) + : WebContentsObserver(web_contents) {} + ~MockPasswordManagerDriverInjector() override = default; + + MockPrerenderPasswordManagerDriver* GetMockForFrame( + content::RenderFrameHost* rfh) { + return static_cast<MockPrerenderPasswordManagerDriver*>( + GetDriverForFrame(rfh)->ReceiverForTesting().impl()); + } + + private: + password_manager::ContentPasswordManagerDriver* GetDriverForFrame( + content::RenderFrameHost* rfh) { + password_manager::ContentPasswordManagerDriverFactory* driver_factory = + password_manager::ContentPasswordManagerDriverFactory::FromWebContents( + web_contents()); + return driver_factory->GetDriverForFrame(rfh); + } + + // content::WebContentsObserver: + void ReadyToCommitNavigation( + content::NavigationHandle* navigation_handle) override { + mocks_.push_back(std::make_unique< + testing::StrictMock<MockPrerenderPasswordManagerDriver>>( + GetDriverForFrame(navigation_handle->GetRenderFrameHost()))); + } + + std::vector<std::unique_ptr<MockPrerenderPasswordManagerDriver>> mocks_; +}; + +// Test class for testing password manager with AnonymousIframe enabled. +class PasswordManagerAnonymousIframeTest : public PasswordManagerBrowserTest { + void SetUpOnMainThread() override { + host_resolver()->AddRule("*", "127.0.0.1"); + PasswordManagerBrowserTest::SetUpOnMainThread(); + } + void SetUpCommandLine(base::CommandLine* command_line) override { + command_line->AppendSwitch(switches::kEnableBlinkTestFeatures); + PasswordManagerBrowserTest::SetUpCommandLine(command_line); + } +}; + +IN_PROC_BROWSER_TEST_F(PasswordManagerAnonymousIframeTest, NoFormsSeen) { + GURL main_frame_url = embedded_test_server()->GetURL( + "/password/password_form_in_anonymous_iframe.html"); + MockPasswordManagerDriverInjector injector(WebContents()); + PasswordsNavigationObserver nav_observer(WebContents()); + ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), main_frame_url)); + nav_observer.Wait(); + + content::RenderFrameHost* main_rfh = WebContents()->GetPrimaryMainFrame(); + // Check behavior on a normal iframe: + { + ASSERT_TRUE(content::ExecJs( + main_rfh, R"(create_iframe('/empty.html', 'iframe', false);)")); + content::RenderFrameHost* child_rfh = ChildFrameAt(main_rfh, 0); + ASSERT_NE(child_rfh, nullptr); + MockPrerenderPasswordManagerDriver* mock = + injector.GetMockForFrame(child_rfh); + ASSERT_NE(mock, nullptr); + EXPECT_CALL(*mock, PasswordFormsParsed).Times(1); + ASSERT_TRUE( + content::ExecJs(child_rfh, "window.parent.inject_form(document);")); + mock->WaitFor(MockPrerenderPasswordManagerDriver::WAIT_FOR_PASSWORD_FORMS:: + WAIT_FOR_PARSED); + } + + // Check what happens when using an anonymous iframe instead: + { + ASSERT_TRUE(content::ExecJs( + main_rfh, "create_iframe('/empty.html', 'iframe', true);")); + content::RenderFrameHost* child_rfh = + ChildFrameAt(WebContents()->GetPrimaryMainFrame(), 1); + ASSERT_NE(child_rfh, nullptr); + MockPrerenderPasswordManagerDriver* mock = + injector.GetMockForFrame(child_rfh); + ASSERT_NE(mock, nullptr); + EXPECT_CALL(*mock, PasswordFormsParsed).Times(0); + ASSERT_TRUE( + content::ExecJs(child_rfh, "window.parent.inject_form(document);")); + base::RunLoop().RunUntilIdle(); + } +} + +IN_PROC_BROWSER_TEST_F(PasswordManagerAnonymousIframeTest, + DisablePasswordManagerOnAnonymousIframe) { + GURL base_url = https_test_server().GetURL("a.test", "/"); + GURL main_frame_url = https_test_server().GetURL( + "a.test", "/password/password_form_in_anonymous_iframe.html"); + GURL form_url = https_test_server().GetURL( + "a.test", "/password/crossite_iframe_content.html"); + + // 1. Store the username/password + password_manager::PasswordStoreInterface* password_store = + PasswordStoreFactory::GetForProfile(browser()->profile(), + ServiceAccessType::IMPLICIT_ACCESS) + .get(); + password_manager::PasswordForm signin_form; + signin_form.signon_realm = base_url.spec(); + signin_form.url = base_url; + signin_form.action = base_url; + signin_form.username_value = u"temp"; + signin_form.password_value = u"pa55w0rd"; + password_store->AddLogin(signin_form); + + // 2. Load the form again, from a normal and an anonymous iframe. + PasswordsNavigationObserver reload_observer(WebContents()); + reload_observer.SetPathToWaitFor( + "/password/password_form_in_anonymous_iframe.html"); + ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), main_frame_url)); + reload_observer.Wait(); + EXPECT_TRUE(content::ExecJs( + WebContents(), + content::JsReplace("create_iframe($1, 'normal', false); ", form_url))); + EXPECT_TRUE(content::ExecJs( + WebContents(), + content::JsReplace("create_iframe($1, 'anonymous', true); ", form_url))); + content::WaitForLoadStop(WebContents()); + content::RenderFrameHost* iframe_normal = + ChildFrameAt(WebContents()->GetPrimaryMainFrame(), 0); + content::RenderFrameHost* iframe_anonymous = + ChildFrameAt(WebContents()->GetPrimaryMainFrame(), 1); + + EXPECT_EQ("pa55w0rd", + content::EvalJs(iframe_normal, + "window.parent.check_password(document);")); + EXPECT_EQ("not found", + content::EvalJs(iframe_anonymous, + "window.parent.check_password(document);")); + + // 3. Navigate the normal iframe to be an anonymous iframe. + EXPECT_TRUE(content::ExecJs( + WebContents(), "document.getElementById('normal').anonymous = true")); + EXPECT_TRUE(content::ExecJs( + WebContents(), + content::JsReplace("document.getElementById('normal').src = $1", + form_url))); + content::WaitForLoadStop(WebContents()); + EXPECT_EQ("not found", + content::EvalJs(iframe_normal, + "window.parent.check_password(document);")); +} + } // namespace } // namespace password_manager
diff --git a/chrome/browser/resources/media_router/cast_feedback/cast_feedback_ui.html b/chrome/browser/resources/media_router/cast_feedback/cast_feedback_ui.html index b04e6be..d42d03e 100644 --- a/chrome/browser/resources/media_router/cast_feedback/cast_feedback_ui.html +++ b/chrome/browser/resources/media_router/cast_feedback/cast_feedback_ui.html
@@ -334,18 +334,23 @@ </div> </template> <div class="question"> - <div class="h2">$i18n{emailField}</div> + <!-- Show the email field only if the user is logged into Chrome + (i.e. |userEmail_| is set). --> <cr-checkbox checked="{{allowContactByEmail_}}" aria-description="$i18n{allowContactByEmail}" - id="allow-contact-by-email"> + id="allow-contact-by-email" + hidden="[[!userEmail_]]"> <span class="checkbox-label"> $i18n{allowContactByEmail} </span> </cr-checkbox> + <!-- We do not allow the user to edit the email address. + See b/228865049 for context. --> <cr-input placeholder="$i18n{yourEmailAddress}" - value="{{userEmail_}}" + value="[[userEmail_]]" type="text" - disabled="[[!allowContactByEmail_]]"> + hidden="[[!allowContactByEmail_]]" + disabled="true"> </cr-input> <cr-checkbox checked="{{attachLogs_}}" aria-description="$i18n{sendLogs}">
diff --git a/chrome/browser/ui/app_list/search/arc/recommend_apps_fetcher_impl.cc b/chrome/browser/ui/app_list/search/arc/recommend_apps_fetcher_impl.cc index 51e9af5..fbbf351b 100644 --- a/chrome/browser/ui/app_list/search/arc/recommend_apps_fetcher_impl.cc +++ b/chrome/browser/ui/app_list/search/arc/recommend_apps_fetcher_impl.cc
@@ -184,23 +184,24 @@ absl::optional<base::Value> RecommendAppsFetcherImpl::ParseResponse( base::StringPiece response) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(response); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(response); - if (!parsed_json.value || - (!parsed_json.value->is_list() && !parsed_json.value->is_dict())) { - LOG(ERROR) << "Error parsing response JSON: " << parsed_json.error_message; + if (!parsed_json.has_value()) { + LOG(ERROR) << "Error parsing response JSON: " + << parsed_json.error().message; // TODO(thanhdng): Add a UMA histogram here. return absl::nullopt; + } else if (!parsed_json->is_list() && !parsed_json->is_dict()) { + LOG(ERROR) << "Error parsing response JSON: Content malformed."; + return absl::nullopt; } // If the response is a dictionary, it is an error message in the // following format: // {"Error code":"error code","Error message":"Error message"} - if (parsed_json.value->is_dict()) { + if (parsed_json->is_dict()) { const base::Value* response_error_code_value = - parsed_json.value->FindKeyOfType("Error code", - base::Value::Type::STRING); + parsed_json->FindKeyOfType("Error code", base::Value::Type::STRING); if (!response_error_code_value) { LOG(ERROR) << "Unable to find error code: response=" @@ -231,33 +232,32 @@ } // Otherwise, the response should return a list of apps. - base::Value::ConstListView app_list = parsed_json.value->GetListDeprecated(); + const auto& app_list = parsed_json->GetList(); if (app_list.empty()) { DVLOG(1) << "No app in the response."; // TODO(thanhdng): Add a UMA histogram here. return absl::nullopt; } - base::Value output(base::Value::Type::LIST); - for (auto& item : app_list) { - base::Value output_map(base::Value::Type::DICTIONARY); + base::Value::List output; + for (const auto& item : app_list) { + base::Value::Dict output_map; - if (!item.is_dict()) { + const auto* dict = item.GetIfDict(); + if (!dict) { DVLOG(1) << "Cannot parse item."; continue; } // Retrieve the app title. - const base::Value* title = - item.FindPathOfType({"title_", "name_"}, base::Value::Type::STRING); + const auto* title = dict->FindStringByDottedPath("title_.name_"); if (title) - output_map.SetKey("name", base::Value(title->GetString())); + output_map.Set("name", *title); // Retrieve the package name. - const base::Value* package_name = - item.FindPathOfType({"id_", "id_"}, base::Value::Type::STRING); + const auto* package_name = dict->FindStringByDottedPath("id_.id_"); if (package_name) - output_map.SetKey("package_name", base::Value(package_name->GetString())); + output_map.Set("package_name", *package_name); // Retrieve the icon URL for the app. // @@ -267,13 +267,12 @@ // a protobuf, we should not directly access this field but use the wrapper // method getSafeUrlString() to read it. In our case, we don't have the // option other than access it directly. - const base::Value* icon_url = item.FindPathOfType( - {"icon_", "url_", "privateDoNotAccessOrElseSafeUrlWrappedValue_"}, - base::Value::Type::STRING); + const auto* icon_url = dict->FindStringByDottedPath( + "icon_.url_.privateDoNotAccessOrElseSafeUrlWrappedValue_"); if (icon_url) - output_map.SetKey("icon", base::Value(icon_url->GetString())); + output_map.Set("icon", *icon_url); - if (output_map.DictEmpty()) { + if (output_map.empty()) { DVLOG(1) << "Invalid app item."; continue; } @@ -283,7 +282,7 @@ // TODO(thanhdng): Add a UMA histogram here to record the parse have completed // successfully. - return output; + return base::Value(std::move(output)); } } // namespace app_list
diff --git a/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc b/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc index ed621aac..7577afc5 100644 --- a/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc +++ b/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc
@@ -556,6 +556,7 @@ DCHECK(features::IsEcheSWAEnabled()); DCHECK(apps_access_operation_); + apps_access_manager_->NotifyAppsAccessCanceled(); apps_access_operation_.reset(); }
diff --git a/chrome/browser/web_applications/extensions/web_app_policy_manager_unittest.cc b/chrome/browser/web_applications/extensions/web_app_policy_manager_unittest.cc index 12375e1e..58e1811c 100644 --- a/chrome/browser/web_applications/extensions/web_app_policy_manager_unittest.cc +++ b/chrome/browser/web_applications/extensions/web_app_policy_manager_unittest.cc
@@ -473,13 +473,11 @@ } void SetWebAppSettingsListPref(const base::StringPiece pref) { - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError( - pref, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(result.value && result.value->is_list()) - << result.error_message; - profile()->GetPrefs()->Set(prefs::kWebAppSettings, - std::move(*result.value)); + auto result = base::JSONReader::ReadAndReturnValueWithError( + pref, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(result.has_value()) << result.error().message; + ASSERT_TRUE(result->is_list()); + profile()->GetPrefs()->Set(prefs::kWebAppSettings, std::move(*result)); } void ValidateEmptyWebAppSettingsPolicy() {
diff --git a/chrome/browser/web_applications/policy/web_app_settings_policy_handler_unittest.cc b/chrome/browser/web_applications/policy/web_app_settings_policy_handler_unittest.cc index 7e53e7b..154b7765 100644 --- a/chrome/browser/web_applications/policy/web_app_settings_policy_handler_unittest.cc +++ b/chrome/browser/web_applications/policy/web_app_settings_policy_handler_unittest.cc
@@ -65,11 +65,11 @@ ])"; base::Value ReturnPolicyValueFromJson(base::StringPiece policy) { - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError( - policy, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - DCHECK(result.value && result.value->is_list()) << result.error_message; - return std::move(*result.value); + auto result = base::JSONReader::ReadAndReturnValueWithError( + policy, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + DCHECK(result.has_value()) << result.error().message; + DCHECK(result->is_list()); + return std::move(*result); } } // namespace
diff --git a/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc b/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc index c85c8d5a..abc4cea 100644 --- a/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc +++ b/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc
@@ -233,13 +233,13 @@ PreinstalledWebAppManager::SetFileUtilsForTesting(file_utils.get()); std::vector<base::Value> app_configs; - base::JSONReader::ValueWithError json_parse_result = + auto json_parse_result = base::JSONReader::ReadAndReturnValueWithError(app_config_string); - EXPECT_TRUE(json_parse_result.value) - << "JSON parse error: " << json_parse_result.error_message; - if (!json_parse_result.value) + EXPECT_TRUE(json_parse_result.has_value()) + << "JSON parse error: " << json_parse_result.error().message; + if (!json_parse_result.has_value()) return absl::nullopt; - app_configs.push_back(*std::move(json_parse_result.value)); + app_configs.push_back(std::move(*json_parse_result)); PreinstalledWebAppManager::SetConfigsForTesting(&app_configs); absl::optional<webapps::InstallResultCode> code;
diff --git a/chrome/browser/web_applications/test/web_app_test_utils.cc b/chrome/browser/web_applications/test/web_app_test_utils.cc index a305738..ce31e5e2 100644 --- a/chrome/browser/web_applications/test/web_app_test_utils.cc +++ b/chrome/browser/web_applications/test/web_app_test_utils.cc
@@ -618,11 +618,11 @@ } void SetWebAppSettingsListPref(Profile* profile, const base::StringPiece pref) { - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError( - pref, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - DCHECK(result.value && result.value->is_list()) << result.error_message; - profile->GetPrefs()->Set(prefs::kWebAppSettings, std::move(*result.value)); + auto result = base::JSONReader::ReadAndReturnValueWithError( + pref, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + DCHECK(result.has_value()) << result.error().message; + DCHECK(result->is_list()); + profile->GetPrefs()->Set(prefs::kWebAppSettings, std::move(*result)); } } // namespace test
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index 73a6ebb..ccbec68 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1656134728-aa601ad1456804521cffcb307a1a149ca045a8e0.profdata +chrome-linux-main-1656239798-b77148cd0703c3f8e66862431cc5161ddd57a9c6.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index cfb96c7..238a897 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1656069731-ff73b5f9a6d4c62f9b8ab8cc2903daebce5c1abc.profdata +chrome-mac-arm-main-1656179308-03d889a371543da26e073501a9e31245b98bf18c.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index 52f6694..0bf7d39 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1656115030-2cf35cfa7fba6082dc06cd71b27a49bd323f87d8.profdata +chrome-mac-main-1656239798-a6f456e3a5ef00f708c7a29e1494e2a5f33db7bd.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 10fe3cc7..88aebaa 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1656134728-fe4edfcafcd682ed7f1ea8a9aba754e0115dbb9f.profdata +chrome-win32-main-1656239798-addb54aec7ad60141bccf93ea015925cc0844589.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 7b8fa15..2c5f182 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1656125991-3fef2f3db534c7aa7210da04a6a19418a1a3856a.profdata +chrome-win64-main-1656254929-71920f600da3f9ae319f1285185a514291ffe8f5.profdata
diff --git a/chrome/chrome_cleaner/parsers/json_parser/test_json_parser.cc b/chrome/chrome_cleaner/parsers/json_parser/test_json_parser.cc index d289305..f38124c6e 100644 --- a/chrome/chrome_cleaner/parsers/json_parser/test_json_parser.cc +++ b/chrome/chrome_cleaner/parsers/json_parser/test_json_parser.cc
@@ -12,16 +12,15 @@ void TestJsonParser::Parse(const std::string& json, ParseDoneCallback callback) { - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_PARSE_CHROMIUM_EXTENSIONS | - base::JSON_ALLOW_TRAILING_COMMAS | - base::JSON_REPLACE_INVALID_CHARACTERS); - if (value_with_error.value) { - std::move(callback).Run(std::move(value_with_error.value), absl::nullopt); + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSON_PARSE_CHROMIUM_EXTENSIONS | + base::JSON_ALLOW_TRAILING_COMMAS | + base::JSON_REPLACE_INVALID_CHARACTERS); + if (value_with_error.has_value()) { + std::move(callback).Run(std::move(*value_with_error), absl::nullopt); } else { std::move(callback).Run( - absl::nullopt, absl::make_optional(value_with_error.error_message)); + absl::nullopt, absl::make_optional(value_with_error.error().message)); } }
diff --git a/chrome/chrome_cleaner/parsers/target/parser_impl.cc b/chrome/chrome_cleaner/parsers/target/parser_impl.cc index 69b2baf..b07b8d6 100644 --- a/chrome/chrome_cleaner/parsers/target/parser_impl.cc +++ b/chrome/chrome_cleaner/parsers/target/parser_impl.cc
@@ -23,17 +23,16 @@ void ParserImpl::ParseJson(const std::string& json, ParseJsonCallback callback) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_PARSE_CHROMIUM_EXTENSIONS | - base::JSON_ALLOW_TRAILING_COMMAS | - base::JSON_REPLACE_INVALID_CHARACTERS); - if (parsed_json.value) { - std::move(callback).Run(std::move(parsed_json.value), absl::nullopt); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSON_PARSE_CHROMIUM_EXTENSIONS | + base::JSON_ALLOW_TRAILING_COMMAS | + base::JSON_REPLACE_INVALID_CHARACTERS); + if (parsed_json.has_value()) { + std::move(callback).Run(std::move(*parsed_json), absl::nullopt); } else { std::move(callback).Run( absl::nullopt, - absl::make_optional(std::move(parsed_json.error_message))); + absl::make_optional(std::move(parsed_json.error().message))); } }
diff --git a/chrome/test/chromedriver/chrome/mobile_device.cc b/chrome/test/chromedriver/chrome/mobile_device.cc index 46a1ece..b67307d 100644 --- a/chrome/test/chromedriver/chrome/mobile_device.cc +++ b/chrome/test/chromedriver/chrome/mobile_device.cc
@@ -19,15 +19,14 @@ Status FindMobileDevice(std::string device_name, std::unique_ptr<MobileDevice>* mobile_device) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kMobileDevices, base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value) + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kMobileDevices, base::JSON_ALLOW_TRAILING_COMMAS); + if (!parsed_json.has_value()) return Status(kUnknownError, "could not parse mobile device list because " + - parsed_json.error_message); + parsed_json.error().message); base::DictionaryValue* mobile_devices; - if (!parsed_json.value->GetAsDictionary(&mobile_devices)) + if (!parsed_json->GetAsDictionary(&mobile_devices)) return Status(kUnknownError, "malformed device metrics dictionary"); base::DictionaryValue* device = NULL;
diff --git a/chrome/test/chromedriver/chrome/network_conditions.cc b/chrome/test/chromedriver/chrome/network_conditions.cc index 62afb80..94440c67 100644 --- a/chrome/test/chromedriver/chrome/network_conditions.cc +++ b/chrome/test/chromedriver/chrome/network_conditions.cc
@@ -23,17 +23,16 @@ Status FindPresetNetwork(std::string network_name, NetworkConditions* network_conditions) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kNetworks, base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value) + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kNetworks, base::JSON_ALLOW_TRAILING_COMMAS); + if (!parsed_json.has_value()) return Status(kUnknownError, "could not parse network list because " + - parsed_json.error_message); + parsed_json.error().message); - if (!parsed_json.value->is_list()) + if (!parsed_json->is_list()) return Status(kUnknownError, "malformed networks list"); - for (const auto& entry : parsed_json.value->GetListDeprecated()) { + for (const auto& entry : parsed_json->GetListDeprecated()) { const base::DictionaryValue* network = nullptr; if (!entry.GetAsDictionary(&network)) { return Status(kUnknownError,
diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc index d29a628..7f21dd0a 100644 --- a/chrome/test/chromedriver/chrome_launcher.cc +++ b/chrome/test/chromedriver/chrome_launcher.cc
@@ -1088,13 +1088,15 @@ const std::string& template_string, const base::DictionaryValue* custom_prefs, const base::FilePath& path) { - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(template_string); - base::DictionaryValue* prefs; - if (!parsed_json.value || !parsed_json.value->GetAsDictionary(&prefs)) { + if (!parsed_json.has_value()) return Status(kUnknownError, "cannot parse internal JSON template: " + - parsed_json.error_message); - } + parsed_json.error().message); + + base::DictionaryValue* prefs; + if (!parsed_json->GetAsDictionary(&prefs)) + return Status(kUnknownError, "malformed prefs dictionary"); if (custom_prefs) { for (base::DictionaryValue::Iterator it(*custom_prefs); !it.IsAtEnd();
diff --git a/chrome/test/chromedriver/performance_logger_unittest.cc b/chrome/test/chromedriver/performance_logger_unittest.cc index cfc12fe6..47b2439 100644 --- a/chrome/test/chromedriver/performance_logger_unittest.cc +++ b/chrome/test/chromedriver/performance_logger_unittest.cc
@@ -133,16 +133,15 @@ std::unique_ptr<base::DictionaryValue> ParseDictionary( const std::string& json) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json); - if (!parsed_json.value) { + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json); + if (!parsed_json.has_value()) { SCOPED_TRACE(json.c_str()); - SCOPED_TRACE(parsed_json.error_message.c_str()); + SCOPED_TRACE(parsed_json.error().message.c_str()); ADD_FAILURE(); return nullptr; } base::DictionaryValue* dict = nullptr; - if (!parsed_json.value->GetAsDictionary(&dict)) { + if (!parsed_json->GetAsDictionary(&dict)) { SCOPED_TRACE("JSON object is not a dictionary"); ADD_FAILURE(); return nullptr;
diff --git a/chrome/test/data/password/password_form_in_anonymous_iframe.html b/chrome/test/data/password/password_form_in_anonymous_iframe.html new file mode 100644 index 0000000..e77fde9 --- /dev/null +++ b/chrome/test/data/password/password_form_in_anonymous_iframe.html
@@ -0,0 +1,48 @@ +<html> +<body> +<script> + function create_iframe(src, id, anonymous) { + return new Promise(resolve => { + let iframe = document.createElement("iframe"); + iframe.anonymous = anonymous; + iframe.id = id; + iframe.src = src; + document.body.appendChild(iframe); + iframe.onload = resolve; + }); + } + + async function check_password(child) { + const element = child.getElementById('password'); + return new Promise(async resolve => { + element.onchange = () => { + if (element.value) { + resolve(element.value); + } + }; + element.onchange(); + setTimeout(() => resolve("not found"), 1000); + }); + } + + function inject_form(child) { + let form = child.createElement('form'); + form.method = "POST"; + form.name = "TestForm"; + form.action = "/password/done.html"; + child.body.appendChild(form); + let username = child.createElement('input'); + username.id = "username"; + username.type = "text"; + username.autocomplete = "username"; + form.appendChild(username); + let input = child.createElement('input'); + input.id = "password"; + input.type = "password"; + input.autocomplete = "password"; + form.appendChild(input); + } +</script> + +</body> +</html>
diff --git a/chrome/test/interaction/interaction_sequence_browser_util.cc b/chrome/test/interaction/interaction_sequence_browser_util.cc index bddd945..d7070a9 100644 --- a/chrome/test/interaction/interaction_sequence_browser_util.cc +++ b/chrome/test/interaction/interaction_sequence_browser_util.cc
@@ -154,26 +154,23 @@ return content::EvalJsResult(base::Value(), "Cannot communicate with DOMMessageQueue."); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_ALLOW_TRAILING_COMMAS); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value.has_value()) + if (!parsed_json.has_value()) return content::EvalJsResult( - base::Value(), "JSON parse error: " + parsed_json.error_message); + base::Value(), "JSON parse error: " + parsed_json.error().message); - if (!parsed_json.value->is_list() || - parsed_json.value->GetList().size() != 2U || - !parsed_json.value->GetList()[1].is_list() || - parsed_json.value->GetList()[1].GetList().size() != 2U || - !parsed_json.value->GetList()[1].GetList()[1].is_string() || - parsed_json.value->GetList()[0].GetString() != token) { + if (!parsed_json->is_list() || parsed_json->GetList().size() != 2U || + !parsed_json->GetList()[1].is_list() || + parsed_json->GetList()[1].GetList().size() != 2U || + !parsed_json->GetList()[1].GetList()[1].is_string() || + parsed_json->GetList()[0].GetString() != token) { std::ostringstream error_message; - error_message << "Received unexpected result: " - << parsed_json.value.value(); + error_message << "Received unexpected result: " << *parsed_json; return content::EvalJsResult(base::Value(), error_message.str()); } - auto& result = parsed_json.value->GetList()[1].GetList(); + auto& result = parsed_json->GetList()[1].GetList(); return content::EvalJsResult(std::move(result[0]), result[1].GetString()); }
diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc index 5e7dc0fc..6114b3f9c 100644 --- a/chrome/test/nacl/nacl_browsertest_util.cc +++ b/chrome/test/nacl/nacl_browsertest_util.cc
@@ -32,25 +32,24 @@ // Automation messages are stringified before they are sent because the // automation channel cannot handle arbitrary objects. This means we // need to decode the json twice to get the original message. - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value) + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSON_ALLOW_TRAILING_COMMAS); + if (!parsed_json.has_value()) return InternalError("Could parse automation JSON: " + json + " because " + - parsed_json.error_message); + parsed_json.error().message); - if (!parsed_json.value->is_string()) + if (!parsed_json->is_string()) return InternalError("Message was not a string: " + json); - std::string temp = parsed_json.value->GetString(); + std::string temp = parsed_json->GetString(); parsed_json = base::JSONReader::ReadAndReturnValueWithError( temp, base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value) + if (!parsed_json.has_value()) return InternalError("Could not parse message JSON: " + temp + " because " + - parsed_json.error_message); + parsed_json.error().message); base::DictionaryValue* msg; - if (!parsed_json.value->GetAsDictionary(&msg)) + if (!parsed_json->GetAsDictionary(&msg)) return InternalError("Message was not an object: " + temp); std::string type;
diff --git a/chromeos/ash/components/network/auto_connect_handler_unittest.cc b/chromeos/ash/components/network/auto_connect_handler_unittest.cc index fa71f1d..7dca04c 100644 --- a/chromeos/ash/components/network/auto_connect_handler_unittest.cc +++ b/chromeos/ash/components/network/auto_connect_handler_unittest.cc
@@ -240,12 +240,11 @@ void SetupUserPolicy(const std::string& network_configs_json) { base::Value network_configs(base::Value::Type::LIST); if (!network_configs_json.empty()) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_list()); - network_configs = std::move(*parsed_json.value); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_list()); + network_configs = std::move(*parsed_json); } managed_config_handler_->SetPolicy( ::onc::ONC_SOURCE_USER_POLICY, helper_.UserHash(), network_configs, @@ -257,12 +256,11 @@ const base::Value& global_config) { base::Value network_configs(base::Value::Type::LIST); if (!network_configs_json.empty()) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_list()); - network_configs = std::move(*parsed_json.value); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_list()); + network_configs = std::move(*parsed_json); } managed_config_handler_->SetPolicy(::onc::ONC_SOURCE_DEVICE_POLICY, std::string(), // no username hash
diff --git a/chromeos/ash/components/network/client_cert_resolver_unittest.cc b/chromeos/ash/components/network/client_cert_resolver_unittest.cc index 5be939b..6b5acc7 100644 --- a/chromeos/ash/components/network/client_cert_resolver_unittest.cc +++ b/chromeos/ash/components/network/client_cert_resolver_unittest.cc
@@ -337,15 +337,13 @@ "CommonName": "B CA" } })"; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - test_onc_pattern, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + test_onc_pattern, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; client_cert_config->onc_source = onc_source; client_cert_config->client_cert_type = ::onc::client_cert::kPattern; - client_cert_config->pattern.ReadFromONCDictionary( - parsed_json.value->GetDict()); + client_cert_config->pattern.ReadFromONCDictionary(parsed_json->GetDict()); } // Sets up a policy with a certificate pattern that matches any client cert @@ -377,17 +375,16 @@ void SetManagedNetworkPolicy(::onc::ONCSource onc_source, base::StringPiece policy_json) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - policy_json, - base::JSON_ALLOW_TRAILING_COMMAS | base::JSON_ALLOW_CONTROL_CHARS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_list()); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + policy_json, + base::JSON_ALLOW_TRAILING_COMMAS | base::JSON_ALLOW_CONTROL_CHARS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_list()); std::string user_hash = onc_source == ::onc::ONC_SOURCE_USER_POLICY ? kUserHash : ""; managed_config_handler_->SetPolicy( - onc_source, user_hash, *parsed_json.value, + onc_source, user_hash, *parsed_json, /*global_network_config=*/base::Value(base::Value::Type::DICTIONARY)); }
diff --git a/chromeos/ash/components/network/onc/onc_certificate_pattern_unittest.cc b/chromeos/ash/components/network/onc/onc_certificate_pattern_unittest.cc index 46e57537..2b222c3 100644 --- a/chromeos/ash/components/network/onc/onc_certificate_pattern_unittest.cc +++ b/chromeos/ash/components/network/onc/onc_certificate_pattern_unittest.cc
@@ -67,13 +67,12 @@ }, "IssuerCAPEMs": [ "PEM1", "PEM2" ] })"; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - pattern_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + pattern_json, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; - auto pattern = OncCertificatePattern::ReadFromONCDictionary( - parsed_json.value->GetDict()); + auto pattern = + OncCertificatePattern::ReadFromONCDictionary(parsed_json->GetDict()); ASSERT_TRUE(pattern); EXPECT_FALSE(pattern.value().Empty()); @@ -100,14 +99,13 @@ "CommonName": "B CA" } })"; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - pattern_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + pattern_json, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; { - auto pattern = OncCertificatePattern::ReadFromONCDictionary( - parsed_json.value->GetDict()); + auto pattern = + OncCertificatePattern::ReadFromONCDictionary(parsed_json->GetDict()); ASSERT_TRUE(pattern); EXPECT_FALSE(pattern.value().Empty()); @@ -115,13 +113,13 @@ } { - base::Value* issuer = parsed_json.value->FindKeyOfType( - "Issuer", base::Value::Type::DICTIONARY); + base::Value* issuer = + parsed_json->FindKeyOfType("Issuer", base::Value::Type::DICTIONARY); ASSERT_TRUE(issuer); issuer->SetKey("CommonName", base::Value("SomeOtherCA")); - auto pattern = OncCertificatePattern::ReadFromONCDictionary( - parsed_json.value->GetDict()); + auto pattern = + OncCertificatePattern::ReadFromONCDictionary(parsed_json->GetDict()); ASSERT_TRUE(pattern); EXPECT_FALSE(pattern.value().Matches(*cert_, kFakePemEncodedIssuer)); } @@ -137,14 +135,13 @@ "CommonName": "Client Cert A" } })"; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - pattern_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + pattern_json, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; { - auto pattern = OncCertificatePattern::ReadFromONCDictionary( - parsed_json.value->GetDict()); + auto pattern = + OncCertificatePattern::ReadFromONCDictionary(parsed_json->GetDict()); ASSERT_TRUE(pattern); EXPECT_FALSE(pattern.value().Empty()); @@ -152,30 +149,29 @@ } { - base::Value* issuer = parsed_json.value->FindKeyOfType( - "Subject", base::Value::Type::DICTIONARY); + base::Value* issuer = + parsed_json->FindKeyOfType("Subject", base::Value::Type::DICTIONARY); ASSERT_TRUE(issuer); issuer->SetKey("CommonName", base::Value("B CA")); - auto pattern = OncCertificatePattern::ReadFromONCDictionary( - parsed_json.value->GetDict()); + auto pattern = + OncCertificatePattern::ReadFromONCDictionary(parsed_json->GetDict()); ASSERT_TRUE(pattern); EXPECT_FALSE(pattern.value().Matches(*cert_, kFakePemEncodedIssuer)); } } TEST_F(OncCertificatePatternTest, PatternMatchingIssuerCAPEM) { - const char* pattern_json = R"( + constexpr char kPatternJson[] = R"( { "IssuerCAPEMs": ["PEM-ENCODED-ISSUER"] })"; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - pattern_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kPatternJson, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; - auto pattern = OncCertificatePattern::ReadFromONCDictionary( - parsed_json.value->GetDict()); + auto pattern = + OncCertificatePattern::ReadFromONCDictionary(parsed_json->GetDict()); ASSERT_TRUE(pattern); EXPECT_FALSE(pattern.value().Empty());
diff --git a/chromeos/components/onc/onc_utils.cc b/chromeos/components/onc/onc_utils.cc index 93fdda81..f329ef4e 100644 --- a/chromeos/components/onc/onc_utils.cc +++ b/chromeos/components/onc/onc_utils.cc
@@ -348,15 +348,18 @@ NET_LOG(DEBUG) << "Empty json string"; return base::Value(); } - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_PARSE_CHROMIUM_EXTENSIONS | - base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value || !parsed_json.value->is_dict()) { - NET_LOG(ERROR) << "Invalid JSON Dictionary: " << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json, + base::JSON_PARSE_CHROMIUM_EXTENSIONS | base::JSON_ALLOW_TRAILING_COMMAS); + if (!parsed_json.has_value()) { + NET_LOG(ERROR) << "Invalid JSON Dictionary: " + << parsed_json.error().message; + return base::Value(); + } else if (!parsed_json->is_dict()) { + NET_LOG(ERROR) << "Invalid JSON Dictionary: Expected a dictionary."; return base::Value(); } - return std::move(*parsed_json.value); + return std::move(*parsed_json); } base::Value Decrypt(const std::string& passphrase, const base::Value& root) {
diff --git a/chromeos/network/network_connection_handler_impl_unittest.cc b/chromeos/network/network_connection_handler_impl_unittest.cc index a756cbf3..399ff143 100644 --- a/chromeos/network/network_connection_handler_impl_unittest.cc +++ b/chromeos/network/network_connection_handler_impl_unittest.cc
@@ -337,12 +337,11 @@ void SetupUserPolicy(const std::string& network_configs_json) { base::Value network_configs(base::Value::Type::LIST); if (!network_configs_json.empty()) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_list()); - network_configs = std::move(*parsed_json.value); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_list()); + network_configs = std::move(*parsed_json); } managed_config_handler_->SetPolicy( ::onc::ONC_SOURCE_USER_POLICY, helper_.UserHash(), network_configs, @@ -354,12 +353,11 @@ const base::Value& global_config) { base::Value network_configs(base::Value::Type::LIST); if (!network_configs_json.empty()) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_list()); - network_configs = std::move(*parsed_json.value); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_list()); + network_configs = std::move(*parsed_json); } managed_config_handler_->SetPolicy(::onc::ONC_SOURCE_DEVICE_POLICY, std::string(), // no username hash
diff --git a/chromeos/profiles/atom.afdo.newest.txt b/chromeos/profiles/atom.afdo.newest.txt index b886b9e..f2e7efb 100644 --- a/chromeos/profiles/atom.afdo.newest.txt +++ b/chromeos/profiles/atom.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-atom-105-5112.9-1655719210-benchmark-105.0.5134.0-r1-redacted.afdo.xz +chromeos-chrome-amd64-atom-105-5112.9-1655719210-benchmark-105.0.5140.0-r1-redacted.afdo.xz
diff --git a/chromeos/profiles/bigcore.afdo.newest.txt b/chromeos/profiles/bigcore.afdo.newest.txt index 978b7cf2f..1409360 100644 --- a/chromeos/profiles/bigcore.afdo.newest.txt +++ b/chromeos/profiles/bigcore.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-bigcore-105-5087.0-1655717739-benchmark-105.0.5134.0-r1-redacted.afdo.xz +chromeos-chrome-amd64-bigcore-105-5087.0-1655717739-benchmark-105.0.5140.0-r1-redacted.afdo.xz
diff --git a/chromeos/strings/chromeos_strings_en-GB.xtb b/chromeos/strings/chromeos_strings_en-GB.xtb index d965bd7..030ef29 100644 --- a/chromeos/strings/chromeos_strings_en-GB.xtb +++ b/chromeos/strings/chromeos_strings_en-GB.xtb
@@ -153,6 +153,7 @@ <translation id="2163937499206714165">Turn dark mode on</translation> <translation id="2177831236093724629"><ph name="LINK_BEGIN" />Unqualified components<ph name="LINK_END" /> found. To make sure that all qualified components are identified, update your Chrome OS to the latest version.</translation> <translation id="2180197493692062006">Something went wrong. Try reopening the app.</translation> +<translation id="2182088270354640012">Thanks for the feedback. Your feedback helps improve Chrome OS and will be reviewed by the Chrome OS team. Because of the number of reports submitted, you won’t receive a direct reply.</translation> <translation id="2209788852729124853">Reset traffic counters</translation> <translation id="2212733584906323460">Name resolution</translation> <translation id="2217935453350629363">Current speed</translation> @@ -201,6 +202,7 @@ <translation id="253029298928638905">Restarting...</translation> <translation id="2533048460510040082">Suggested help content</translation> <translation id="2536159006530886390">Cannot connect to Internet.</translation> +<translation id="256360469103926202">Your feedback helps improve Chrome OS and will be reviewed by our team. Because of the large number of reports, we won’t be able to send a reply.</translation> <translation id="2570743873672969996">Running <ph name="TEST_NAME" /> test…</translation> <translation id="2584559707064218956">To set up, go to Settings</translation> <translation id="2619761439309613843">Daily Refresh</translation> @@ -256,6 +258,7 @@ <translation id="3226405216343213872">Looking for scanners</translation> <translation id="3246869037381808805">Print jobs older than 1 day will be removed</translation> <translation id="3268178239013324452">Failed – Door open</translation> +<translation id="3275729367986477355">Avatar image</translation> <translation id="3283504360622356314">{0,plural, =1{Edit file}other{Edit files}}</translation> <translation id="3286515922899063534"><ph name="CURRENT" /> GHz</translation> <translation id="3291996639387199448">Key direction</translation> @@ -429,6 +432,7 @@ <translation id="4793710386569335688">For more help, go to the <ph name="BEGIN_LINK" />Help Centre<ph name="END_LINK" />.</translation> <translation id="4793756956024303490">Compression algorithm</translation> <translation id="4794140124556169553">Running a CPU test may affect your system performance</translation> +<translation id="4800589996161293643">Chromebook community</translation> <translation id="4804818685124855865">Disconnect</translation> <translation id="4808449224298348341">Cancelled print job <ph name="DOCUMENT_TITLE" /></translation> <translation id="4809927044794281115">Light theme</translation> @@ -488,6 +492,7 @@ Try tapping the mic to ask me anything.</translation> <translation id="5212593641110061691">Tabloid</translation> <translation id="5222676887888702881">Sign out</translation> +<translation id="522307662484862935">Don't include email address</translation> <translation id="5227902338748591677">Dark theme schedule</translation> <translation id="5234764350956374838">Dismiss</translation> <translation id="5252456968953390977">Roaming</translation> @@ -614,6 +619,7 @@ <translation id="6284632978374966585">Turn Dark theme on</translation> <translation id="6295178529664209245">Continue repair?</translation> <translation id="6302401976930124515"><ph name="TEST_NAME" /> test has been cancelled</translation> +<translation id="631063167932043783">Explore app</translation> <translation id="6319207335391420837">Update firmware on <ph name="DEVICE_NAME" /></translation> <translation id="6321407676395378991">Turn on screensaver</translation> <translation id="6325525973963619867">Failed</translation> @@ -720,6 +726,7 @@ <translation id="7297226631177386107">Can't connect through firewall to HTTPS websites</translation> <translation id="7302860742311162920">ICCID</translation> <translation id="7305884605064981971">EDGE</translation> +<translation id="7308203371573257315">Ask the experts in the Chromebook Help forum</translation> <translation id="7319430975418800333">A3</translation> <translation id="7343581795491695942"><ph name="QUERY_TEXT" />; <ph name="RESULT_TEXT" />; press Search plus Space to see the result in Google Search.</translation> <translation id="7343649194310845056">Network devices</translation> @@ -762,6 +769,7 @@ <translation id="773153675489693198">Cycle count</translation> <translation id="7747039790905080783">Pre-shared key</translation> <translation id="7762130827864645708">Your password change was successful. Please use the new password from now on.</translation> +<translation id="7762839321248874531">Send <ph name="BEGIN_LINK1" />system and app info<ph name="END_LINK1" /> and <ph name="BEGIN_LINK2" />metrics<ph name="END_LINK2" /></translation> <translation id="7763470514545477072">Domain suffix match</translation> <translation id="7769672763586021400">Model ID</translation> <translation id="7784116172884276937">No DNS servers are set up</translation> @@ -831,6 +839,7 @@ <translation id="8382302752385457774">White-label</translation> <translation id="8395584934117017006">This <ph name="DEVICE_TYPE" /> is enterprise managed</translation> <translation id="8398927464629426868">The rate at which the device is currently charging or discharging</translation> +<translation id="8420955526972171689">Run tests and troubleshooting for hardware issues</translation> <translation id="8422748173858722634">IMEI</translation> <translation id="8428073762635678092">Internal keyboard</translation> <translation id="8431300646573772016">What's new with Chrome OS</translation>
diff --git a/components/autofill_assistant/browser/autofill_assistant_onboarding_fetcher.cc b/components/autofill_assistant/browser/autofill_assistant_onboarding_fetcher.cc index 0509a95..74e5ef8 100644 --- a/components/autofill_assistant/browser/autofill_assistant_onboarding_fetcher.cc +++ b/components/autofill_assistant/browser/autofill_assistant_onboarding_fetcher.cc
@@ -124,17 +124,16 @@ return Metrics::OnboardingFetcherResultStatus::kNoBody; } - base::JSONReader::ValueWithError data = - base::JSONReader::ReadAndReturnValueWithError(*response_body); + auto data = base::JSONReader::ReadAndReturnValueWithError(*response_body); - if (data.value == absl::nullopt) { - DVLOG(1) << "Parse error: " << data.error_message; + if (!data.has_value()) { + DVLOG(1) << "Parse error: " << data.error().message; return Metrics::OnboardingFetcherResultStatus::kInvalidJson; } - if (!data.value->is_dict()) { + if (!data->is_dict()) { return Metrics::OnboardingFetcherResultStatus::kInvalidData; } - return ExtractStrings(*data.value, onboarding_strings_) + return ExtractStrings(*data, onboarding_strings_) ? Metrics::OnboardingFetcherResultStatus::kOk : Metrics::OnboardingFetcherResultStatus::kInvalidData; }
diff --git a/components/autofill_assistant/browser/starter_heuristic.cc b/components/autofill_assistant/browser/starter_heuristic.cc index 872876f..e68a7e5 100644 --- a/components/autofill_assistant/browser/starter_heuristic.cc +++ b/components/autofill_assistant/browser/starter_heuristic.cc
@@ -55,14 +55,16 @@ VLOG(2) << "Field trial parameter not set"; return; } - absl::optional<base::Value> dict = base::JSONReader::Read(parameters); - if (!dict || !dict->is_dict()) { + auto dict = base::JSONReader::ReadAndReturnValueWithError(parameters); + if (!dict.has_value() || !dict->is_dict()) { VLOG(1) << "Failed to parse field trial params as JSON object: " << parameters; if (VLOG_IS_ON(1)) { - auto err = base::JSONReader::ReadAndReturnValueWithError(parameters); - VLOG(1) << err.error_message << ", line: " << err.error_line - << ", col: " << err.error_column; + if (dict.has_value()) + VLOG(1) << "Expecting a dictionary"; + else + VLOG(1) << dict.error().message << ", line: " << dict.error().line + << ", col: " << dict.error().column; } return; }
diff --git a/components/certificate_transparency/data/log_list.json b/components/certificate_transparency/data/log_list.json index a6fd9b6..0878682 100644 --- a/components/certificate_transparency/data/log_list.json +++ b/components/certificate_transparency/data/log_list.json
@@ -1,6 +1,6 @@ { - "version": "10.22", - "log_list_timestamp": "2022-06-24T12:54:15Z", + "version": "10.24", + "log_list_timestamp": "2022-06-26T12:58:21Z", "operators": [ { "name": "Google",
diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc index 21bd9e3..b7991006 100644 --- a/components/cronet/url_request_context_config.cc +++ b/components/cronet/url_request_context_config.cc
@@ -355,20 +355,19 @@ if (unparsed_experimental_options.empty()) unparsed_experimental_options = "{}"; DVLOG(1) << "Experimental Options:" << unparsed_experimental_options; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - unparsed_experimental_options); - if (!parsed_json.value) { + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + unparsed_experimental_options); + if (!parsed_json.has_value()) { LOG(ERROR) << "Parsing experimental options failed: '" << unparsed_experimental_options << "', error " - << parsed_json.error_message; + << parsed_json.error().message; return absl::nullopt; } - base::Value::Dict* experimental_options_dict = parsed_json.value->GetIfDict(); + base::Value::Dict* experimental_options_dict = parsed_json->GetIfDict(); if (!experimental_options_dict) { LOG(ERROR) << "Experimental options string is not a dictionary: " - << *parsed_json.value; + << *parsed_json; return absl::nullopt; }
diff --git a/components/desks_storage/core/desk_model.cc b/components/desks_storage/core/desk_model.cc index fdedbf0..fc48adab 100644 --- a/components/desks_storage/core/desk_model.cc +++ b/components/desks_storage/core/desk_model.cc
@@ -61,17 +61,16 @@ policy_entries_.clear(); base::StringPiece raw_json = base::StringPiece(policy_json); - base::JSONReader::ValueWithError parsed_list = - base::JSONReader::ReadAndReturnValueWithError(raw_json); - if (!parsed_list.value) + auto parsed_list = base::JSONReader::ReadAndReturnValueWithError(raw_json); + if (!parsed_list.has_value()) return; - if (!parsed_list.value->is_list()) { + if (!parsed_list->is_list()) { LOG(WARNING) << "Expected JSON list in admin templates policy."; return; } - for (auto& desk_template : parsed_list.value->GetListDeprecated()) { + for (auto& desk_template : parsed_list->GetListDeprecated()) { std::unique_ptr<ash::DeskTemplate> dt = desk_template_conversion::ParseDeskTemplateFromSource( desk_template, ash::DeskTemplateSource::kPolicy);
diff --git a/components/desks_storage/core/desk_sync_bridge_unittest.cc b/components/desks_storage/core/desk_sync_bridge_unittest.cc index 4be31838..8653f6b 100644 --- a/components/desks_storage/core/desk_sync_bridge_unittest.cc +++ b/components/desks_storage/core/desk_sync_bridge_unittest.cc
@@ -1703,12 +1703,11 @@ EXPECT_TRUE(!templates_json.empty()); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - base::StringPiece(templates_json)); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + base::StringPiece(templates_json)); - EXPECT_TRUE(parsed_json.value.has_value()); - EXPECT_TRUE(parsed_json.value->is_list()); + EXPECT_TRUE(parsed_json.has_value()); + EXPECT_TRUE(parsed_json->is_list()); // Content of the conversion is tested in: // components/desks_storage/core/desk_template_conversion_unittests.cc
diff --git a/components/desks_storage/core/desk_template_conversion_unittests.cc b/components/desks_storage/core/desk_template_conversion_unittests.cc index 1e0f941..8051cfe 100644 --- a/components/desks_storage/core/desk_template_conversion_unittests.cc +++ b/components/desks_storage/core/desk_template_conversion_unittests.cc
@@ -126,15 +126,14 @@ TEST_F(DeskTemplateConversionTest, ParseBrowserTemplate) { base::StringPiece raw_json = base::StringPiece(kValidTemplateBrowser); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(raw_json); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(raw_json); - EXPECT_TRUE(parsed_json.value.has_value()); - EXPECT_TRUE(parsed_json.value->is_dict()); + EXPECT_TRUE(parsed_json.has_value()); + EXPECT_TRUE(parsed_json->is_dict()); std::unique_ptr<ash::DeskTemplate> dt = desk_template_conversion::ParseDeskTemplateFromSource( - parsed_json.value.value(), ash::DeskTemplateSource::kPolicy); + *parsed_json, ash::DeskTemplateSource::kPolicy); EXPECT_TRUE(dt != nullptr); EXPECT_EQ(dt->uuid(), base::GUID::ParseCaseInsensitive(kTestUuidBrowser)); @@ -186,15 +185,14 @@ TEST_F(DeskTemplateConversionTest, ParseChromePwaTemplate) { base::StringPiece raw_json = base::StringPiece(kValidTemplateChromeAndProgressive); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(raw_json); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(raw_json); - EXPECT_TRUE(parsed_json.value.has_value()); - EXPECT_TRUE(parsed_json.value->is_dict()); + EXPECT_TRUE(parsed_json.has_value()); + EXPECT_TRUE(parsed_json->is_dict()); std::unique_ptr<ash::DeskTemplate> dt = desk_template_conversion::ParseDeskTemplateFromSource( - parsed_json.value.value(), ash::DeskTemplateSource::kPolicy); + *parsed_json, ash::DeskTemplateSource::kPolicy); EXPECT_TRUE(dt != nullptr); EXPECT_EQ(dt->uuid(), @@ -273,44 +271,41 @@ TEST_F(DeskTemplateConversionTest, EmptyJsonTest) { base::StringPiece raw_json = base::StringPiece(kEmptyJson); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(raw_json); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(raw_json); - EXPECT_TRUE(parsed_json.value.has_value()); - EXPECT_TRUE(parsed_json.value->is_dict()); + EXPECT_TRUE(parsed_json.has_value()); + EXPECT_TRUE(parsed_json->is_dict()); std::unique_ptr<ash::DeskTemplate> dt = desk_template_conversion::ParseDeskTemplateFromSource( - parsed_json.value.value(), ash::DeskTemplateSource::kPolicy); + *parsed_json, ash::DeskTemplateSource::kPolicy); EXPECT_TRUE(dt == nullptr); } TEST_F(DeskTemplateConversionTest, ParsesWithDefaultValueSetToTemplates) { base::StringPiece raw_json = base::StringPiece(kTemplateWithoutType); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(raw_json); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(raw_json); - EXPECT_TRUE(parsed_json.value.has_value()); - EXPECT_TRUE(parsed_json.value->is_dict()); + EXPECT_TRUE(parsed_json.has_value()); + EXPECT_TRUE(parsed_json->is_dict()); std::unique_ptr<ash::DeskTemplate> dt = desk_template_conversion::ParseDeskTemplateFromSource( - parsed_json.value.value(), ash::DeskTemplateSource::kPolicy); + *parsed_json, ash::DeskTemplateSource::kPolicy); EXPECT_TRUE(dt); EXPECT_EQ(ash::DeskTemplateType::kTemplate, dt->type()); } TEST_F(DeskTemplateConversionTest, DeskTemplateFromJsonBrowserTest) { base::StringPiece raw_json = base::StringPiece(kValidTemplateBrowser); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(raw_json); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(raw_json); - EXPECT_TRUE(parsed_json.value.has_value()); - EXPECT_TRUE(parsed_json.value->is_dict()); + EXPECT_TRUE(parsed_json.has_value()); + EXPECT_TRUE(parsed_json->is_dict()); std::unique_ptr<ash::DeskTemplate> desk_template = desk_template_conversion::ParseDeskTemplateFromSource( - parsed_json.value.value(), ash::DeskTemplateSource::kPolicy); + *parsed_json, ash::DeskTemplateSource::kPolicy); apps::AppRegistryCache* app_cache = apps::AppRegistryCacheWrapper::Get().GetAppRegistryCache(account_id_); @@ -319,20 +314,19 @@ desk_template_conversion::SerializeDeskTemplateAsPolicy( desk_template.get(), app_cache); - EXPECT_EQ(parsed_json.value, desk_template_value); + EXPECT_EQ(*parsed_json, desk_template_value); } TEST_F(DeskTemplateConversionTest, ToJsonIgnoreUnsupportedApp) { base::StringPiece raw_json = base::StringPiece(kValidTemplateBrowser); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(raw_json); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(raw_json); - EXPECT_TRUE(parsed_json.value.has_value()); - EXPECT_TRUE(parsed_json.value->is_dict()); + EXPECT_TRUE(parsed_json.has_value()); + EXPECT_TRUE(parsed_json->is_dict()); std::unique_ptr<ash::DeskTemplate> desk_template = desk_template_conversion::ParseDeskTemplateFromSource( - parsed_json.value.value(), ash::DeskTemplateSource::kUser); + *parsed_json, ash::DeskTemplateSource::kUser); // Adding this unsupported app should not change the serialized JSON content. saved_desk_test_util::AddGenericAppWindow( @@ -346,21 +340,20 @@ desk_template_conversion::SerializeDeskTemplateAsPolicy( desk_template.get(), app_cache); - EXPECT_EQ(parsed_json.value, desk_template_value); + EXPECT_EQ(*parsed_json, desk_template_value); } TEST_F(DeskTemplateConversionTest, DeskTemplateFromJsonAppTest) { base::StringPiece raw_json = base::StringPiece(kValidTemplateChromeAndProgressive); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(raw_json); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(raw_json); - EXPECT_TRUE(parsed_json.value.has_value()); - EXPECT_TRUE(parsed_json.value->is_dict()); + EXPECT_TRUE(parsed_json.has_value()); + EXPECT_TRUE(parsed_json->is_dict()); std::unique_ptr<ash::DeskTemplate> desk_template = desk_template_conversion::ParseDeskTemplateFromSource( - parsed_json.value.value(), ash::DeskTemplateSource::kPolicy); + *parsed_json, ash::DeskTemplateSource::kPolicy); apps::AppRegistryCache* app_cache = apps::AppRegistryCacheWrapper::Get().GetAppRegistryCache(account_id_); @@ -369,7 +362,7 @@ desk_template_conversion::SerializeDeskTemplateAsPolicy( desk_template.get(), app_cache); - EXPECT_EQ(parsed_json.value, desk_template_value); + EXPECT_EQ(*parsed_json, desk_template_value); } TEST_F(DeskTemplateConversionTest, EnsureLacrosBrowserWindowsSavedProperly) {
diff --git a/components/fuchsia_component_support/config_reader.cc b/components/fuchsia_component_support/config_reader.cc index 46055674..e03d8ab9 100644 --- a/components/fuchsia_component_support/config_reader.cc +++ b/components/fuchsia_component_support/config_reader.cc
@@ -38,13 +38,12 @@ bool loaded = base::ReadFileToString(path, &file_content); CHECK(loaded) << "Couldn't read config file: " << path; - base::JSONReader::ValueWithError parsed = - base::JSONReader::ReadAndReturnValueWithError(file_content); - CHECK(parsed.value) << "Failed to parse " << path << ": " - << parsed.error_message; - CHECK(parsed.value->is_dict()) << "Config is not a JSON dictionary: " << path; + auto parsed = base::JSONReader::ReadAndReturnValueWithError(file_content); + CHECK(parsed.has_value()) + << "Failed to parse " << path << ": " << parsed.error().message; + CHECK(parsed->is_dict()) << "Config is not a JSON dictionary: " << path; - return std::move(*parsed.value); + return std::move(*parsed); } absl::optional<base::Value> ReadConfigsFromDir(const base::FilePath& dir) {
diff --git a/components/invalidation/impl/invalidator_registrar_with_memory_unittest.cc b/components/invalidation/impl/invalidator_registrar_with_memory_unittest.cc index 66e2db7..c73d6a4 100644 --- a/components/invalidation/impl/invalidator_registrar_with_memory_unittest.cc +++ b/components/invalidation/impl/invalidator_registrar_with_memory_unittest.cc
@@ -284,8 +284,8 @@ auto stored_topics = base::JSONReader::ReadAndReturnValueWithError(kStoredTopicsJson); - ASSERT_TRUE(stored_topics.value) << stored_topics.error_message; - pref_service.Set(kTopicsToHandler, std::move(*stored_topics.value)); + ASSERT_TRUE(stored_topics.has_value()) << stored_topics.error().message; + pref_service.Set(kTopicsToHandler, std::move(*stored_topics)); // Create an invalidator and make sure it correctly restored state from the // pref. @@ -342,12 +342,12 @@ }})"; auto initial_stored_topics = base::JSONReader::ReadAndReturnValueWithError(kInitialStoredTopics); - ASSERT_TRUE(initial_stored_topics.value) - << initial_stored_topics.error_message; + ASSERT_TRUE(initial_stored_topics.has_value()) + << initial_stored_topics.error().message; - pref_service.Set(kTopicsToHandler, initial_stored_topics.value->Clone()); + pref_service.Set(kTopicsToHandler, initial_stored_topics->Clone()); - ASSERT_EQ(*initial_stored_topics.value, *pref_service.Get(kTopicsToHandler)); + ASSERT_EQ(*initial_stored_topics, *pref_service.Get(kTopicsToHandler)); InvalidatorRegistrarWithMemory::ClearTopicsWithObsoleteOwnerNames( &pref_service); @@ -366,10 +366,10 @@ "sender_full_of_cloud": {}})"; auto expected_stored_topics = base::JSONReader::ReadAndReturnValueWithError(kExpectedStoredTopics); - ASSERT_TRUE(expected_stored_topics.value) - << expected_stored_topics.error_message; + ASSERT_TRUE(expected_stored_topics.has_value()) + << expected_stored_topics.error().message; - EXPECT_EQ(*expected_stored_topics.value, *pref_service.Get(kTopicsToHandler)); + EXPECT_EQ(*expected_stored_topics, *pref_service.Get(kTopicsToHandler)); } // This test verifies that topics are not unsubscribed after browser restart @@ -396,8 +396,8 @@ auto stored_topics = base::JSONReader::ReadAndReturnValueWithError(kStoredTopicsJson); - ASSERT_TRUE(stored_topics.value) << stored_topics.error_message; - pref_service.Set(kTopicsToHandler, std::move(*stored_topics.value)); + ASSERT_TRUE(stored_topics.has_value()) << stored_topics.error().message; + pref_service.Set(kTopicsToHandler, std::move(*stored_topics)); auto invalidator = std::make_unique<InvalidatorRegistrarWithMemory>( &pref_service, "sender_id", /*migrate_old_prefs=*/false);
diff --git a/components/nacl/renderer/json_manifest.cc b/components/nacl/renderer/json_manifest.cc index bd6f2c2..e9edf50f 100644 --- a/components/nacl/renderer/json_manifest.cc +++ b/components/nacl/renderer/json_manifest.cc
@@ -388,16 +388,16 @@ ErrorInfo* error_info) { CHECK(error_info); - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(manifest_json_data); - if (!parsed_json.value) { + if (!parsed_json.has_value()) { error_info->error = PP_NACL_ERROR_MANIFEST_PARSING; error_info->string = std::string("manifest JSON parsing failed: ") + - parsed_json.error_message; + parsed_json.error().message; return false; } std::unique_ptr<base::Value> json_data = - base::Value::ToUniquePtrValue(std::move(*parsed_json.value)); + base::Value::ToUniquePtrValue(std::move(*parsed_json)); // Ensure it's actually a dictionary before capturing as dictionary_. base::DictionaryValue* json_dict = nullptr; if (!json_data->GetAsDictionary(&json_dict)) {
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc index 6d5f972..0d7bd898 100644 --- a/components/nacl/renderer/ppb_nacl_private_impl.cc +++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -1220,32 +1220,34 @@ buffer.get()[rc] = 0; // Expect the JSON file to contain a top-level object (dictionary). - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(buffer.get()); - std::unique_ptr<base::DictionaryValue> json_dict; - if (parsed_json.value) { - json_dict = base::DictionaryValue::From( - base::Value::ToUniquePtrValue(std::move(*parsed_json.value))); - } - if (!json_dict) { + + if (!parsed_json.has_value()) { load_manager->ReportLoadError( PP_NACL_ERROR_PNACL_RESOURCE_FETCH, std::string("Parsing resource info failed: JSON parse error: ") + - parsed_json.error_message); + parsed_json.error().message); return PP_FALSE; } - std::string pnacl_llc_name; - if (json_dict->GetString("pnacl-llc-name", &pnacl_llc_name)) - *llc_tool_name = ppapi::StringVar::StringToPPVar(pnacl_llc_name); + auto* json_dict = parsed_json->GetIfDict(); + if (!json_dict) { + load_manager->ReportLoadError( + PP_NACL_ERROR_PNACL_RESOURCE_FETCH, + std::string("Parsing resource info failed: JSON parse error: Not a " + "dictionary.")); + return PP_FALSE; + } - std::string pnacl_ld_name; - if (json_dict->GetString("pnacl-ld-name", &pnacl_ld_name)) - *ld_tool_name = ppapi::StringVar::StringToPPVar(pnacl_ld_name); + if (auto* pnacl_llc_name = json_dict->FindString("pnacl-llc-name")) + *llc_tool_name = ppapi::StringVar::StringToPPVar(*pnacl_llc_name); - std::string pnacl_sz_name; - if (json_dict->GetString("pnacl-sz-name", &pnacl_sz_name)) - *subzero_tool_name = ppapi::StringVar::StringToPPVar(pnacl_sz_name); + if (auto* pnacl_ld_name = json_dict->FindString("pnacl-ld-name")) + *ld_tool_name = ppapi::StringVar::StringToPPVar(*pnacl_ld_name); + + if (auto* pnacl_sz_name = json_dict->FindString("pnacl-sz-name")) + *subzero_tool_name = ppapi::StringVar::StringToPPVar(*pnacl_sz_name); return PP_TRUE; }
diff --git a/components/ntp_snippets/remote/json_request_unittest.cc b/components/ntp_snippets/remote/json_request_unittest.cc index 302b680..fde6bf12 100644 --- a/components/ntp_snippets/remote/json_request_unittest.cc +++ b/components/ntp_snippets/remote/json_request_unittest.cc
@@ -52,15 +52,14 @@ return false; } - base::JSONReader::ValueWithError actual = - base::JSONReader::ReadAndReturnValueWithError(arg); - if (!actual.value) { - *result_listener << "input:" << actual.error_line << ":" - << actual.error_column << ": " - << "parse error: " << actual.error_message; + auto actual = base::JSONReader::ReadAndReturnValueWithError(arg); + if (!actual.has_value()) { + *result_listener << "input:" << actual.error().line << ":" + << actual.error().column << ": " + << "parse error: " << actual.error().message; return false; } - return *expected == *actual.value; + return *expected == *actual; } } // namespace
diff --git a/components/ntp_snippets/remote/remote_suggestion_unittest.cc b/components/ntp_snippets/remote/remote_suggestion_unittest.cc index c3bc9c7..50069d84 100644 --- a/components/ntp_snippets/remote/remote_suggestion_unittest.cc +++ b/components/ntp_snippets/remote/remote_suggestion_unittest.cc
@@ -70,9 +70,10 @@ auto json_parsed = base::JSONReader::ReadAndReturnValueWithError( kJsonStr, base::JSON_PARSE_RFC); - CHECK(json_parsed.value) << "error_message: " << json_parsed.error_message; + CHECK(json_parsed.has_value()) + << "error_message: " << json_parsed.error().message; auto dict = base::DictionaryValue::From( - std::make_unique<base::Value>(std::move(json_parsed).value.value())); + std::make_unique<base::Value>(std::move(*json_parsed))); return std::move(*dict); }
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher_impl_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_fetcher_impl_unittest.cc index ac4a2ba..7a11d56 100644 --- a/components/ntp_snippets/remote/remote_suggestions_fetcher_impl_unittest.cc +++ b/components/ntp_snippets/remote/remote_suggestions_fetcher_impl_unittest.cc
@@ -152,12 +152,11 @@ void ParseJson(const std::string& json, SuccessCallback success_callback, ErrorCallback error_callback) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json); - if (parsed_json.value) { - std::move(success_callback).Run(std::move(*parsed_json.value)); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json); + if (parsed_json.has_value()) { + std::move(success_callback).Run(std::move(*parsed_json)); } else { - std::move(error_callback).Run(std::move(parsed_json.error_message)); + std::move(error_callback).Run(std::move(parsed_json.error().message)); } }
diff --git a/components/password_manager/content/browser/content_password_manager_driver.cc b/components/password_manager/content/browser/content_password_manager_driver.cc index 75854f62..b08cb9f 100644 --- a/components/password_manager/content/browser/content_password_manager_driver.cc +++ b/components/password_manager/content/browser/content_password_manager_driver.cc
@@ -110,9 +110,15 @@ void ContentPasswordManagerDriver::BindPendingReceiver( mojo::PendingAssociatedReceiver<autofill::mojom::PasswordManagerDriver> pending_receiver) { + if (render_frame_host_->IsAnonymous()) + return; password_manager_receiver_.Bind(std::move(pending_receiver)); } +void ContentPasswordManagerDriver::UnbindReceiver() { + password_manager_receiver_.reset(); +} + int ContentPasswordManagerDriver::GetId() const { return id_; }
diff --git a/components/password_manager/content/browser/content_password_manager_driver.h b/components/password_manager/content/browser/content_password_manager_driver.h index 9a48e2b..3236c988 100644 --- a/components/password_manager/content/browser/content_password_manager_driver.h +++ b/components/password_manager/content/browser/content_password_manager_driver.h
@@ -54,6 +54,7 @@ void BindPendingReceiver( mojo::PendingAssociatedReceiver<autofill::mojom::PasswordManagerDriver> pending_receiver); + void UnbindReceiver(); // PasswordManagerDriver implementation. int GetId() const override;
diff --git a/components/password_manager/content/browser/content_password_manager_driver_factory.cc b/components/password_manager/content/browser/content_password_manager_driver_factory.cc index 163d7ae9..01dfd56 100644 --- a/components/password_manager/content/browser/content_password_manager_driver_factory.cc +++ b/components/password_manager/content/browser/content_password_manager_driver_factory.cc
@@ -109,8 +109,18 @@ void ContentPasswordManagerDriverFactory::DidFinishNavigation( content::NavigationHandle* navigation) { - if (!navigation->IsInPrimaryMainFrame() || navigation->IsSameDocument() || - !navigation->HasCommitted()) { + if (navigation->IsSameDocument() || !navigation->HasCommitted()) { + return; + } + + // Unbind receiver if the frame is anonymous, noted that anonymous frames are + // always iframes. + if (!navigation->IsInPrimaryMainFrame()) { + if (auto* driver = GetDriverForFrame(navigation->GetRenderFrameHost())) { + if (navigation->GetRenderFrameHost()->IsAnonymous()) { + driver->UnbindReceiver(); + } + } return; }
diff --git a/components/password_manager/core/browser/password_scripts_fetcher_impl.cc b/components/password_manager/core/browser/password_scripts_fetcher_impl.cc index fa13330..3de1dae 100644 --- a/components/password_manager/core/browser/password_scripts_fetcher_impl.cc +++ b/components/password_manager/core/browser/password_scripts_fetcher_impl.cc
@@ -262,18 +262,17 @@ if (!response_body) return {ParsingResult::kNoResponse}; - base::JSONReader::ValueWithError data = - base::JSONReader::ReadAndReturnValueWithError(*response_body); + auto data = base::JSONReader::ReadAndReturnValueWithError(*response_body); - if (data.value == absl::nullopt) { - DVLOG(1) << "Parse error: " << data.error_message; + if (!data.has_value()) { + DVLOG(1) << "Parse error: " << data.error().message; return {ParsingResult::kInvalidJson}; } - if (!data.value->is_dict()) + if (!data->is_dict()) return {ParsingResult::kInvalidJson}; base::flat_set<ParsingResult> warnings; - for (const auto script_it : data.value->DictItems()) { + for (const auto script_it : data->DictItems()) { // |script_it.first| is an identifier (normally, a domain name, e.g. // example.com) that we don't care about. // |script_it.second| provides domain-specific parameters.
diff --git a/components/policy/core/browser/configuration_policy_handler.cc b/components/policy/core/browser/configuration_policy_handler.cc index 9fe9887..88fa252 100644 --- a/components/policy/core/browser/configuration_policy_handler.cc +++ b/components/policy/core/browser/configuration_policy_handler.cc
@@ -568,14 +568,13 @@ const std::string& json_string, PolicyErrorMap* errors, int index) { - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - json_string, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - if (!value_with_error.value) { + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + json_string, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + if (!value_with_error.has_value()) { if (errors) { errors->AddError(policy_name(), ErrorPath(index, ""), IDS_POLICY_INVALID_JSON_ERROR, - value_with_error.error_message); + value_with_error.error().message); } return false; } @@ -587,9 +586,8 @@ // Even though we are validating this schema here, we don't actually change // the policy if it fails to validate. This validation is just so we can show // the user errors. - bool validated = json_string_schema.Validate(value_with_error.value.value(), - SCHEMA_ALLOW_UNKNOWN, - &error_path, &schema_error); + bool validated = json_string_schema.Validate( + *value_with_error, SCHEMA_ALLOW_UNKNOWN, &error_path, &schema_error); if (errors && !schema_error.empty()) errors->AddError(policy_name(), ErrorPath(index, error_path), schema_error); if (!validated)
diff --git a/components/policy/core/browser/configuration_policy_handler_unittest.cc b/components/policy/core/browser/configuration_policy_handler_unittest.cc index cea6902..4698665 100644 --- a/components/policy/core/browser/configuration_policy_handler_unittest.cc +++ b/components/policy/core/browser/configuration_policy_handler_unittest.cc
@@ -699,12 +699,12 @@ " \"Colors\": \"White\"" " }" "}"; - base::JSONReader::ValueWithError parsed_json_or_error = - base::JSONReader::ReadAndReturnValueWithError( - kPolicyMapJson, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json_or_error.value) << parsed_json_or_error.error_message; + auto parsed_json_or_error = base::JSONReader::ReadAndReturnValueWithError( + kPolicyMapJson, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json_or_error.has_value()) + << parsed_json_or_error.error().message; - base::Value& parsed_json = parsed_json_or_error.value.value(); + base::Value& parsed_json = *parsed_json_or_error; ASSERT_TRUE(parsed_json.is_dict()); PolicyMap policy_map; @@ -744,16 +744,15 @@ " \"Apples\": \"Red\"" " }" "}"; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kPolicyMapJson, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_dict()); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kPolicyMapJson, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_dict()); PolicyMap policy_map; - policy_map.LoadFrom( - &base::Value::AsDictionaryValue(parsed_json.value.value()), - POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD); + policy_map.LoadFrom(&base::Value::AsDictionaryValue(*parsed_json), + POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, + POLICY_SOURCE_CLOUD); TestSchemaValidatingPolicyHandler handler(schema, SCHEMA_ALLOW_UNKNOWN); std::unique_ptr<base::Value> output_value; @@ -801,21 +800,20 @@ " \"Colors\": \"Green\"" " }" "}"; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kPolicyMapJson, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_dict()); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kPolicyMapJson, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_dict()); PolicyMap policy_map_recommended; - policy_map_recommended.LoadFrom( - &base::Value::AsDictionaryValue(parsed_json.value.value()), - POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD); + policy_map_recommended.LoadFrom(&base::Value::AsDictionaryValue(*parsed_json), + POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, + POLICY_SOURCE_CLOUD); PolicyMap policy_map_mandatory; - policy_map_mandatory.LoadFrom( - &base::Value::AsDictionaryValue(parsed_json.value.value()), - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD); + policy_map_mandatory.LoadFrom(&base::Value::AsDictionaryValue(*parsed_json), + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, + POLICY_SOURCE_CLOUD); SimpleSchemaValidatingPolicyHandler handler_all( kPolicyName, kTestPref, schema, SCHEMA_STRICT, @@ -838,7 +836,7 @@ SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED); const base::Value* value_expected_in_pref = - parsed_json.value->FindPath(kPolicyName); + parsed_json->FindPath(kPolicyName); PolicyErrorMap errors; PrefValueMap prefs; @@ -894,19 +892,18 @@ } TEST(SimpleJsonStringSchemaValidatingPolicyHandlerTest, ValidEmbeddedJson) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kPolicyMapJsonValid, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_dict()); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kPolicyMapJsonValid, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_dict()); PolicyMap policy_map; - policy_map.LoadFrom( - &base::Value::AsDictionaryValue(parsed_json.value.value()), - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD); + policy_map.LoadFrom(&base::Value::AsDictionaryValue(*parsed_json), + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, + POLICY_SOURCE_CLOUD); const base::Value* value_expected_in_pref = - parsed_json.value->FindPath(kPolicyName); + parsed_json->FindPath(kPolicyName); PolicyErrorMap errors; PrefValueMap prefs; @@ -923,19 +920,18 @@ } TEST(SimpleJsonStringSchemaValidatingPolicyHandlerTest, InvalidEmbeddedJson) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kPolicyMapJsonInvalid, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_dict()); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kPolicyMapJsonInvalid, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_dict()); PolicyMap policy_map; - policy_map.LoadFrom( - &base::Value::AsDictionaryValue(parsed_json.value.value()), - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD); + policy_map.LoadFrom(&base::Value::AsDictionaryValue(*parsed_json), + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, + POLICY_SOURCE_CLOUD); const base::Value* value_expected_in_pref = - parsed_json.value->FindPath(kPolicyName); + parsed_json->FindPath(kPolicyName); PolicyErrorMap errors; PrefValueMap prefs; @@ -952,19 +948,18 @@ } TEST(SimpleJsonStringSchemaValidatingPolicyHandlerTest, UnparsableJson) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kPolicyMapJsonUnparsable, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_dict()); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kPolicyMapJsonUnparsable, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_dict()); PolicyMap policy_map; - policy_map.LoadFrom( - &base::Value::AsDictionaryValue(parsed_json.value.value()), - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD); + policy_map.LoadFrom(&base::Value::AsDictionaryValue(*parsed_json), + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, + POLICY_SOURCE_CLOUD); const base::Value* value_expected_in_pref = - parsed_json.value->FindPath(kPolicyName); + parsed_json->FindPath(kPolicyName); PolicyErrorMap errors; PrefValueMap prefs; @@ -981,19 +976,18 @@ } TEST(SimpleJsonStringSchemaValidatingPolicyHandlerTest, WrongType) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kPolicyMapJsonWrongTypes, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_dict()); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kPolicyMapJsonWrongTypes, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_dict()); PolicyMap policy_map; - policy_map.LoadFrom( - &base::Value::AsDictionaryValue(parsed_json.value.value()), - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD); + policy_map.LoadFrom(&base::Value::AsDictionaryValue(*parsed_json), + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, + POLICY_SOURCE_CLOUD); const base::Value* value_expected_in_pref = - parsed_json.value->FindPath(kPolicyName); + parsed_json->FindPath(kPolicyName); PolicyErrorMap errors; PrefValueMap prefs; @@ -1010,16 +1004,15 @@ } TEST(SimpleJsonStringSchemaValidatingPolicyHandlerTest, WrongRootType) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - kPolicyMapJsonWrongRootType, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ASSERT_TRUE(parsed_json.value->is_dict()); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + kPolicyMapJsonWrongRootType, base::JSON_ALLOW_TRAILING_COMMAS); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ASSERT_TRUE(parsed_json->is_dict()); PolicyMap policy_map; - policy_map.LoadFrom( - &base::Value::AsDictionaryValue(parsed_json.value.value()), - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD); + policy_map.LoadFrom(&base::Value::AsDictionaryValue(*parsed_json), + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, + POLICY_SOURCE_CLOUD); PolicyErrorMap errors;
diff --git a/components/policy/core/browser/policy_pref_mapping_test.cc b/components/policy/core/browser/policy_pref_mapping_test.cc index b09dad9..4b40cd5 100644 --- a/components/policy/core/browser/policy_pref_mapping_test.cc +++ b/components/policy/core/browser/policy_pref_mapping_test.cc
@@ -404,11 +404,14 @@ return; } base::DictionaryValue* dict = nullptr; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json); - if (!parsed_json.value || !parsed_json.value->GetAsDictionary(&dict)) { + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json); + if (!parsed_json.has_value()) { ADD_FAILURE() << "Error parsing policy_test_cases.json: " - << parsed_json.error_message; + << parsed_json.error().message; + return; + } else if (!parsed_json->GetAsDictionary(&dict)) { + ADD_FAILURE() + << "Error parsing policy_test_cases.json: Expected dictionary."; return; } for (auto it : dict->DictItems()) {
diff --git a/components/policy/core/common/cloud/component_cloud_policy_store.cc b/components/policy/core/common/cloud/component_cloud_policy_store.cc index 55194c0..f32aaa59 100644 --- a/components/policy/core/common/cloud/component_cloud_policy_store.cc +++ b/components/policy/core/common/cloud/component_cloud_policy_store.cc
@@ -428,15 +428,14 @@ bool ComponentCloudPolicyStore::ParsePolicy(const std::string& data, PolicyMap* policy, std::string* error) { - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - data, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - if (!value_with_error.value) { + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + data, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + if (!value_with_error.has_value()) { *error = - base::StrCat({"Invalid JSON blob: ", value_with_error.error_message}); + base::StrCat({"Invalid JSON blob: ", value_with_error.error().message}); return false; } - base::Value json = std::move(value_with_error.value.value()); + base::Value json = std::move(*value_with_error); if (!json.is_dict()) { *error = "The JSON blob is not a dictionary."; return false;
diff --git a/components/policy/core/common/policy_loader_command_line.cc b/components/policy/core/common/policy_loader_command_line.cc index b0912cf..ffa681b 100644 --- a/components/policy/core/common/policy_loader_command_line.cc +++ b/components/policy/core/common/policy_loader_command_line.cc
@@ -24,22 +24,21 @@ if (!command_line_.HasSwitch(switches::kChromePolicy)) return bundle; - base::JSONReader::ValueWithError policies = - base::JSONReader::ReadAndReturnValueWithError( - command_line_.GetSwitchValueASCII(switches::kChromePolicy), - base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + auto policies = base::JSONReader::ReadAndReturnValueWithError( + command_line_.GetSwitchValueASCII(switches::kChromePolicy), + base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - if (!policies.value) { - VLOG(1) << "Command line policy error: " << policies.error_message; + if (!policies.has_value()) { + VLOG(1) << "Command line policy error: " << policies.error().message; return bundle; } - if (!policies.value->is_dict()) { + if (!policies->is_dict()) { VLOG(1) << "Command line policy is not a dictionary"; return bundle; } bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) - .LoadFrom(&base::Value::AsDictionaryValue(*policies.value), + .LoadFrom(&base::Value::AsDictionaryValue(*policies), POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, POLICY_SOURCE_COMMAND_LINE); return bundle;
diff --git a/components/policy/core/common/policy_proto_decoders.cc b/components/policy/core/common/policy_proto_decoders.cc index 963c27e..f92fb0b4d 100644 --- a/components/policy/core/common/policy_proto_decoders.cc +++ b/components/policy/core/common/policy_proto_decoders.cc
@@ -93,22 +93,21 @@ base::Value DecodeJsonProto(const em::StringPolicyProto& proto, std::string* error) { const std::string& json = proto.value(); - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS); - if (!value_with_error.value) { + if (!value_with_error.has_value()) { // Can't parse as JSON so return it as a string, and leave it to the handler // to validate. LOG(WARNING) << "Invalid JSON: " << json; - *error = value_with_error.error_message; + *error = value_with_error.error().message; return base::Value(json); } // Accept any Value type that parsed as JSON, and leave it to the handler to // convert and check the concrete type. error->clear(); - return std::move(value_with_error.value.value()); + return std::move(*value_with_error); } bool PerProfileMatches(bool policy_per_profile,
diff --git a/components/policy/core/common/schema.cc b/components/policy/core/common/schema.cc index b5d4385..c6981085 100644 --- a/components/policy/core/common/schema.cc +++ b/components/policy/core/common/schema.cc
@@ -1445,15 +1445,15 @@ const std::string& schema, int validator_options, std::string* error) { - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - schema, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS | - base::JSONParserOptions::JSON_PARSE_CHROMIUM_EXTENSIONS); - *error = value_with_error.error_message; + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + schema, base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS | + base::JSONParserOptions::JSON_PARSE_CHROMIUM_EXTENSIONS); - if (!value_with_error.value) + if (!value_with_error.has_value()) { + *error = value_with_error.error().message; return absl::nullopt; - base::Value json = std::move(value_with_error.value.value()); + } + base::Value json = std::move(*value_with_error); if (!json.is_dict()) { *error = "Schema must be a JSON object"; return absl::nullopt;
diff --git a/components/search_provider_logos/google_logo_api.cc b/components/search_provider_logos/google_logo_api.cc index 8e2cee5..462d5e4 100644 --- a/components/search_provider_logos/google_logo_api.cc +++ b/components/search_provider_logos/google_logo_api.cc
@@ -153,18 +153,18 @@ // Default parsing failure to be true. *parsing_failed = true; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(response_sp); - if (!parsed_json.value) { - LOG(WARNING) << parsed_json.error_message << " at " - << parsed_json.error_line << ":" << parsed_json.error_column; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(response_sp); + if (!parsed_json.has_value()) { + LOG(WARNING) << parsed_json.error().message << " at " + << parsed_json.error().line << ":" + << parsed_json.error().column; return nullptr; } - if (!parsed_json.value->is_dict()) + if (!parsed_json->is_dict()) return nullptr; - const base::Value* ddljson = parsed_json.value->FindDictKey("ddljson"); + const base::Value* ddljson = parsed_json->FindDictKey("ddljson"); if (!ddljson) return nullptr;
diff --git a/components/services/heap_profiling/json_exporter_unittest.cc b/components/services/heap_profiling/json_exporter_unittest.cc index 3445f95f..c8d72ff7 100644 --- a/components/services/heap_profiling/json_exporter_unittest.cc +++ b/components/services/heap_profiling/json_exporter_unittest.cc
@@ -431,13 +431,12 @@ std::string json = ExportMemoryMapsAndV2StackTraceToJSON(¶ms); // JSON should parse. - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; // Validate the allocators summary. const base::Value* malloc_summary = - parsed_json.value->FindPath({"allocators", "malloc"}); + parsed_json->FindPath({"allocators", "malloc"}); ASSERT_TRUE(malloc_summary); const base::Value* malloc_size = malloc_summary->FindPath({"attrs", "size", "value"}); @@ -451,7 +450,7 @@ // Validate allocators details. // heaps_v2.allocators.malloc.sizes.reduce((a,s)=>a+s,0). const base::Value* malloc = - parsed_json.value->FindPath({"heaps_v2", "allocators", "malloc"}); + parsed_json->FindPath({"heaps_v2", "allocators", "malloc"}); const base::Value* malloc_sizes = malloc->FindKey("sizes"); EXPECT_EQ(1u, malloc_sizes->GetListDeprecated().size()); EXPECT_EQ(0x9876543210ul, malloc_sizes->GetListDeprecated()[0].GetDouble());
diff --git a/components/storage_monitor/mtp_manager_client_chromeos_unittest.cc b/components/storage_monitor/mtp_manager_client_chromeos_unittest.cc index ab2ffdb6..efde6af 100644 --- a/components/storage_monitor/mtp_manager_client_chromeos_unittest.cc +++ b/components/storage_monitor/mtp_manager_client_chromeos_unittest.cc
@@ -44,6 +44,7 @@ const uint64_t kStorageFreeSpaceInObjects = 0x04000000; // 64M Objects left const char kStorageDescription[] = "ExampleDescription"; const char kStorageVolumeIdentifier[] = "ExampleVolumeId"; +const char kStorageSerialNumber[] = "0123456789ABCDEF0123456789ABCDEF"; base::LazyInstance<std::map<std::string, device::mojom::MtpStorageInfo>>::Leaky g_fake_storage_info_map = LAZY_INSTANCE_INITIALIZER; @@ -66,7 +67,7 @@ kStorageType, kStorageFilesystemType, kStorageAccessCapability, kStorageMaxCapacity, kStorageFreeSpaceInBytes, kStorageFreeSpaceInObjects, kStorageDescription, - kStorageVolumeIdentifier))); + kStorageVolumeIdentifier, kStorageSerialNumber))); } const auto it = g_fake_storage_info_map.Get().find(storage_name);
diff --git a/components/strings/components_strings_bs.xtb b/components/strings/components_strings_bs.xtb index d8aa5b06..7ac65c9 100644 --- a/components/strings/components_strings_bs.xtb +++ b/components/strings/components_strings_bs.xtb
@@ -776,7 +776,7 @@ <translation id="3029752078111257850">Vijesti iz svijeta</translation> <translation id="3037605927509011580">Oh, ne!</translation> <translation id="3041612393474885105">Informacije o potvrdi</translation> -<translation id="305162504811187366">Historija Chrome udaljenog računara, uključujući vremenske oznake, host računare i ID-jeve sesija klijenta</translation> +<translation id="305162504811187366">Historija Chrome udaljenog računara, uključujući vremenske oznake, host računare i ID-ove sesija klijenta</translation> <translation id="3060227939791841287">C9 (omotnica)</translation> <translation id="3061707000357573562">Usluga za zakrpe</translation> <translation id="306573536155379004">Igra je počela.</translation>
diff --git a/components/strings/components_strings_en-GB.xtb b/components/strings/components_strings_en-GB.xtb index 5820846..d5a322db 100644 --- a/components/strings/components_strings_en-GB.xtb +++ b/components/strings/components_strings_en-GB.xtb
@@ -935,6 +935,7 @@ <translation id="3477679029130949506">Movie listings and theatre showtimes</translation> <translation id="3479552764303398839">Not now</translation> <translation id="3484560055331845446">You could lose access to your Google Account. Chrome recommends changing your password now. You'll be asked to sign in.</translation> +<translation id="3484861421501147767">Reminder: Saved promo code available</translation> <translation id="3487845404393360112">Tray 4</translation> <translation id="3495081129428749620">Find in page <ph name="PAGE_TITLE" /></translation> @@ -2223,6 +2224,7 @@ <ph name="LIST_ITEM" />Information entered in forms<ph name="END_LIST_ITEM" /> <ph name="END_LIST" /></translation> <translation id="7129409597930077180">Can’t deliver to this address. Select a different address.</translation> +<translation id="7129809579943936035"><ph name="VALUE_PROP" /> <ph name="DETAILS" /></translation> <translation id="7132939140423847331">Your admin has prohibited this data from being copied.</translation> <translation id="7135130955892390533">Show status</translation> <translation id="7138472120740807366">Delivery method</translation>
diff --git a/components/sync_preferences/pref_model_associator.cc b/components/sync_preferences/pref_model_associator.cc index e4caacf..32e9d960 100644 --- a/components/sync_preferences/pref_model_associator.cc +++ b/components/sync_preferences/pref_model_associator.cc
@@ -113,15 +113,15 @@ if (sync_pref.IsValid()) { const sync_pb::PreferenceSpecifics& preference = GetSpecifics(sync_pref); DCHECK(pref_name == preference.name()); - base::JSONReader::ValueWithError parsed_json = + base::JSONReader::Result parsed_json = base::JSONReader::ReadAndReturnValueWithError(preference.value()); - if (!parsed_json.value) { + if (!parsed_json.has_value()) { LOG(ERROR) << "Failed to deserialize value of preference '" << pref_name - << "': " << parsed_json.error_message; + << "': " << parsed_json.error().message; return; } std::unique_ptr<base::Value> sync_value = - base::Value::ToUniquePtrValue(std::move(*parsed_json.value)); + base::Value::ToUniquePtrValue(std::move(*parsed_json)); if (user_pref_value) { DVLOG(1) << "Found user pref value for " << pref_name; @@ -453,15 +453,14 @@ // static absl::optional<base::Value> PrefModelAssociator::ReadPreferenceSpecifics( const sync_pb::PreferenceSpecifics& preference) { - base::JSONReader::ValueWithError parsed_json = + base::JSONReader::Result parsed_json = base::JSONReader::ReadAndReturnValueWithError(preference.value()); - if (!parsed_json.value) { - std::string err = - "Failed to deserialize preference value: " + parsed_json.error_message; - LOG(ERROR) << err; + if (!parsed_json.has_value()) { + LOG(ERROR) << "Failed to deserialize preference value: " + << parsed_json.error().message; return absl::nullopt; } - return std::move(parsed_json.value); + return std::move(*parsed_json); } void PrefModelAssociator::AddSyncedPrefObserver(const std::string& name,
diff --git a/components/tracing/common/background_tracing_utils.cc b/components/tracing/common/background_tracing_utils.cc index 24a4175..dae048f 100644 --- a/components/tracing/common/background_tracing_utils.cc +++ b/components/tracing/common/background_tracing_utils.cc
@@ -61,22 +61,21 @@ return nullptr; } - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - config_text, base::JSON_ALLOW_TRAILING_COMMAS); - if (!value_with_error.value) { + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + config_text, base::JSON_ALLOW_TRAILING_COMMAS); + if (!value_with_error.has_value()) { LOG(ERROR) << "Background tracing has incorrect config: " - << value_with_error.error_message; + << value_with_error.error().message; return nullptr; } - if (!value_with_error.value->is_dict()) { + if (!value_with_error->is_dict()) { LOG(ERROR) << "Background tracing config is not a dict"; return nullptr; } - auto config = content::BackgroundTracingConfig::FromDict( - std::move(*(value_with_error.value))); + auto config = + content::BackgroundTracingConfig::FromDict(std::move(*value_with_error)); if (!config) { LOG(ERROR) << "Background tracing config dict has invalid contents";
diff --git a/components/viz/common/yuv_readback_unittest.cc b/components/viz/common/yuv_readback_unittest.cc index cc228ed0..e53d203 100644 --- a/components/viz/common/yuv_readback_unittest.cc +++ b/components/viz/common/yuv_readback_unittest.cc
@@ -97,15 +97,14 @@ run_loop.Run(); json_data.append("]"); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json_data); - CHECK(parsed_json.value) - << "JSON parsing failed (" << parsed_json.error_message + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json_data); + CHECK(parsed_json.has_value()) + << "JSON parsing failed (" << parsed_json.error().message << ") JSON data:" << std::endl << json_data; - CHECK(parsed_json.value->is_list()); - for (const base::Value& dict : parsed_json.value->GetListDeprecated()) { + CHECK(parsed_json->is_list()); + for (const base::Value& dict : parsed_json->GetListDeprecated()) { CHECK(dict.is_dict()); const std::string* name = dict.FindStringPath("name"); CHECK(name);
diff --git a/components/webapps/services/web_app_origin_association/web_app_origin_association_parser.cc b/components/webapps/services/web_app_origin_association/web_app_origin_association_parser.cc index 5e231cd..80a33ea 100644 --- a/components/webapps/services/web_app_origin_association/web_app_origin_association_parser.cc +++ b/components/webapps/services/web_app_origin_association/web_app_origin_association_parser.cc
@@ -29,16 +29,16 @@ const std::string& data) { auto parsed_data = base::JSONReader::ReadAndReturnValueWithError(data); - if (parsed_data.value == absl::nullopt) { - AddErrorInfo(parsed_data.error_message, parsed_data.error_line, - parsed_data.error_column); + if (!parsed_data.has_value()) { + AddErrorInfo(parsed_data.error().message, parsed_data.error().line, + parsed_data.error().column); failed_ = true; webapps::WebAppOriginAssociationMetrics::RecordParseResult( webapps::WebAppOriginAssociationMetrics::ParseResult:: kParseFailedInvalidJson); return nullptr; } - if (!parsed_data.value->is_dict()) { + if (!parsed_data->is_dict()) { AddErrorInfo("No valid JSON object found."); failed_ = true; webapps::WebAppOriginAssociationMetrics::RecordParseResult( @@ -49,7 +49,7 @@ mojom::WebAppOriginAssociationPtr association = mojom::WebAppOriginAssociation::New(); - association->apps = ParseAssociatedWebApps(*parsed_data.value); + association->apps = ParseAssociatedWebApps(*parsed_data); webapps::WebAppOriginAssociationMetrics::RecordParseResult( webapps::WebAppOriginAssociationMetrics::ParseResult::kParseSucceeded); return association;
diff --git a/content/browser/aggregation_service/aggregation_service_test_utils.cc b/content/browser/aggregation_service/aggregation_service_test_utils.cc index 8d2de6e..7907566 100644 --- a/content/browser/aggregation_service/aggregation_service_test_utils.cc +++ b/content/browser/aggregation_service/aggregation_service_test_utils.cc
@@ -277,18 +277,18 @@ return absl::nullopt; } - base::JSONReader::ValueWithError value_with_error = + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError(contents); - if (!value_with_error.value) { + if (!value_with_error.has_value()) { if (error_msg) { *error_msg = base::StrCat({"Failed to parse \"", contents, - "\" as JSON: ", value_with_error.error_message}); + "\" as JSON: ", value_with_error.error().message}); } return absl::nullopt; } - std::vector<PublicKey> keys = GetPublicKeys(*value_with_error.value); + std::vector<PublicKey> keys = GetPublicKeys(*value_with_error); if (keys.empty()) { if (error_msg) { *error_msg =
diff --git a/content/browser/direct_sockets/direct_sockets_test_utils.cc b/content/browser/direct_sockets/direct_sockets_test_utils.cc index 4af6afa..a413419 100644 --- a/content/browser/direct_sockets/direct_sockets_test_utils.cc +++ b/content/browser/direct_sockets/direct_sockets_test_utils.cc
@@ -171,10 +171,10 @@ auto parsed = base::JSONReader::ReadAndReturnValueWithError( json_string, base::JSON_ALLOW_TRAILING_COMMAS); - DCHECK(parsed.value); - DCHECK_EQ(parsed.value->type(), base::Value::Type::LIST); + DCHECK(parsed.has_value()); + DCHECK_EQ(parsed->type(), base::Value::Type::LIST); - const auto& list = parsed.value->GetList(); + const auto& list = parsed->GetList(); DCHECK_EQ(list.size(), 2U); DCHECK(list[0].is_string()); DCHECK(list[1].is_string());
diff --git a/content/browser/renderer_host/input/touch_action_browsertest.cc b/content/browser/renderer_host/input/touch_action_browsertest.cc index dafdfcc..f9165824 100644 --- a/content/browser/renderer_host/input/touch_action_browsertest.cc +++ b/content/browser/renderer_host/input/touch_action_browsertest.cc
@@ -357,10 +357,10 @@ { "name": "pointerUp"}]}] )HTML"; - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(pointer_actions_json); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ActionsParser actions_parser(std::move(*parsed_json.value)); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ActionsParser actions_parser(std::move(*parsed_json)); ASSERT_TRUE(actions_parser.Parse()); @@ -395,10 +395,10 @@ }] )HTML"; - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(pointer_actions_json); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ActionsParser actions_parser(std::move(*parsed_json.value)); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ActionsParser actions_parser(std::move(*parsed_json)); ASSERT_TRUE(actions_parser.Parse());
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h index fa26155..33c3e41 100644 --- a/content/browser/renderer_host/render_frame_host_impl.h +++ b/content/browser/renderer_host/render_frame_host_impl.h
@@ -1869,7 +1869,7 @@ return required_csp_.get(); } - bool IsAnonymous() const; + bool IsAnonymous() const override; bool is_fenced_frame_opaque_url() const { return is_fenced_frame_opaque_url_;
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc index 2a7fb10..a409a83d 100644 --- a/content/browser/site_per_process_browsertest.cc +++ b/content/browser/site_per_process_browsertest.cc
@@ -12953,10 +12953,10 @@ std::string double_tap_actions_json = base::StringPrintf(actions_template.c_str(), tap_position.x(), tap_position.y(), tap_position.x(), tap_position.y()); - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(double_tap_actions_json); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ActionsParser actions_parser(std::move(*parsed_json.value)); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ActionsParser actions_parser(std::move(*parsed_json)); ASSERT_TRUE(actions_parser.Parse()); auto synthetic_gesture_doubletap =
diff --git a/content/browser/site_per_process_layout_browsertest.cc b/content/browser/site_per_process_layout_browsertest.cc index ed3b812..87552a9 100644 --- a/content/browser/site_per_process_layout_browsertest.cc +++ b/content/browser/site_per_process_layout_browsertest.cc
@@ -2414,10 +2414,10 @@ actions_template.c_str(), scroll_start_location_in_screen.x(), scroll_start_location_in_screen.y(), scroll_end_location_in_screen.x(), scroll_end_location_in_screen.y()); - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(touch_move_sequence_json); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - ActionsParser actions_parser(std::move(*parsed_json.value)); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + ActionsParser actions_parser(std::move(*parsed_json)); ASSERT_TRUE(actions_parser.Parse()); auto synthetic_scroll_gesture =
diff --git a/content/browser/webrtc/webrtc_getusermedia_browsertest.cc b/content/browser/webrtc/webrtc_getusermedia_browsertest.cc index 4827e07f..69f3933 100644 --- a/content/browser/webrtc/webrtc_getusermedia_browsertest.cc +++ b/content/browser/webrtc/webrtc_getusermedia_browsertest.cc
@@ -140,16 +140,15 @@ "getSources()"); EXPECT_FALSE(devices_as_json.empty()); - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS); - ASSERT_TRUE(parsed_json.value) << parsed_json.error_message; - EXPECT_EQ(parsed_json.value->type(), base::Value::Type::LIST); + ASSERT_TRUE(parsed_json.has_value()) << parsed_json.error().message; + EXPECT_EQ(parsed_json->type(), base::Value::Type::LIST); - ASSERT_TRUE(parsed_json.value->is_list()); + ASSERT_TRUE(parsed_json->is_list()); - for (const auto& entry : parsed_json.value->GetListDeprecated()) { + for (const auto& entry : parsed_json->GetListDeprecated()) { const base::DictionaryValue* dict; std::string kind; std::string device_id;
diff --git a/content/public/browser/render_frame_host.h b/content/public/browser/render_frame_host.h index 0ce03629..eb192b7 100644 --- a/content/public/browser/render_frame_host.h +++ b/content/public/browser/render_frame_host.h
@@ -1046,6 +1046,10 @@ // example, helper methods for MojoJs to better work with Web API objects. virtual void EnableMojoJsBindings(mojom::ExtraMojoJsFeaturesPtr features) = 0; + // Whether the current document is loaded inside an anonymous iframe. Updated + // on every cross-document navigation. + virtual bool IsAnonymous() const = 0; + private: // This interface should only be implemented inside content. friend class RenderFrameHostImpl;
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc index 8af03b4a5..4319dd0 100644 --- a/content/public/test/browser_test_utils.cc +++ b/content/public/test/browser_test_utils.cc
@@ -191,15 +191,14 @@ if (!result) return true; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value) { + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSON_ALLOW_TRAILING_COMMAS); + if (!parsed_json.has_value()) { *result = nullptr; - DLOG(ERROR) << parsed_json.error_message; + DLOG(ERROR) << parsed_json.error().message; return false; } - *result = base::Value::ToUniquePtrValue(std::move(*parsed_json.value)); + *result = base::Value::ToUniquePtrValue(std::move(*parsed_json)); return true; } @@ -1795,13 +1794,12 @@ "Cannot communicate with DOMMessageQueue."); } - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_ALLOW_TRAILING_COMMAS); - if (!parsed_json.value) - return EvalJsResult(base::Value(), parsed_json.error_message); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSON_ALLOW_TRAILING_COMMAS); + if (!parsed_json.has_value()) + return EvalJsResult(base::Value(), parsed_json.error().message); result_type = JavaScriptExecutionResultType::kSuccess; - return EvalJsResult(parsed_json.value->Clone(), std::string()); + return EvalJsResult(parsed_json->Clone(), std::string()); } else if (dom_message_queue.HasMessages()) { return EvalJsResult(base::Value(), "Calling domAutomationController.send is only allowed "
diff --git a/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc b/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc index 6462bfc2..872ac0f 100644 --- a/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc +++ b/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc
@@ -412,15 +412,14 @@ kFileReadError); } - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError( - json_contents, base::JSON_PARSE_RFC /* options */); - if (!value_with_error.value) { + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + json_contents, base::JSON_PARSE_RFC /* options */); + if (!value_with_error.has_value()) { return ReadJSONRulesResult::CreateErrorResult( - Status::kJSONParseError, std::move(value_with_error.error_message)); + Status::kJSONParseError, std::move(value_with_error.error().message)); } - return ParseRulesFromJSON(id(), json_path(), *value_with_error.value, + return ParseRulesFromJSON(id(), json_path(), *value_with_error, rule_count_limit(), is_dynamic_ruleset()); }
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc index ad67441..ac0f563 100644 --- a/extensions/common/extension_api.cc +++ b/extensions/common/extension_api.cc
@@ -37,19 +37,19 @@ std::unique_ptr<base::DictionaryValue> LoadSchemaDictionary( const std::string& name, const base::StringPiece& schema) { - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError(schema); + auto result = base::JSONReader::ReadAndReturnValueWithError(schema); // Tracking down http://crbug.com/121424 char buf[128]; base::snprintf(buf, std::size(buf), "%s: (%d) '%s'", name.c_str(), - result.value ? static_cast<int>(result.value->type()) : -1, - result.error_message.c_str()); + result.has_value() ? static_cast<int>(result->type()) : -1, + !result.has_value() ? result.error().message.c_str() : ""); - CHECK(result.value) << result.error_message << " for schema " << schema; - CHECK(result.value->is_dict()) << " for schema " << schema; + CHECK(result.has_value()) + << result.error().message << " for schema " << schema; + CHECK(result->is_dict()) << " for schema " << schema; return base::DictionaryValue::From( - base::Value::ToUniquePtrValue(std::move(*result.value))); + base::Value::ToUniquePtrValue(std::move(*result))); } const base::DictionaryValue* FindListItem(const base::ListValue* list,
diff --git a/extensions/common/extension_builder.cc b/extensions/common/extension_builder.cc index 0067b3b..116bbca 100644 --- a/extensions/common/extension_builder.cc +++ b/extensions/common/extension_builder.cc
@@ -228,11 +228,11 @@ ExtensionBuilder& ExtensionBuilder::AddJSON(base::StringPiece json) { CHECK(manifest_data_); std::string wrapped_json = base::StringPrintf("{%s}", json.data()); - base::JSONReader::ValueWithError parsed = - base::JSONReader::ReadAndReturnValueWithError(wrapped_json); - CHECK(parsed.value) << "Failed to parse json for extension '" - << manifest_data_->name << "':" << parsed.error_message; - return MergeManifest(*parsed.value); + auto parsed = base::JSONReader::ReadAndReturnValueWithError(wrapped_json); + CHECK(parsed.has_value()) + << "Failed to parse json for extension '" << manifest_data_->name + << "':" << parsed.error().message; + return MergeManifest(*parsed); } ExtensionBuilder& ExtensionBuilder::SetPath(const base::FilePath& path) {
diff --git a/extensions/common/features/json_feature_provider_source.cc b/extensions/common/features/json_feature_provider_source.cc index d296d2d..bf06a2aa 100644 --- a/extensions/common/features/json_feature_provider_source.cc +++ b/extensions/common/features/json_feature_provider_source.cc
@@ -23,17 +23,16 @@ void JSONFeatureProviderSource::LoadJSON(int resource_id) { const base::StringPiece features_file = ui::ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError(features_file); + auto result = base::JSONReader::ReadAndReturnValueWithError(features_file); - DCHECK(result.value) << "Could not load features: " << name_ << " " - << result.error_message; + DCHECK(result.has_value()) + << "Could not load features: " << name_ << " " << result.error().message; std::unique_ptr<base::DictionaryValue> value_as_dict; - if (result.value) { - CHECK(result.value->is_dict()) << name_; + if (result.has_value()) { + CHECK(result->is_dict()) << name_; value_as_dict = base::DictionaryValue::From( - base::Value::ToUniquePtrValue(std::move(*result.value))); + base::Value::ToUniquePtrValue(std::move(*result))); } else { // There was some error loading the features file. // http://crbug.com/176381
diff --git a/google_apis/common/base_requests.cc b/google_apis/common/base_requests.cc index a9180b1..586f247 100644 --- a/google_apis/common/base_requests.cc +++ b/google_apis/common/base_requests.cc
@@ -85,9 +85,8 @@ } std::unique_ptr<base::Value> ParseJson(const std::string& json) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(json); - if (!parsed_json.value) { + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json); + if (!parsed_json.has_value()) { std::string trimmed_json; if (json.size() < 80) { trimmed_json = json; @@ -99,11 +98,11 @@ json.substr(json.size() - 10).c_str()); } LOG(WARNING) << "Error while parsing entry response: " - << parsed_json.error_message << ", json:\n" + << parsed_json.error().message << ", json:\n" << trimmed_json; return nullptr; } - return base::Value::ToUniquePtrValue(std::move(*parsed_json.value)); + return base::Value::ToUniquePtrValue(std::move(*parsed_json)); } UrlFetchRequestBase::UrlFetchRequestBase(
diff --git a/gpu/tools/compositor_model_bench/render_tree.cc b/gpu/tools/compositor_model_bench/render_tree.cc index 943301f..2c9c7ae 100644 --- a/gpu/tools/compositor_model_bench/render_tree.cc +++ b/gpu/tools/compositor_model_bench/render_tree.cc
@@ -394,13 +394,17 @@ if (!ReadFileToString(path, &contents)) return nullptr; - JSONReader::ValueWithError result = JSONReader::ReadAndReturnValueWithError( + auto result = JSONReader::ReadAndReturnValueWithError( contents, base::JSON_ALLOW_TRAILING_COMMAS); - if (!result.value.has_value() || !result.value->is_dict()) { + if (!result.has_value()) { LOG(ERROR) << "Failed to parse JSON file " << path.LossyDisplayName() - << "\n(" << result.error_message << ")"; + << "\n(" << result.error().message << ")"; + return nullptr; + } else if (!result->is_dict()) { + LOG(ERROR) << "Failed to parse JSON file " << path.LossyDisplayName() + << "\n(expecting a list.)"; return nullptr; } - return InterpretContentLayer(result.value.value()); + return InterpretContentLayer(*result); }
diff --git a/ios/chrome/app/strings/resources/ios_strings_en-GB.xtb b/ios/chrome/app/strings/resources/ios_strings_en-GB.xtb index c562fca..0f05664 100644 --- a/ios/chrome/app/strings/resources/ios_strings_en-GB.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_en-GB.xtb
@@ -326,6 +326,7 @@ <translation id="369349502275246497">Offer to save passwords</translation> <translation id="3709582977625132201">Mark as unread</translation> <translation id="371230970611282515">Predicts and warns you about dangerous events before they happen.</translation> +<translation id="37207012422556617">Trending searches</translation> <translation id="3740397331642243698">Opens the inputted URLs in Google Chrome in Incognito.</translation> <translation id="3762232513783804601">Built for your iPad</translation> <translation id="3771033907050503522">Incognito Tabs</translation>
diff --git a/ios/chrome/browser/json_parser/in_process_json_parser.cc b/ios/chrome/browser/json_parser/in_process_json_parser.cc index c214c8a..66567e5a 100644 --- a/ios/chrome/browser/json_parser/in_process_json_parser.cc +++ b/ios/chrome/browser/json_parser/in_process_json_parser.cc
@@ -18,21 +18,20 @@ InProcessJsonParser::SuccessCallback success_callback, InProcessJsonParser::ErrorCallback error_callback) { DCHECK(task_runner); - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError(unsafe_json, - base::JSON_PARSE_RFC); - if (value_with_error.value) { + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + unsafe_json, base::JSON_PARSE_RFC); + if (value_with_error.has_value()) { task_runner->PostTask(FROM_HERE, base::BindOnce(std::move(success_callback), - std::move(*value_with_error.value))); + std::move(*value_with_error))); } else { task_runner->PostTask( - FROM_HERE, - base::BindOnce( - std::move(error_callback), - base::StringPrintf( - "%s (%d:%d)", value_with_error.error_message.c_str(), - value_with_error.error_line, value_with_error.error_column))); + FROM_HERE, base::BindOnce(std::move(error_callback), + base::StringPrintf( + "%s (%d:%d)", + value_with_error.error().message.c_str(), + value_with_error.error().line, + value_with_error.error().column))); } } } // namespace
diff --git a/ios/web/navigation/wk_navigation_util_unittest.mm b/ios/web/navigation/wk_navigation_util_unittest.mm index b269c5b0..72e1236 100644 --- a/ios/web/navigation/wk_navigation_util_unittest.mm +++ b/ios/web/navigation/wk_navigation_util_unittest.mm
@@ -45,7 +45,7 @@ } // Extracts session dictionary from |restore_session_url|. -base::JSONReader::ValueWithError ExtractSessionDict(GURL restore_session_url) { +base::JSONReader::Result ExtractSessionDict(GURL restore_session_url) { NSString* fragment = net::NSURLWithGURL(restore_session_url).fragment; NSString* encoded_session = [fragment substringFromIndex:strlen(kRestoreSessionSessionHashPrefix)]; @@ -166,10 +166,9 @@ CreateRestoreSessionUrl(last_committed_index, items, &restore_session_url, &first_index); // Extract session JSON from restoration URL. - base::JSONReader::ValueWithError value_with_error = - ExtractSessionDict(restore_session_url); + auto value_with_error = ExtractSessionDict(restore_session_url); - base::Value* urls_value = value_with_error.value->FindKey("urls"); + base::Value* urls_value = value_with_error->FindKey("urls"); if (num_items > kMaxSessionSize) { ASSERT_EQ(kMaxSessionSize, static_cast<int>(urls_value->GetListDeprecated().size())); @@ -197,17 +196,16 @@ ASSERT_TRUE(IsRestoreSessionUrl(net::NSURLWithGURL(restore_session_url))); // Extract session JSON from restoration URL. - base::JSONReader::ValueWithError value_with_error = - ExtractSessionDict(restore_session_url); - ASSERT_TRUE(value_with_error.value.has_value()); + auto value_with_error = ExtractSessionDict(restore_session_url); + ASSERT_TRUE(value_with_error.has_value()); // Verify that all titles and URLs are present. - base::Value* titles_value = value_with_error.value->FindKey("titles"); + base::Value* titles_value = value_with_error->FindKey("titles"); ASSERT_TRUE(titles_value); ASSERT_TRUE(titles_value->is_list()); ASSERT_EQ(kItemCount, titles_value->GetListDeprecated().size()); - base::Value* urls_value = value_with_error.value->FindKey("urls"); + base::Value* urls_value = value_with_error->FindKey("urls"); ASSERT_TRUE(urls_value); ASSERT_TRUE(urls_value->is_list()); ASSERT_EQ(kItemCount, urls_value->GetListDeprecated().size()); @@ -231,12 +229,11 @@ ASSERT_TRUE(IsRestoreSessionUrl(net::NSURLWithGURL(restore_session_url))); // Extract session JSON from restoration URL. - base::JSONReader::ValueWithError value_with_error = - ExtractSessionDict(restore_session_url); - ASSERT_TRUE(value_with_error.value.has_value()); + auto value_with_error = ExtractSessionDict(restore_session_url); + ASSERT_TRUE(value_with_error.has_value()); // Verify that first kMaxSessionSize titles and URLs are present. - base::Value* titles_value = value_with_error.value->FindKey("titles"); + base::Value* titles_value = value_with_error->FindKey("titles"); ASSERT_TRUE(titles_value); ASSERT_TRUE(titles_value->is_list()); ASSERT_EQ(static_cast<size_t>(kMaxSessionSize), @@ -245,7 +242,7 @@ ASSERT_EQ("Test74", titles_value->GetListDeprecated()[kMaxSessionSize - 1].GetString()); - base::Value* urls_value = value_with_error.value->FindKey("urls"); + base::Value* urls_value = value_with_error->FindKey("urls"); ASSERT_TRUE(urls_value); ASSERT_TRUE(urls_value->is_list()); ASSERT_EQ(static_cast<size_t>(kMaxSessionSize), @@ -256,8 +253,7 @@ urls_value->GetListDeprecated()[kMaxSessionSize - 1].GetString()); // Verify the offset is correct. - ASSERT_EQ(1 - kMaxSessionSize, - value_with_error.value->FindKey("offset")->GetInt()); + ASSERT_EQ(1 - kMaxSessionSize, value_with_error->FindKey("offset")->GetInt()); } // Verifies that large session can be stored in NSURL and that extra items @@ -278,12 +274,11 @@ ASSERT_TRUE(IsRestoreSessionUrl(net::NSURLWithGURL(restore_session_url))); // Extract session JSON from restoration URL. - base::JSONReader::ValueWithError value_with_error = - ExtractSessionDict(restore_session_url); - ASSERT_TRUE(value_with_error.value.has_value()); + auto value_with_error = ExtractSessionDict(restore_session_url); + ASSERT_TRUE(value_with_error.has_value()); // Verify that last kMaxSessionSize titles and URLs are present. - base::Value* titles_value = value_with_error.value->FindKey("titles"); + base::Value* titles_value = value_with_error->FindKey("titles"); ASSERT_TRUE(titles_value); ASSERT_TRUE(titles_value->is_list()); ASSERT_EQ(static_cast<size_t>(kMaxSessionSize), @@ -292,7 +287,7 @@ ASSERT_EQ("Test224", titles_value->GetListDeprecated()[kMaxSessionSize - 1].GetString()); - base::Value* urls_value = value_with_error.value->FindKey("urls"); + base::Value* urls_value = value_with_error->FindKey("urls"); ASSERT_TRUE(urls_value); ASSERT_TRUE(urls_value->is_list()); ASSERT_EQ(static_cast<size_t>(kMaxSessionSize), @@ -303,7 +298,7 @@ urls_value->GetListDeprecated()[kMaxSessionSize - 1].GetString()); // Verify the offset is correct. - ASSERT_EQ(0, value_with_error.value->FindKey("offset")->GetInt()); + ASSERT_EQ(0, value_with_error->FindKey("offset")->GetInt()); } // Verifies that large session can be stored in NSURL and that extra items @@ -325,12 +320,11 @@ ASSERT_TRUE(IsRestoreSessionUrl(net::NSURLWithGURL(restore_session_url))); // Extract session JSON from restoration URL. - base::JSONReader::ValueWithError value_with_error = - ExtractSessionDict(restore_session_url); - ASSERT_TRUE(value_with_error.value.has_value()); + auto value_with_error = ExtractSessionDict(restore_session_url); + ASSERT_TRUE(value_with_error.has_value()); // Verify that last kMaxSessionSize titles and URLs are present. - base::Value* titles_value = value_with_error.value->FindKey("titles"); + base::Value* titles_value = value_with_error->FindKey("titles"); ASSERT_TRUE(titles_value); ASSERT_TRUE(titles_value->is_list()); ASSERT_EQ(static_cast<size_t>(kMaxSessionSize), @@ -339,7 +333,7 @@ ASSERT_EQ("Test112", titles_value->GetListDeprecated()[kMaxSessionSize - 1].GetString()); - base::Value* urls_value = value_with_error.value->FindKey("urls"); + base::Value* urls_value = value_with_error->FindKey("urls"); ASSERT_TRUE(urls_value); ASSERT_TRUE(urls_value->is_list()); ASSERT_EQ(static_cast<size_t>(kMaxSessionSize), @@ -351,7 +345,7 @@ // Verify the offset is correct. ASSERT_EQ((1 - kMaxSessionSize) / 2, - value_with_error.value->FindKey("offset")->GetInt()); + value_with_error->FindKey("offset")->GetInt()); } TEST_F(WKNavigationUtilTest, IsNotRestoreSessionUrl) {
diff --git a/ios/web/webui/mojo_facade.mm b/ios/web/webui/mojo_facade.mm index b97386a1..33e7357 100644 --- a/ios/web/webui/mojo_facade.mm +++ b/ios/web/webui/mojo_facade.mm
@@ -78,17 +78,16 @@ MojoFacade::MessageNameAndArguments MojoFacade::GetMessageNameAndArguments( const std::string& mojo_message_as_json) { - base::JSONReader::ValueWithError value_with_error = - base::JSONReader::ReadAndReturnValueWithError(mojo_message_as_json, - base::JSON_PARSE_RFC); - CHECK(value_with_error.value); - CHECK(value_with_error.value->is_dict()); + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( + mojo_message_as_json, base::JSON_PARSE_RFC); + CHECK(value_with_error.has_value()); + CHECK(value_with_error->is_dict()); - const std::string* name = value_with_error.value->FindStringKey("name"); + const std::string* name = value_with_error->FindStringKey("name"); CHECK(name); - base::Value* args = value_with_error.value->FindKeyOfType( - "args", base::Value::Type::DICTIONARY); + base::Value* args = + value_with_error->FindKeyOfType("args", base::Value::Type::DICTIONARY); CHECK(args); return {*name, std::move(*args)};
diff --git a/media/gpu/test/image.cc b/media/gpu/test/image.cc index 61c1f0d..3c418956 100644 --- a/media/gpu/test/image.cc +++ b/media/gpu/test/image.cc
@@ -134,16 +134,16 @@ auto metadata_result = base::JSONReader::ReadAndReturnValueWithError(json_data); - if (!metadata_result.value) { + if (!metadata_result.has_value()) { VLOGF(1) << "Failed to parse image metadata: " << json_path << ": " - << metadata_result.error_message; + << metadata_result.error().message; return false; } - absl::optional<base::Value> metadata = std::move(metadata_result.value); + base::Value& metadata = *metadata_result; // Get the pixel format from the json data. const base::Value* pixel_format = - metadata->FindKeyOfType("pixel_format", base::Value::Type::STRING); + metadata.FindKeyOfType("pixel_format", base::Value::Type::STRING); if (!pixel_format) { VLOGF(1) << "Key \"pixel_format\" is not found in " << json_path; return false; @@ -156,13 +156,13 @@ // Get the image dimensions from the json data. const base::Value* width = - metadata->FindKeyOfType("width", base::Value::Type::INTEGER); + metadata.FindKeyOfType("width", base::Value::Type::INTEGER); if (!width) { VLOGF(1) << "Key \"width\" is not found in " << json_path; return false; } const base::Value* height = - metadata->FindKeyOfType("height", base::Value::Type::INTEGER); + metadata.FindKeyOfType("height", base::Value::Type::INTEGER); if (!height) { VLOGF(1) << "Key \"height\" is not found in " << json_path; return false; @@ -174,7 +174,7 @@ // area. visible_rect_ = gfx::Rect(size_); const base::Value* visible_rect_info = - metadata->FindKeyOfType("visible_rect", base::Value::Type::LIST); + metadata.FindKeyOfType("visible_rect", base::Value::Type::LIST); if (visible_rect_info) { base::Value::ConstListView values = visible_rect_info->GetListDeprecated(); if (values.size() != 4) { @@ -191,7 +191,7 @@ // Get the image rotation info from the json data. const base::Value* rotation = - metadata->FindKeyOfType("rotation", base::Value::Type::INTEGER); + metadata.FindKeyOfType("rotation", base::Value::Type::INTEGER); if (!rotation) { // Default rotation value is VIDEO_ROTATION_0 rotation_ = VIDEO_ROTATION_0; @@ -217,7 +217,7 @@ // Get the image checksum from the json data. const base::Value* checksum = - metadata->FindKeyOfType("checksum", base::Value::Type::STRING); + metadata.FindKeyOfType("checksum", base::Value::Type::STRING); if (!checksum) { VLOGF(1) << "Key \"checksum\" is not found in " << json_path; return false;
diff --git a/media/gpu/test/video.cc b/media/gpu/test/video.cc index e771acc..a06e379 100644 --- a/media/gpu/test/video.cc +++ b/media/gpu/test/video.cc
@@ -364,17 +364,17 @@ auto metadata_result = base::JSONReader::ReadAndReturnValueWithError(json_data); - if (!metadata_result.value) { + if (!metadata_result.has_value()) { LOG(ERROR) << "Failed to parse video metadata: " << metadata_file_path_ - << ": " << metadata_result.error_message; + << ": " << metadata_result.error().message; return false; } - absl::optional<base::Value> metadata = std::move(metadata_result.value); + base::Value& metadata = *metadata_result; // Find the video's profile, only required for encoded video streams. profile_ = VIDEO_CODEC_PROFILE_UNKNOWN; const base::Value* profile = - metadata->FindKeyOfType("profile", base::Value::Type::STRING); + metadata.FindKeyOfType("profile", base::Value::Type::STRING); if (profile) { auto converted_profile = ConvertStringtoProfile(profile->GetString()); if (!converted_profile) { @@ -394,7 +394,7 @@ // Find the video's bit depth. This is optional and only required for encoded // video streams. const base::Value* bit_depth = - metadata->FindKeyOfType("bit_depth", base::Value::Type::INTEGER); + metadata.FindKeyOfType("bit_depth", base::Value::Type::INTEGER); if (bit_depth) { bit_depth_ = base::checked_cast<uint8_t>(bit_depth->GetInt()); } else { @@ -409,7 +409,7 @@ // Find the video's pixel format, only required for raw video streams. pixel_format_ = VideoPixelFormat::PIXEL_FORMAT_UNKNOWN; const base::Value* pixel_format = - metadata->FindKeyOfType("pixel_format", base::Value::Type::STRING); + metadata.FindKeyOfType("pixel_format", base::Value::Type::STRING); if (pixel_format) { auto converted_pixel_format = ConvertStringtoPixelFormat(pixel_format->GetString()); @@ -434,7 +434,7 @@ } const base::Value* frame_rate = - metadata->FindKeyOfType("frame_rate", base::Value::Type::INTEGER); + metadata.FindKeyOfType("frame_rate", base::Value::Type::INTEGER); if (!frame_rate) { LOG(ERROR) << "Key \"frame_rate\" is not found in " << metadata_file_path_; return false; @@ -442,7 +442,7 @@ frame_rate_ = static_cast<uint32_t>(frame_rate->GetInt()); const base::Value* num_frames = - metadata->FindKeyOfType("num_frames", base::Value::Type::INTEGER); + metadata.FindKeyOfType("num_frames", base::Value::Type::INTEGER); if (!num_frames) { LOG(ERROR) << "Key \"num_frames\" is not found in " << metadata_file_path_; return false; @@ -454,7 +454,7 @@ if ((profile_ >= H264PROFILE_MIN && profile_ <= H264PROFILE_MAX) || (profile_ >= HEVCPROFILE_MIN && profile_ <= HEVCPROFILE_MAX)) { const base::Value* num_fragments = - metadata->FindKeyOfType("num_fragments", base::Value::Type::INTEGER); + metadata.FindKeyOfType("num_fragments", base::Value::Type::INTEGER); if (!num_fragments) { LOG(ERROR) << "Key \"num_fragments\" is required for H.264/HEVC video " "streams but could not be found in " @@ -465,13 +465,13 @@ } const base::Value* width = - metadata->FindKeyOfType("width", base::Value::Type::INTEGER); + metadata.FindKeyOfType("width", base::Value::Type::INTEGER); if (!width) { LOG(ERROR) << "Key \"width\" is not found in " << metadata_file_path_; return false; } const base::Value* height = - metadata->FindKeyOfType("height", base::Value::Type::INTEGER); + metadata.FindKeyOfType("height", base::Value::Type::INTEGER); if (!height) { LOG(ERROR) << "Key \"height\" is not found in " << metadata_file_path_; return false; @@ -485,7 +485,7 @@ // Find optional frame checksums. These are only required when using the frame // validator. const base::Value* md5_checksums = - metadata->FindKeyOfType("md5_checksums", base::Value::Type::LIST); + metadata.FindKeyOfType("md5_checksums", base::Value::Type::LIST); if (md5_checksums) { for (const base::Value& checksum : md5_checksums->GetListDeprecated()) { frame_checksums_.push_back(checksum.GetString());
diff --git a/media/gpu/v4l2/BUILD.gn b/media/gpu/v4l2/BUILD.gn index 68d64f98..80ebde8 100644 --- a/media/gpu/v4l2/BUILD.gn +++ b/media/gpu/v4l2/BUILD.gn
@@ -167,8 +167,6 @@ executable("v4l2_stateless_decoder") { testonly = true sources = [ - "test/av1_decoder.cc", - "test/av1_decoder.h", "test/av1_pix_fmt.h", "test/h264_decoder.cc", "test/h264_decoder.h", @@ -181,6 +179,13 @@ "test/vp9_decoder.h", ] + if (is_chromeos) { + sources += [ + "test/av1_decoder.cc", + "test/av1_decoder.h", + ] + } + deps = [ "//base", "//media",
diff --git a/media/gpu/v4l2/test/v4l2_ioctl_shim.h b/media/gpu/v4l2/test/v4l2_ioctl_shim.h index ad2a034..d2ebe46 100644 --- a/media/gpu/v4l2/test/v4l2_ioctl_shim.h +++ b/media/gpu/v4l2/test/v4l2_ioctl_shim.h
@@ -21,7 +21,6 @@ public: MmapedBuffer(const base::PlatformFile decode_fd, const struct v4l2_buffer& v4l2_buffer); - ~MmapedBuffer(); class MmapedPlane { public: @@ -47,6 +46,7 @@ private: friend class base::RefCounted<MmapedBuffer>; + ~MmapedBuffer(); MmapedBuffer(const MmapedBuffer&) = delete; MmapedBuffer& operator=(const MmapedBuffer&) = delete;
diff --git a/media/gpu/v4l2/test/v4l2_stateless_decoder.cc b/media/gpu/v4l2/test/v4l2_stateless_decoder.cc index ae6af3f7..77b01053 100644 --- a/media/gpu/v4l2/test/v4l2_stateless_decoder.cc +++ b/media/gpu/v4l2/test/v4l2_stateless_decoder.cc
@@ -13,12 +13,18 @@ #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" +// AV1 stateless decoding not supported upstream yet +#if BUILDFLAG(IS_CHROMEOS) #include "media/gpu/v4l2/test/av1_decoder.h" +#endif #include "media/gpu/v4l2/test/h264_decoder.h" #include "media/gpu/v4l2/test/video_decoder.h" #include "media/gpu/v4l2/test/vp9_decoder.h" +// AV1 stateless decoding not supported upstream yet +#if BUILDFLAG(IS_CHROMEOS) using media::v4l2_test::Av1Decoder; +#endif using media::v4l2_test::H264Decoder; using media::v4l2_test::VideoDecoder; using media::v4l2_test::Vp9Decoder; @@ -76,7 +82,12 @@ const base::MemoryMappedFile& stream) { CHECK(stream.IsValid()); - std::unique_ptr<VideoDecoder> decoder = Av1Decoder::Create(stream); + std::unique_ptr<VideoDecoder> decoder; + +// AV1 stateless decoding not supported upstream yet +#if BUILDFLAG(IS_CHROMEOS) + decoder = Av1Decoder::Create(stream); +#endif if (!decoder) decoder = Vp9Decoder::Create(stream);
diff --git a/media/gpu/v4l2/test/vp9_decoder.cc b/media/gpu/v4l2/test/vp9_decoder.cc index 590bab75..b99b323 100644 --- a/media/gpu/v4l2/test/vp9_decoder.cc +++ b/media/gpu/v4l2/test/vp9_decoder.cc
@@ -4,7 +4,13 @@ #include "media/gpu/v4l2/test/vp9_decoder.h" +#include <linux/v4l2-controls.h> + +// ChromeOS specific header; does not exist upstream +#if BUILDFLAG(IS_CHROMEOS) #include <linux/media/vp9-ctrls-upstream.h> +#endif + #include <sys/ioctl.h> #include "base/bits.h"
diff --git a/media/gpu/v4l2/test/vp9_decoder.h b/media/gpu/v4l2/test/vp9_decoder.h index f2ade71..748f4f7 100644 --- a/media/gpu/v4l2/test/vp9_decoder.h +++ b/media/gpu/v4l2/test/vp9_decoder.h
@@ -7,7 +7,12 @@ #include "media/gpu/v4l2/test/v4l2_ioctl_shim.h" +#include <linux/v4l2-controls.h> + +// ChromeOS specific header; does not exist upstream +#if BUILDFLAG(IS_CHROMEOS) #include <linux/media/vp9-ctrls-upstream.h> +#endif #include <set>
diff --git a/mojo/public/c/system/tests/core_perftest.cc b/mojo/public/c/system/tests/core_perftest.cc index eec2a32..4d1ded2 100644 --- a/mojo/public/c/system/tests/core_perftest.cc +++ b/mojo/public/c/system/tests/core_perftest.cc
@@ -222,8 +222,8 @@ readers.clear(); char sub_test_name[200]; - sprintf(sub_test_name, "%uw_%ur_%ubytes", num_writers, num_readers, - static_cast<unsigned>(num_bytes)); + snprintf(sub_test_name, sizeof(sub_test_name), "%uw_%ur_%ubytes", + num_writers, num_readers, static_cast<unsigned>(num_bytes)); mojo::test::LogPerfResult( "MessagePipe_Threaded_Writes", sub_test_name, 1000000.0 * static_cast<double>(num_writes) / (end_time - start_time),
diff --git a/net/log/file_net_log_observer_unittest.cc b/net/log/file_net_log_observer_unittest.cc index 58ab527..acc6c5a 100644 --- a/net/log/file_net_log_observer_unittest.cc +++ b/net/log/file_net_log_observer_unittest.cc
@@ -122,12 +122,11 @@ return ::testing::AssertionFailure() << "input is empty"; } - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(input); - if (!parsed_json.value) { - return ::testing::AssertionFailure() << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(input); + if (!parsed_json.has_value()) { + return ::testing::AssertionFailure() << parsed_json.error().message; } - root = std::move(*parsed_json.value); + root = std::move(*parsed_json); const base::Value::Dict* dict = root.GetIfDict(); if (!dict) {
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc index baf5812..ceb3eefc 100644 --- a/net/test/spawned_test_server/base_test_server.cc +++ b/net/test/spawned_test_server/base_test_server.cc
@@ -300,14 +300,17 @@ bool BaseTestServer::SetAndParseServerData(const std::string& server_data, int* port) { VLOG(1) << "Server data: " << server_data; - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError(server_data); - if (!parsed_json.value || !parsed_json.value->is_dict()) { - LOG(ERROR) << "Could not parse server data: " << parsed_json.error_message; + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(server_data); + if (!parsed_json.has_value()) { + LOG(ERROR) << "Could not parse server data: " + << parsed_json.error().message; + return false; + } else if (!parsed_json->is_dict()) { + LOG(ERROR) << "Could not parse server data: expecting a dictionary"; return false; } - server_data_ = std::move(parsed_json.value); + server_data_ = std::move(*parsed_json); absl::optional<int> port_value = server_data_->FindIntKey("port"); if (!port_value) {
diff --git a/ppapi/examples/font/simple_font.cc b/ppapi/examples/font/simple_font.cc index 8f9aa50..78a59e4 100644 --- a/ppapi/examples/font/simple_font.cc +++ b/ppapi/examples/font/simple_font.cc
@@ -99,7 +99,7 @@ font.Describe(&desc, &metrics); char buf[256]; - sprintf(buf, "%s = %s %dpt", + snprintf(buf, sizeof(buf), "%s = %s %dpt", title, desc.face().AsString().c_str(), desc.size()); return std::string(buf); }
diff --git a/sandbox/policy/win/sandbox_diagnostics.cc b/sandbox/policy/win/sandbox_diagnostics.cc index dc41fa6..49786fb 100644 --- a/sandbox/policy/win/sandbox_diagnostics.cc +++ b/sandbox/policy/win/sandbox_diagnostics.cc
@@ -27,8 +27,8 @@ for (auto&& item : *policies) { auto snapshot = base::JSONReader::ReadAndReturnValueWithError( item->JsonString(), base::JSON_PARSE_RFC); - CHECK(snapshot.value); - policy_values.Append(std::move(snapshot.value.value())); + CHECK(snapshot.has_value()); + policy_values.Append(std::move(*snapshot)); } std::move(response).Run(std::move(policy_values)); }
diff --git a/services/data_decoder/json_parser_impl.cc b/services/data_decoder/json_parser_impl.cc index 6c7c4b6..c3a48b3 100644 --- a/services/data_decoder/json_parser_impl.cc +++ b/services/data_decoder/json_parser_impl.cc
@@ -19,13 +19,12 @@ void JsonParserImpl::Parse(const std::string& json, uint32_t options, ParseCallback callback) { - base::JSONReader::ValueWithError ret = - base::JSONReader::ReadAndReturnValueWithError(json, options); - if (ret.value) { - std::move(callback).Run(std::move(ret.value), absl::nullopt); + auto ret = base::JSONReader::ReadAndReturnValueWithError(json, options); + if (ret.has_value()) { + std::move(callback).Run(std::move(*ret), absl::nullopt); } else { - std::move(callback).Run(absl::nullopt, - absl::make_optional(std::move(ret.error_message))); + std::move(callback).Run( + absl::nullopt, absl::make_optional(std::move(ret.error().message))); } }
diff --git a/services/data_decoder/public/cpp/data_decoder.cc b/services/data_decoder/public/cpp/data_decoder.cc index cdb14344..325cd8e7 100644 --- a/services/data_decoder/public/cpp/data_decoder.cc +++ b/services/data_decoder/public/cpp/data_decoder.cc
@@ -133,16 +133,16 @@ void ParsingComplete(scoped_refptr<DataDecoder::CancellationFlag> is_cancelled, DataDecoder::ValueParseCallback callback, - base::JSONReader::ValueWithError value_with_error) { + base::JSONReader::Result value_with_error) { if (is_cancelled->data) return; - if (!value_with_error.value) { + if (!value_with_error.has_value()) { std::move(callback).Run( - DataDecoder::ValueOrError::Error(value_with_error.error_message)); + DataDecoder::ValueOrError::Error(value_with_error.error().message)); } else { std::move(callback).Run( - DataDecoder::ValueOrError::Value(std::move(*value_with_error.value))); + DataDecoder::ValueOrError::Value(std::move(*value_with_error))); } } @@ -213,7 +213,7 @@ return; } - base::JSONReader::ValueWithError value_with_error = + auto value_with_error = base::JSONReader::ReadAndReturnValueWithError( *result.value, base::JSON_PARSE_RFC); ParsingComplete(is_cancelled, std::move(callback),
diff --git a/services/data_decoder/public/cpp/json_sanitizer_unittest.cc b/services/data_decoder/public/cpp/json_sanitizer_unittest.cc index 8eb8fab..bf8030da 100644 --- a/services/data_decoder/public/cpp/json_sanitizer_unittest.cc +++ b/services/data_decoder/public/cpp/json_sanitizer_unittest.cc
@@ -22,9 +22,9 @@ // Verifies that |json| can be sanitized by JsonSanitizer, and that the output // JSON is parsed to the same exact value as the original JSON. void CheckSuccess(const std::string& json) { - base::JSONReader::ValueWithError original_parse = + auto original_parse = base::JSONReader::ReadAndReturnValueWithError(json, base::JSON_PARSE_RFC); - ASSERT_TRUE(original_parse.value); + ASSERT_TRUE(original_parse.has_value()); base::RunLoop loop; bool result_received = false; @@ -32,11 +32,10 @@ json, base::BindLambdaForTesting([&](JsonSanitizer::Result result) { result_received = true; ASSERT_TRUE(result.value); - base::JSONReader::ValueWithError reparse = - base::JSONReader::ReadAndReturnValueWithError(*result.value, - base::JSON_PARSE_RFC); - ASSERT_TRUE(reparse.value); - EXPECT_EQ(*reparse.value, *original_parse.value); + auto reparse = base::JSONReader::ReadAndReturnValueWithError( + *result.value, base::JSON_PARSE_RFC); + ASSERT_TRUE(reparse.has_value()); + EXPECT_EQ(*reparse, *original_parse); loop.Quit(); }));
diff --git a/services/device/geolocation/network_location_request.cc b/services/device/geolocation/network_location_request.cc index 8b6032b4..e0d5dbc 100644 --- a/services/device/geolocation/network_location_request.cc +++ b/services/device/geolocation/network_location_request.cc
@@ -401,12 +401,12 @@ // Parse the response, ignoring comments. auto response_result = base::JSONReader::ReadAndReturnValueWithError(response_body); - if (!response_result.value) { + if (!response_result.has_value()) { LOG(WARNING) << "ParseServerResponse() : JSONReader failed : " - << response_result.error_message; + << response_result.error().message; return false; } - base::Value response_value = std::move(*response_result.value); + base::Value response_value = std::move(*response_result); if (!response_value.is_dict()) { VLOG(1) << "ParseServerResponse() : Unexpected response type "
diff --git a/services/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc b/services/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc index 0486165..32c632d 100644 --- a/services/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc +++ b/services/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc
@@ -38,7 +38,8 @@ protobuf.storage_type(), protobuf.filesystem_type(), protobuf.access_capability(), protobuf.max_capacity(), protobuf.free_space_in_bytes(), protobuf.free_space_in_objects(), - protobuf.storage_description(), protobuf.volume_identifier()); + protobuf.storage_description(), protobuf.volume_identifier(), + protobuf.serial_number()); } // The MediaTransferProtocolDaemonClient implementation.
diff --git a/services/device/public/mojom/mtp_storage_info.mojom b/services/device/public/mojom/mtp_storage_info.mojom index dcdb917..910620d 100644 --- a/services/device/public/mojom/mtp_storage_info.mojom +++ b/services/device/public/mojom/mtp_storage_info.mojom
@@ -22,4 +22,5 @@ uint64 free_space_in_objects = 0; string storage_description; string volume_identifier; + string serial_number; };
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index eeaf0c56..a64c2fe 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -8361,7 +8361,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -8446,7 +8446,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -8871,7 +8871,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -8956,7 +8956,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index f06fe8d..ac8b5d89 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -46491,7 +46491,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -46576,7 +46576,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47001,7 +47001,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47086,7 +47086,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47515,7 +47515,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47600,7 +47600,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48025,7 +48025,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48110,7 +48110,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48607,7 +48607,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48692,7 +48692,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49117,7 +49117,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49202,7 +49202,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49699,7 +49699,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49784,7 +49784,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50209,7 +50209,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.66" + "revision": "version:103.0.5060.67" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50294,7 +50294,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.25" + "revision": "version:104.0.5112.26" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index b045ad1a..1a5d3651 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -5688,21 +5688,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5141.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -5715,7 +5715,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "isolate_profile_data": true, @@ -5853,21 +5853,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -5879,7 +5879,7 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "args": [ @@ -5999,21 +5999,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -6025,7 +6025,7 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "isolate_profile_data": true,
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index a467bd9..6e83076 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -92889,21 +92889,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5141.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -92911,7 +92911,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "isolate_profile_data": true, @@ -93024,28 +93024,28 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "args": [ @@ -93145,28 +93145,28 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "isolate_profile_data": true, @@ -94504,20 +94504,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5141.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -94531,7 +94531,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "merge": { @@ -94669,20 +94669,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -94695,7 +94695,7 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "args": [ @@ -94815,20 +94815,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -94841,7 +94841,7 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "merge": { @@ -96337,20 +96337,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5141.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -96364,7 +96364,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "merge": { @@ -96502,20 +96502,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -96528,7 +96528,7 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "args": [ @@ -96648,20 +96648,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -96674,7 +96674,7 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "merge": { @@ -97409,20 +97409,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5141.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -97435,7 +97435,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" } ] },
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index 37befb3d..19d20c1 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -19085,21 +19085,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5141.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -19112,7 +19112,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "isolate_profile_data": true, @@ -19250,21 +19250,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -19276,7 +19276,7 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "args": [ @@ -19396,21 +19396,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5141.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5143.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v105.0.5141.0", - "revision": "version:105.0.5141.0" + "location": "lacros_version_skew_tests_v105.0.5143.0", + "revision": "version:105.0.5143.0" } ], "dimension_sets": [ @@ -19422,7 +19422,7 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 105.0.5141.0" + "variant_id": "Lacros version skew testing ash 105.0.5143.0" }, { "isolate_profile_data": true,
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index daf9844..e075c6f 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -22,15 +22,15 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5141.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5143.0/test_ash_chrome', ], - 'identifier': 'Lacros version skew testing ash 105.0.5141.0', + 'identifier': 'Lacros version skew testing ash 105.0.5143.0', 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v105.0.5141.0', - 'revision': 'version:105.0.5141.0', + 'location': 'lacros_version_skew_tests_v105.0.5143.0', + 'revision': 'version:105.0.5143.0', }, ], }, @@ -546,7 +546,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M104', - 'revision': 'version:104.0.5112.25' + 'revision': 'version:104.0.5112.26' } ] } @@ -570,7 +570,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M103', - 'revision': 'version:103.0.5060.66' + 'revision': 'version:103.0.5060.67' } ] } @@ -690,7 +690,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M104', - 'revision': 'version:104.0.5112.25' + 'revision': 'version:104.0.5112.26' } ] } @@ -714,7 +714,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M103', - 'revision': 'version:103.0.5060.66' + 'revision': 'version:103.0.5060.67' } ] } @@ -834,7 +834,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M104', - 'revision': 'version:104.0.5112.25' + 'revision': 'version:104.0.5112.26' } ] } @@ -858,7 +858,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M103', - 'revision': 'version:103.0.5060.66' + 'revision': 'version:103.0.5060.67' } ] }
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index be060c9..53300f9c 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -3358,6 +3358,7 @@ { "platforms": [ "linux", + "mac", "windows" ], "experiments": [
diff --git a/third_party/blink/renderer/core/timing/performance_mark_test.cc b/third_party/blink/renderer/core/timing/performance_mark_test.cc index 2d481d8..6685550a 100644 --- a/third_party/blink/renderer/core/timing/performance_mark_test.cc +++ b/third_party/blink/renderer/core/timing/performance_mark_test.cc
@@ -97,23 +97,21 @@ .ToLocalChecked(), kDoNotExternalize); - base::JSONReader::ValueWithError parsed_json = + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError(json_string.Utf8()); - EXPECT_TRUE(parsed_json.value->is_dict()); + EXPECT_TRUE(parsed_json->is_dict()); - EXPECT_EQ(expected_name, - parsed_json.value->GetDict().FindString("name")->c_str()); + EXPECT_EQ(expected_name, parsed_json->GetDict().FindString("name")->c_str()); EXPECT_EQ(expected_entry_type, - parsed_json.value->GetDict().FindString("entryType")->c_str()); + parsed_json->GetDict().FindString("entryType")->c_str()); EXPECT_EQ(expected_start_time, - parsed_json.value->GetDict().FindDouble("startTime").value()); + parsed_json->GetDict().FindDouble("startTime").value()); EXPECT_EQ(expected_duration, - parsed_json.value->GetDict().FindDouble("duration").value()); - EXPECT_EQ( - expected_navigation_count, - (uint32_t)parsed_json.value->GetDict().FindInt("navigationId").value()); + parsed_json->GetDict().FindDouble("duration").value()); + EXPECT_EQ(expected_navigation_count, + (uint32_t)parsed_json->GetDict().FindInt("navigationId").value()); - EXPECT_EQ(5ul, parsed_json.value->GetDict().size()); + EXPECT_EQ(5ul, parsed_json->GetDict().size()); } } // namespace blink
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_external_texture.cc b/third_party/blink/renderer/modules/webgpu/gpu_external_texture.cc index 7b0bbca..8729e65f 100644 --- a/third_party/blink/renderer/modules/webgpu/gpu_external_texture.cc +++ b/third_party/blink/renderer/modules/webgpu/gpu_external_texture.cc
@@ -94,6 +94,21 @@ return colorSpaceConversionConstants; } +bool IsSameGamutAndGamma(gfx::ColorSpace srcColorSpace, + gfx::ColorSpace dstColorSpace) { + if (srcColorSpace.GetPrimaryID() == dstColorSpace.GetPrimaryID()) { + skcms_TransferFunction src; + skcms_TransferFunction dst; + if (srcColorSpace.GetTransferFunction(&src) && + dstColorSpace.GetTransferFunction(&dst)) { + return (src.a == dst.a && src.b == dst.b && src.c == dst.c && + src.d == dst.d && src.e == dst.e && src.f == dst.f && + src.g == dst.g); + } + } + return false; +} + struct ExternalTextureSource { scoped_refptr<media::VideoFrame> media_video_frame = nullptr; media::PaintCanvasVideoRenderer* video_renderer = nullptr; @@ -250,6 +265,9 @@ external_texture_desc.plane0 = plane0; external_texture_desc.plane1 = plane1; + external_texture_desc.doYuvToRgbConversionOnly = + IsSameGamutAndGamma(srcColorSpace, dstColorSpace); + std::array<float, 12> yuvToRgbMatrix = GetYUVToRGBMatrix(srcColorSpace, media_video_frame->BitDepth()); external_texture_desc.yuvToRgbConversionMatrix = yuvToRgbMatrix.data();
diff --git a/third_party/blink/web_tests/platform/generic/compositing/3d-corners-expected.png b/third_party/blink/web_tests/platform/generic/compositing/3d-corners-expected.png index 3e267bf..c1f0a7aa 100644 --- a/third_party/blink/web_tests/platform/generic/compositing/3d-corners-expected.png +++ b/third_party/blink/web_tests/platform/generic/compositing/3d-corners-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/compositing/geometry/vertical-scroll-composited-expected.png b/third_party/blink/web_tests/platform/generic/compositing/geometry/vertical-scroll-composited-expected.png index 4245cef0..49921e1 100644 --- a/third_party/blink/web_tests/platform/generic/compositing/geometry/vertical-scroll-composited-expected.png +++ b/third_party/blink/web_tests/platform/generic/compositing/geometry/vertical-scroll-composited-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/compositing/lots-of-img-layers-expected.png b/third_party/blink/web_tests/platform/generic/compositing/lots-of-img-layers-expected.png index bf31e1bf..b52a953 100644 --- a/third_party/blink/web_tests/platform/generic/compositing/lots-of-img-layers-expected.png +++ b/third_party/blink/web_tests/platform/generic/compositing/lots-of-img-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/blink/web_tests/platform/generic/compositing/lots-of-img-layers-with-opacity-expected.png index bd825c1..c081fa9 100644 --- a/third_party/blink/web_tests/platform/generic/compositing/lots-of-img-layers-with-opacity-expected.png +++ b/third_party/blink/web_tests/platform/generic/compositing/lots-of-img-layers-with-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/generic/compositing/overflow/mask-with-filter-expected.png index dc5e8a6..dcfd69e 100644 --- a/third_party/blink/web_tests/platform/generic/compositing/overflow/mask-with-filter-expected.png +++ b/third_party/blink/web_tests/platform/generic/compositing/overflow/mask-with-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/generic/compositing/overflow/rotate-clip-expected.png index a66542e..f96e9fb 100644 --- a/third_party/blink/web_tests/platform/generic/compositing/overflow/rotate-clip-expected.png +++ b/third_party/blink/web_tests/platform/generic/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/generic/compositing/overflow/rotate-then-clip-expected.png index a66542e..f96e9fb 100644 --- a/third_party/blink/web_tests/platform/generic/compositing/overflow/rotate-then-clip-expected.png +++ b/third_party/blink/web_tests/platform/generic/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/fast/frames/frame-set-scaling-skew-expected.png b/third_party/blink/web_tests/platform/generic/fast/frames/frame-set-scaling-skew-expected.png index 4b6b2f4..4fe89ca 100644 --- a/third_party/blink/web_tests/platform/generic/fast/frames/frame-set-scaling-skew-expected.png +++ b/third_party/blink/web_tests/platform/generic/fast/frames/frame-set-scaling-skew-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png b/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png index 4245cef0..49921e1 100644 --- a/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png +++ b/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png index dc5e8a6..dcfd69e 100644 --- a/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png +++ b/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png index a66542e..f96e9fb 100644 --- a/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png +++ b/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png index a66542e..f96e9fb 100644 --- a/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png +++ b/third_party/blink/web_tests/platform/generic/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png index dc5e8a6..dcfd69e 100644 --- a/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png +++ b/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png index a66542e..f96e9fb 100644 --- a/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png +++ b/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png index a66542e..f96e9fb 100644 --- a/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png +++ b/third_party/blink/web_tests/platform/generic/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/media/video-zoom-controls-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/media/video-zoom-controls-expected.png new file mode 100644 index 0000000..31d2cc6 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.13/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png new file mode 100644 index 0000000..a9b1dae --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png new file mode 100644 index 0000000..6f4c626 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/compositing/overflow/nested-render-surfaces-with-rotation-expected.png new file mode 100644 index 0000000..897efa6 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/compositing/overflow/nested-render-surfaces-with-rotation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/media/video-zoom-controls-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/media/video-zoom-controls-expected.png new file mode 100644 index 0000000..8a38e04 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/backface-visibility-interop/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/backface-visibility-interop/compositing/overflow/nested-render-surfaces-with-rotation-expected.png new file mode 100644 index 0000000..897efa6 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/backface-visibility-interop/compositing/overflow/nested-render-surfaces-with-rotation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png new file mode 100644 index 0000000..4cd47b1 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png new file mode 100644 index 0000000..174ea72d --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png new file mode 100644 index 0000000..e6c26c6 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/3d-corners-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/3d-corners-expected.png new file mode 100644 index 0000000..3e267bf --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/3d-corners-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/geometry/layer-due-to-layer-children-expected.png new file mode 100644 index 0000000..2b2240c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/geometry/layer-due-to-layer-children-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/geometry/vertical-scroll-composited-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/geometry/vertical-scroll-composited-expected.png new file mode 100644 index 0000000..4245cef0 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/geometry/vertical-scroll-composited-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/lots-of-img-layers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/lots-of-img-layers-expected.png new file mode 100644 index 0000000..bf31e1bf --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/lots-of-img-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/lots-of-img-layers-with-opacity-expected.png new file mode 100644 index 0000000..bd825c1 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/lots-of-img-layers-with-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/mask-with-filter-expected.png new file mode 100644 index 0000000..dc5e8a6 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/mask-with-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/nested-render-surfaces-with-rotation-expected.png new file mode 100644 index 0000000..55588426 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/nested-render-surfaces-with-rotation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/perspective-interest-rect-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/perspective-interest-rect-expected.png new file mode 100644 index 0000000..6317014 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/perspective-interest-rect-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/reflections/nested-reflection-anchor-point-expected.png new file mode 100644 index 0000000..1b4b676 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/reflections/nested-reflection-anchor-point-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/compositing/reflections/nested-reflection-animated-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/reflections/nested-reflection-animated-expected.png new file mode 100644 index 0000000..b2a84da5 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/compositing/reflections/nested-reflection-animated-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png new file mode 100644 index 0000000..edaacf3 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/fast/borders/border-radius-with-composited-child-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/fast/borders/border-radius-with-composited-child-expected.png new file mode 100644 index 0000000..c79bd74 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/fast/borders/border-radius-with-composited-child-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/fast/frames/frame-set-scaling-skew-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/fast/frames/frame-set-scaling-skew-expected.png new file mode 100644 index 0000000..4b6b2f4 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/fast/frames/frame-set-scaling-skew-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/media/video-zoom-controls-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/media/video-zoom-controls-expected.png new file mode 100644 index 0000000..31d2cc6 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/paint/invalidation/transform/caret-with-transformation-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/paint/invalidation/transform/caret-with-transformation-expected.png new file mode 100644 index 0000000..382bdf0 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/paint/invalidation/transform/caret-with-transformation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/general/perspective-units-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/general/perspective-units-expected.png new file mode 100644 index 0000000..f62b17a --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/general/perspective-units-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png new file mode 100644 index 0000000..68fe740 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-expected.png new file mode 100644 index 0000000..348f148 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png new file mode 100644 index 0000000..1ca302fa1 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png new file mode 100644 index 0000000..0ef9580 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/transforms/transformed-caret-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/transformed-caret-expected.png new file mode 100644 index 0000000..d9469c04 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/transforms/transformed-caret-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/geometry/layer-due-to-layer-children-expected.png new file mode 100644 index 0000000..2b2240c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/geometry/layer-due-to-layer-children-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png new file mode 100644 index 0000000..4245cef0 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png new file mode 100644 index 0000000..dc5e8a6 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/nested-render-surfaces-with-rotation-expected.png new file mode 100644 index 0000000..55588426 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/nested-render-surfaces-with-rotation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/paint/invalidation/transform/caret-with-transformation-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/paint/invalidation/transform/caret-with-transformation-expected.png new file mode 100644 index 0000000..382bdf0 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/paint/invalidation/transform/caret-with-transformation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/general/perspective-units-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/general/perspective-units-expected.png new file mode 100644 index 0000000..f62b17a --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/general/perspective-units-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png new file mode 100644 index 0000000..68fe740 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-expected.png new file mode 100644 index 0000000..348f148 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png new file mode 100644 index 0000000..1ca302fa1 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png new file mode 100644 index 0000000..0ef9580 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/transformed-caret-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/transformed-caret-expected.png new file mode 100644 index 0000000..d9469c04 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/backface-visibility-interop/transforms/transformed-caret-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png new file mode 100644 index 0000000..66bc8e9 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png new file mode 100644 index 0000000..a9b1dae --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png new file mode 100644 index 0000000..6f4c626 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png new file mode 100644 index 0000000..dc5e8a6 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/lots-of-img-layers-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/lots-of-img-layers-expected.png index dbf1f9e..0389d73 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/lots-of-img-layers-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/lots-of-img-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/lots-of-img-layers-with-opacity-expected.png index b54f81e..38f4c4af 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/lots-of-img-layers-with-opacity-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/lots-of-img-layers-with-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png index e06c2ea..3e34b8f 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/lots-of-img-layers-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/lots-of-img-layers-expected.png index dbf1f9e..0389d73 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/lots-of-img-layers-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/lots-of-img-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/lots-of-img-layers-with-opacity-expected.png index b54f81e..38f4c4af 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/lots-of-img-layers-with-opacity-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/lots-of-img-layers-with-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png index e06c2ea..3e34b8f 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png new file mode 100644 index 0000000..a66542e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/blink/web_tests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png index 2b2240c..28be673e 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/blink/web_tests/platform/mac/compositing/overflow/nested-render-surfaces-with-rotation-expected.png index 55588426..897efa6 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/overflow/nested-render-surfaces-with-rotation-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/overflow/nested-render-surfaces-with-rotation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/perspective-interest-rect-expected.png b/third_party/blink/web_tests/platform/mac/compositing/perspective-interest-rect-expected.png index 6317014..6e644bb 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/perspective-interest-rect-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/perspective-interest-rect-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png index 1b4b676..4610b31 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png b/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png index b2a84da5..bd4ed00 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png index edaacf3..d28d911 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png b/third_party/blink/web_tests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png index c79bd74..63517fc 100644 --- a/third_party/blink/web_tests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/media/video-zoom-controls-expected.png b/third_party/blink/web_tests/platform/mac/media/video-zoom-controls-expected.png index 31d2cc6..8a38e04 100644 --- a/third_party/blink/web_tests/platform/mac/media/video-zoom-controls-expected.png +++ b/third_party/blink/web_tests/platform/mac/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/transform/caret-with-transformation-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/transform/caret-with-transformation-expected.png index 382bdf0..a4abbc0 100644 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/transform/caret-with-transformation-expected.png +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/transform/caret-with-transformation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/transforms/3d/general/perspective-units-expected.png b/third_party/blink/web_tests/platform/mac/transforms/3d/general/perspective-units-expected.png index f62b17a..f15211b 100644 --- a/third_party/blink/web_tests/platform/mac/transforms/3d/general/perspective-units-expected.png +++ b/third_party/blink/web_tests/platform/mac/transforms/3d/general/perspective-units-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png b/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png index 68fe740..34fca42 100644 --- a/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png +++ b/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.png b/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.png index 348f148..a5e29822 100644 --- a/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.png +++ b/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png b/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png index 1ca302fa1..dd8e5ba 100644 --- a/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png +++ b/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png index 0ef9580..4ffef74 100644 --- a/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png +++ b/third_party/blink/web_tests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/transforms/transformed-caret-expected.png b/third_party/blink/web_tests/platform/mac/transforms/transformed-caret-expected.png index d9469c04..19d8663 100644 --- a/third_party/blink/web_tests/platform/mac/transforms/transformed-caret-expected.png +++ b/third_party/blink/web_tests/platform/mac/transforms/transformed-caret-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png b/third_party/blink/web_tests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png index 66bc8e9..4cd47b1 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png +++ b/third_party/blink/web_tests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-foreign-object-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png index a9b1dae..174ea72d 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png +++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png index 6f4c626..e6c26c6 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png +++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/3d-corners-expected.png b/third_party/blink/web_tests/platform/win/compositing/3d-corners-expected.png deleted file mode 100644 index c1f0a7aa..0000000 --- a/third_party/blink/web_tests/platform/win/compositing/3d-corners-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/geometry/vertical-scroll-composited-expected.png b/third_party/blink/web_tests/platform/win/compositing/geometry/vertical-scroll-composited-expected.png deleted file mode 100644 index 49921e1..0000000 --- a/third_party/blink/web_tests/platform/win/compositing/geometry/vertical-scroll-composited-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/lots-of-img-layers-expected.png b/third_party/blink/web_tests/platform/win/compositing/lots-of-img-layers-expected.png deleted file mode 100644 index b52a953..0000000 --- a/third_party/blink/web_tests/platform/win/compositing/lots-of-img-layers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/blink/web_tests/platform/win/compositing/lots-of-img-layers-with-opacity-expected.png deleted file mode 100644 index c081fa9..0000000 --- a/third_party/blink/web_tests/platform/win/compositing/lots-of-img-layers-with-opacity-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/win/compositing/overflow/mask-with-filter-expected.png deleted file mode 100644 index dcfd69e..0000000 --- a/third_party/blink/web_tests/platform/win/compositing/overflow/mask-with-filter-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/win/compositing/overflow/rotate-clip-expected.png deleted file mode 100644 index f96e9fb..0000000 --- a/third_party/blink/web_tests/platform/win/compositing/overflow/rotate-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/win/compositing/overflow/rotate-then-clip-expected.png deleted file mode 100644 index f96e9fb..0000000 --- a/third_party/blink/web_tests/platform/win/compositing/overflow/rotate-then-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/frames/frame-set-scaling-skew-expected.png b/third_party/blink/web_tests/platform/win/fast/frames/frame-set-scaling-skew-expected.png deleted file mode 100644 index 4fe89ca..0000000 --- a/third_party/blink/web_tests/platform/win/fast/frames/frame-set-scaling-skew-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png b/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png deleted file mode 100644 index 49921e1..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/geometry/vertical-scroll-composited-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png deleted file mode 100644 index dcfd69e..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/mask-with-filter-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png deleted file mode 100644 index f96e9fb..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/rotate-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png deleted file mode 100644 index f96e9fb..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/backface-visibility-interop/compositing/overflow/rotate-then-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png b/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png deleted file mode 100644 index dcfd69e..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png b/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png deleted file mode 100644 index f96e9fb..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png b/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png deleted file mode 100644 index f96e9fb..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/unrar/README.chromium b/third_party/unrar/README.chromium index bddb93d..bdf8c99 100644 --- a/third_party/unrar/README.chromium +++ b/third_party/unrar/README.chromium
@@ -33,5 +33,6 @@ should be temporary, until the fix can be pulled from upstream. - More static initializers removed. - Changes to support building in -std=c++20 mode. +- Cherry-picked https://github.com/aawc/unrar/pull/35 All these changes are included in one patch file (chromium_changes.v6.0.3.patch)
diff --git a/third_party/unrar/src/pathfn.cpp b/third_party/unrar/src/pathfn.cpp index 41594bf9..4c4d406 100644 --- a/third_party/unrar/src/pathfn.cpp +++ b/third_party/unrar/src/pathfn.cpp
@@ -761,16 +761,16 @@ char Field[10][6]; - sprintf(Field[0],"%04u",rlt.Year); - sprintf(Field[1],"%02u",rlt.Month); - sprintf(Field[2],"%02u",rlt.Day); - sprintf(Field[3],"%02u",rlt.Hour); - sprintf(Field[4],"%02u",rlt.Minute); - sprintf(Field[5],"%02u",rlt.Second); - sprintf(Field[6],"%02u",(uint)CurWeek); - sprintf(Field[7],"%u",(uint)WeekDay+1); - sprintf(Field[8],"%03u",rlt.yDay+1); - sprintf(Field[9],"%05u",ArcNumber); + snprintf(Field[0],sizeof(Field[0]),"%04u",rlt.Year); + snprintf(Field[1],sizeof(Field[1]),"%02u",rlt.Month); + snprintf(Field[2],sizeof(Field[2]),"%02u",rlt.Day); + snprintf(Field[3],sizeof(Field[3]),"%02u",rlt.Hour); + snprintf(Field[4],sizeof(Field[4]),"%02u",rlt.Minute); + snprintf(Field[5],sizeof(Field[5]),"%02u",rlt.Second); + snprintf(Field[6],sizeof(Field[6]),"%02u",(uint)CurWeek); + snprintf(Field[7],sizeof(Field[7]),"%u",(uint)WeekDay+1); + snprintf(Field[8],sizeof(Field[8]),"%03u",rlt.yDay+1); + snprintf(Field[9],sizeof(Field[9]),"%05u",ArcNumber); const wchar *MaskChars=L"YMDHISWAEN";
diff --git a/tools/attribution_reporting/simulator_main.cc b/tools/attribution_reporting/simulator_main.cc index d852684..e8ca0b97 100644 --- a/tools/attribution_reporting/simulator_main.cc +++ b/tools/attribution_reporting/simulator_main.cc
@@ -189,21 +189,20 @@ const content::AttributionSimulationOptions& options, bool copy_input_to_output, int json_write_options) { - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError( - json_input, base::JSONParserOptions::JSON_PARSE_RFC); - if (!result.value) { - std::cerr << "failed to deserialize input: " << result.error_message + auto result = base::JSONReader::ReadAndReturnValueWithError( + json_input, base::JSONParserOptions::JSON_PARSE_RFC); + if (!result.has_value()) { + std::cerr << "failed to deserialize input: " << result.error().message << std::endl; return 1; } base::Value input_copy; if (copy_input_to_output) - input_copy = result.value->Clone(); + input_copy = result->Clone(); - base::Value output = content::RunAttributionSimulation( - std::move(*result.value), options, std::cerr); + base::Value output = + content::RunAttributionSimulation(std::move(*result), options, std::cerr); if (output.type() == base::Value::Type::NONE) return 1;
diff --git a/tools/json_schema_compiler/test/test_util.cc b/tools/json_schema_compiler/test/test_util.cc index b27c9a0..7007036 100644 --- a/tools/json_schema_compiler/test/test_util.cc +++ b/tools/json_schema_compiler/test/test_util.cc
@@ -14,12 +14,11 @@ namespace test_util { base::Value ReadJson(const base::StringPiece& json) { - base::JSONReader::ValueWithError parsed_json = - base::JSONReader::ReadAndReturnValueWithError( - json, base::JSON_ALLOW_TRAILING_COMMAS); + auto parsed_json = base::JSONReader::ReadAndReturnValueWithError( + json, base::JSON_ALLOW_TRAILING_COMMAS); // CHECK not ASSERT since passing invalid |json| is a test error. - CHECK(parsed_json.value) << parsed_json.error_message; - return std::move(*parsed_json.value); + CHECK(parsed_json.has_value()) << parsed_json.error().message; + return std::move(*parsed_json); } std::unique_ptr<base::ListValue> List(std::unique_ptr<base::Value> a) {
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index f432d02..aa84ab8 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -71424,6 +71424,8 @@ <int value="4" label="The permission request time out"/> <int value="5" label="Users turn off the screen"/> <int value="6" label="System exceptions thrown out"/> + <int value="7" label="Users cancel from the onboarding UI"/> + <int value="8" label="Users cancel when the device disconnects"/> </enum> <enum name="OnServiceConnectedTimedOutResult">
diff --git a/tools/metrics/histograms/metadata/windows/histograms.xml b/tools/metrics/histograms/metadata/windows/histograms.xml index 3d8b081..6f75c1f 100644 --- a/tools/metrics/histograms/metadata/windows/histograms.xml +++ b/tools/metrics/histograms/metadata/windows/histograms.xml
@@ -231,6 +231,18 @@ </summary> </histogram> +<histogram name="Windows.ParallelDllLoadingEnabled" enum="BooleanEnabled" + expires_after="never"> +<!-- expires-never: Needed to measure third party incompatibilities on Windows which could happen at any time. --> + + <owner>forshaw@chromium.org</owner> + <owner>wfh@chromium.org</owner> + <summary> + Records whether or not parallel DLL loading is enabled for the browser + process executable. This is recorded once per browser session, on startup. + </summary> +</histogram> + <histogram name="Windows.ParentProcessNameHash" enum="ProcessNameHash" expires_after="never"> <!-- expires-never: Needed to measure third party incompatibilities on Windows which could happen at any time. -->
diff --git a/tools/visual_debugger/app.html b/tools/visual_debugger/app.html index 717a5d2..e463d4c 100644 --- a/tools/visual_debugger/app.html +++ b/tools/visual_debugger/app.html
@@ -196,7 +196,6 @@ <div class='section' id='controls'> <div id='buttons'> <button class="mdc-button mdc-button--outline" id='prev'> - <div class="mdc-button__ripple"></div> <span class="mdc-button__label"><i class="material-icons-outlined">skip_previous</i> Previous frame</span> </button> <button class="mdc-button mdc-button--outline" id='play'> @@ -208,9 +207,12 @@ <span class="mdc-button__label"><i class="material-icons-outlined">pause_circle_outline</i> Pause</span> </button> <button class="mdc-button mdc-button--outline" id='next'> - <div class="mdc-button__ripple"></div> <span class="mdc-button__label">Next frame <i class="material-icons-outlined">skip_next</i></span> </button> + <button class="mdc-button mdc-button--raised" style="visibility:hidden" id='live'> + <div class="mdc-button__ripple"></div> + <span class="mdc-button__label">Live <i class="material-icons-outlined">fast_forward</i></span> + </button> </div> <div class='panelSection'> @@ -396,10 +398,13 @@ document.querySelector('#pause').addEventListener('click', () => { player.pause(); + pause.setAttribute('style', 'background:#000000;color:white'); + live.setAttribute('style', 'visibility:visible'); }); document.querySelector('#play').addEventListener('click', () => { player.play(); + pause.removeAttribute('style'); }); document.querySelector('#prev').addEventListener('click', () => { @@ -410,9 +415,19 @@ player.forward(); }); + document.querySelector('#live').addEventListener('click', () => { + player.freezeFrame(DrawFrame.count()); + player.play(); + has_disconnected = false; + live.setAttribute('style', 'visibility:hidden'); + pause.removeAttribute('style'); + }); + const scrubberFrame = document.querySelector('#scrubberframe'); scrubberFrame.addEventListener('input', () => { player.freezeFrame(scrubberFrame.value); + pause.setAttribute('style', 'background:#000000;color:white'); + live.setAttribute('style', 'visibility:visible'); }); const scrubberDraw = document.querySelector('#scrubberdraw');
diff --git a/tools/visual_debugger/style.css b/tools/visual_debugger/style.css index 538f28a..b7791570 100644 --- a/tools/visual_debugger/style.css +++ b/tools/visual_debugger/style.css
@@ -89,4 +89,11 @@ .selected-orientation { background: rgba(255, 0, 0, 0.2);; color: black; -} \ No newline at end of file +} + +button#live { + outline-color: black; + --mdc-theme-primary:#FF0000; + --mdc-theme-on-primary:black; + opacity: 0.8; +}
diff --git a/ui/chromeos/translations/ui_chromeos_strings_en-GB.xtb b/ui/chromeos/translations/ui_chromeos_strings_en-GB.xtb index 002a170..9b4cfc9 100644 --- a/ui/chromeos/translations/ui_chromeos_strings_en-GB.xtb +++ b/ui/chromeos/translations/ui_chromeos_strings_en-GB.xtb
@@ -340,6 +340,7 @@ <translation id="3971140002794351170">Download mobile profile, network <ph name="NETWORK_INDEX" /> of <ph name="NETWORK_COUNT" />, <ph name="NETWORK_NAME" />, <ph name="NETWORK_PROVIDER_NAME" /></translation> <translation id="3973925058222872294">English (UK)</translation> <translation id="3975895378829046965">Bangla phonetic</translation> +<translation id="3991446849494482687">This will also disable the SIM lock setting on the device.</translation> <translation id="4002066346123236978">Title</translation> <translation id="4017788180641807848">English (US) with Workman keyboard</translation> <translation id="4040753847560036377">Incorrect PUK</translation>
diff --git a/ui/display/manager/json_converter_unittest.cc b/ui/display/manager/json_converter_unittest.cc index 8ddeba20..b6aabff3 100644 --- a/ui/display/manager/json_converter_unittest.cc +++ b/ui/display/manager/json_converter_unittest.cc
@@ -47,14 +47,14 @@ " \"offset\": 30\n" " }]\n" "}"; - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError(data, 0); - ASSERT_TRUE(result.value) << result.error_message << " at " - << result.error_line << ":" << result.error_column; - EXPECT_EQ(value, result.value.value()); + auto result = base::JSONReader::ReadAndReturnValueWithError(data, 0); + ASSERT_TRUE(result.has_value()) + << result.error().message << " at " << result.error().line << ":" + << result.error().column; + EXPECT_EQ(value, *result); DisplayLayout read_layout; - EXPECT_TRUE(JsonToDisplayLayout(result.value.value(), &read_layout)); + EXPECT_TRUE(JsonToDisplayLayout(*result, &read_layout)); EXPECT_EQ(read_layout.primary_id, layout.primary_id); EXPECT_EQ(read_layout.default_unified, layout.default_unified); EXPECT_TRUE(read_layout.HasSamePlacementList(layout)); @@ -68,13 +68,13 @@ " \"position\": \"bottom\",\n" " \"offset\": 20\n" "}"; - base::JSONReader::ValueWithError result = - base::JSONReader::ReadAndReturnValueWithError(data, 0); - ASSERT_TRUE(result.value) << result.error_message << " at " - << result.error_line << ":" << result.error_column; + auto result = base::JSONReader::ReadAndReturnValueWithError(data, 0); + ASSERT_TRUE(result.has_value()) + << result.error().message << " at " << result.error().line << ":" + << result.error().column; DisplayLayout read_layout; - EXPECT_TRUE(JsonToDisplayLayout(result.value.value(), &read_layout)); + EXPECT_TRUE(JsonToDisplayLayout(*result, &read_layout)); EXPECT_EQ(1, read_layout.primary_id); EXPECT_FALSE(read_layout.default_unified); ASSERT_EQ(1u, read_layout.placement_list.size());
diff --git a/ui/ozone/platform/wayland/host/wayland_event_source.cc b/ui/ozone/platform/wayland/host/wayland_event_source.cc index baf67e7..4a7f275 100644 --- a/ui/ozone/platform/wayland/host/wayland_event_source.cc +++ b/ui/ozone/platform/wayland/host/wayland_event_source.cc
@@ -501,6 +501,18 @@ DCHECK(inserted); } +void WaylandEventSource::OnTouchStylusForceChanged(PointerId pointer_id, + float force) { + DCHECK(last_touch_stylus_data_[pointer_id].has_value()); + last_touch_stylus_data_[pointer_id]->force = force; +} + +void WaylandEventSource::OnTouchStylusTiltChanged(PointerId pointer_id, + const gfx::Vector2dF& tilt) { + DCHECK(last_touch_stylus_data_[pointer_id].has_value()); + last_touch_stylus_data_[pointer_id]->tilt = tilt; +} + const WaylandWindow* WaylandEventSource::GetTouchTarget(PointerId id) const { const auto it = touch_points_.find(id); return it == touch_points_.end() ? nullptr : it->second->window.get(); @@ -656,7 +668,12 @@ return absl::nullopt; } - return PointerDetails(it->second->type, pointer_id); + // The values below come from the default values in pointer_details.cc|h. + return PointerDetails(it->second->type, pointer_id, + /*radius_x=*/1.0f, + /*radius_y=*/1.0f, it->second->force, + /*twist=*/0.0f, it->second->tilt.x(), + it->second->tilt.y()); } } // namespace ui
diff --git a/ui/ozone/platform/wayland/host/wayland_event_source.h b/ui/ozone/platform/wayland/host/wayland_event_source.h index 63c06af..f15b63c 100644 --- a/ui/ozone/platform/wayland/host/wayland_event_source.h +++ b/ui/ozone/platform/wayland/host/wayland_event_source.h
@@ -137,6 +137,9 @@ const WaylandWindow* GetTouchTarget(PointerId id) const override; void OnTouchStylusToolChanged(PointerId pointer_id, EventPointerType pointer_type) override; + void OnTouchStylusForceChanged(PointerId pointer_id, float force) override; + void OnTouchStylusTiltChanged(PointerId pointer_id, + const gfx::Vector2dF& tilt) override; // WaylandZwpPointerGesture::Delegate: void OnPinchEvent(EventType event_type,
diff --git a/ui/ozone/platform/wayland/host/wayland_touch.cc b/ui/ozone/platform/wayland/host/wayland_touch.cc index 35c3881..915a075 100644 --- a/ui/ozone/platform/wayland/host/wayland_touch.cc +++ b/ui/ozone/platform/wayland/host/wayland_touch.cc
@@ -150,7 +150,10 @@ uint32_t time, uint32_t id, wl_fixed_t force) { - NOTIMPLEMENTED_LOG_ONCE(); + auto* touch = static_cast<WaylandTouch*>(data); + DCHECK(touch); + + touch->delegate_->OnTouchStylusForceChanged(id, wl_fixed_to_double(force)); } // static @@ -160,7 +163,12 @@ uint32_t id, wl_fixed_t tilt_x, wl_fixed_t tilt_y) { - NOTIMPLEMENTED_LOG_ONCE(); + auto* touch = static_cast<WaylandTouch*>(data); + DCHECK(touch); + + touch->delegate_->OnTouchStylusTiltChanged( + id, + gfx::Vector2dF(wl_fixed_to_double(tilt_x), wl_fixed_to_double(tilt_y))); } } // namespace ui
diff --git a/ui/ozone/platform/wayland/host/wayland_touch.h b/ui/ozone/platform/wayland/host/wayland_touch.h index cec325c..8a36cd9 100644 --- a/ui/ozone/platform/wayland/host/wayland_touch.h +++ b/ui/ozone/platform/wayland/host/wayland_touch.h
@@ -108,6 +108,9 @@ virtual const WaylandWindow* GetTouchTarget(PointerId id) const = 0; virtual void OnTouchStylusToolChanged(PointerId pointer_id, EventPointerType pointer_type) = 0; + virtual void OnTouchStylusForceChanged(PointerId pointer_id, float force) = 0; + virtual void OnTouchStylusTiltChanged(PointerId pointer_id, + const gfx::Vector2dF& tilt) = 0; }; } // namespace ui
diff --git a/ui/ozone/platform/wayland/host/wayland_touch_unittest.cc b/ui/ozone/platform/wayland/host/wayland_touch_unittest.cc index 689dd43..4cfceac6 100644 --- a/ui/ozone/platform/wayland/host/wayland_touch_unittest.cc +++ b/ui/ozone/platform/wayland/host/wayland_touch_unittest.cc
@@ -35,6 +35,11 @@ *ptr = Event::Clone(*arg0); } +bool CompareFloat(float a, float b) { + constexpr float kEpsilon = std::numeric_limits<float>::epsilon(); + return std::isnan(a) ? std::isnan(b) : fabs(a - b) < kEpsilon; +} + } // namespace class WaylandTouchTest : public WaylandTest { @@ -64,12 +69,19 @@ void CheckEventType( ui::EventType event_type, ui::Event* event, - ui::EventPointerType pointer_type = ui::EventPointerType::kTouch) { + ui::EventPointerType pointer_type = ui::EventPointerType::kTouch, + float force = std::numeric_limits<float>::quiet_NaN(), + float tilt_x = 0.0, + float tilt_y = 0.0) { ASSERT_TRUE(event); ASSERT_TRUE(event->IsTouchEvent()); auto* touch_event = event->AsTouchEvent(); EXPECT_EQ(event_type, touch_event->type()); + EXPECT_EQ(pointer_type, touch_event->pointer_details().pointer_type); + EXPECT_TRUE(CompareFloat(force, touch_event->pointer_details().force)); + EXPECT_TRUE(CompareFloat(tilt_x, touch_event->pointer_details().tilt_x)); + EXPECT_TRUE(CompareFloat(tilt_y, touch_event->pointer_details().tilt_y)); } raw_ptr<wl::TestTouch> touch_; @@ -127,7 +139,8 @@ wl_touch_send_frame(touch_->resource()); Sync(); - CheckEventType(ui::ET_TOUCH_RELEASED, event.get()); + CheckEventType(ui::ET_TOUCH_RELEASED, event.get(), + ui::EventPointerType::kPen); } // Tests that touch events with stylus pen work. This variant of the test sends @@ -137,27 +150,36 @@ std::unique_ptr<Event> event; EXPECT_CALL(delegate_, DispatchEvent(_)).WillRepeatedly(CloneEvent(&event)); + uint32_t time = 0; wl_touch_send_down(touch_->resource(), 1, 0, surface_->resource(), 0 /* id */, wl_fixed_from_int(50), wl_fixed_from_int(100)); zcr_touch_stylus_v2_send_tool(touch_->touch_stylus()->resource(), 0 /* id */, ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_PEN); + zcr_touch_stylus_v2_send_force(touch_->touch_stylus()->resource(), ++time, + 0 /* id */, wl_fixed_from_double(1.0f)); + zcr_touch_stylus_v2_send_tilt(touch_->touch_stylus()->resource(), ++time, + 0 /* id */, wl_fixed_from_double(-45), + wl_fixed_from_double(45)); wl_touch_send_frame(touch_->resource()); Sync(); - CheckEventType(ui::ET_TOUCH_PRESSED, event.get(), ui::EventPointerType::kPen); + CheckEventType(ui::ET_TOUCH_PRESSED, event.get(), ui::EventPointerType::kPen, + 1.0f /* force */, -45.0f /* tilt_x */, 45.0f /* tilt_y */); wl_touch_send_motion(touch_->resource(), 500, 0 /* id */, wl_fixed_from_int(100), wl_fixed_from_int(100)); wl_touch_send_frame(touch_->resource()); Sync(); - CheckEventType(ui::ET_TOUCH_MOVED, event.get(), ui::EventPointerType::kPen); + CheckEventType(ui::ET_TOUCH_MOVED, event.get(), ui::EventPointerType::kPen, + 1.0f /* force */, -45.0f /* tilt_x */, 45.0f /* tilt_y */); wl_touch_send_up(touch_->resource(), 1, 1000, 0 /* id */); wl_touch_send_frame(touch_->resource()); Sync(); - CheckEventType(ui::ET_TOUCH_RELEASED, event.get()); + CheckEventType(ui::ET_TOUCH_RELEASED, event.get(), ui::EventPointerType::kPen, + 1.0f /* force */, -45.0f /* tilt_x */, 45.0f /* tilt_y */); } // Tests that touch focus is correctly set and released.
diff --git a/weblayer/browser/password_manager_driver_factory.cc b/weblayer/browser/password_manager_driver_factory.cc index 814beb6..0d631d6 100644 --- a/weblayer/browser/password_manager_driver_factory.cc +++ b/weblayer/browser/password_manager_driver_factory.cc
@@ -105,6 +105,9 @@ mojo::PendingAssociatedReceiver<autofill::mojom::PasswordManagerDriver> pending_receiver, content::RenderFrameHost* render_frame_host) { + // TODO(https://crbug.com/1233858): Similarly to the + // ContentPasswordManagerDriver implementation. Do not bind the interface when + // the RenderFrameHost is in an anonymous iframe. content::WebContents* web_contents = content::WebContents::FromRenderFrameHost(render_frame_host); if (!web_contents)