Commit 5ac6651a authored by sebsg's avatar sebsg Committed by Commit Bot

[STTS] Show notification for all pending entries.

The code was only sending the first SendTabToSelf to UI handlers.
This CL changes this to send all the entries to the handlers.

Bug: 943678
Change-Id: Ia938d57779dfeb8878568da17b659149cef048a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1531379
Auto-Submit: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarJeffrey Cohen <jeffreycohen@chromium.org>
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642684}
parent b26ace86
......@@ -36,11 +36,11 @@ void SendTabToSelfClientService::SendTabToSelfModelLoaded() {
void SendTabToSelfClientService::EntriesAddedRemotely(
const std::vector<const SendTabToSelfEntry*>& new_entries) {
// TODO(tgupta):Figure out whether it is better to pass in one entry at
// a time or to pass all the entries at once.
for (std::unique_ptr<ReceivingUiHandler>& handler :
registry_->GetHandlers()) {
handler->DisplayNewEntry(new_entries[0]);
for (const SendTabToSelfEntry* entry : new_entries) {
for (std::unique_ptr<ReceivingUiHandler>& handler :
registry_->GetHandlers()) {
handler->DisplayNewEntry(entry);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment