Skip to content

Commit

Permalink
Build fixes for Chromium 105 uplift to 1.43.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarolin committed Aug 23, 2022
1 parent a00023a commit 3ed81e4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 47 deletions.
9 changes: 5 additions & 4 deletions browser/ui/webui/sidebar/sidebar_bookmarks_page_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ class BookmarkContextMenu : public ui::SimpleMenuModel,

private:
void AddItem(int command_id) {
ui::SimpleMenuModel::AddItem(
command_id,
controller_->menu_model()->GetLabelAt(
controller_->menu_model()->GetIndexOfCommandId(command_id)));
ui::SimpleMenuModel::AddItem(command_id,
controller_->menu_model()->GetLabelAt(
controller_->menu_model()
->GetIndexOfCommandId(command_id)
.value()));
}

std::unique_ptr<BookmarkContextMenuController> controller_;
Expand Down
15 changes: 0 additions & 15 deletions chromium_src/chrome/browser/ui/views/frame/browser_view_layout.cc

This file was deleted.

This file was deleted.

8 changes: 2 additions & 6 deletions components/brave_ads/browser/ads_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1792,12 +1792,8 @@ void AdsServiceImpl::RecordP2AEvent(const std::string& name,
return;
}

base::ListValue* list = nullptr;
if (!maybe_list->GetAsList(&list)) {
return;
}

for (auto& item : list->GetList()) {
auto& list = maybe_list->GetList();
for (auto& item : list) {
RecordInWeeklyStorageAndEmitP2AHistogramAnswer(profile_->GetPrefs(),
item.GetString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,13 @@ namespace JSONReader {

SegmentList ReadSegments(const std::string& json) {
absl::optional<base::Value> value = base::JSONReader::Read(json);
if (!value) {
return {};
}

base::ListValue* list = nullptr;
if (!value->GetAsList(&list)) {
if (!value || !value->is_list()) {
return {};
}

SegmentList segments;
for (const auto& element : list->GetList()) {
auto& list = value->GetList();
for (const auto& element : list) {
if (!element.is_string()) {
return {};
}
Expand Down

0 comments on commit 3ed81e4

Please sign in to comment.