|
|
Chromium Code Reviews|
Created:
4 years ago by fgorski Modified:
4 years ago Reviewers:
Pete Williamson CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dimich+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[Offline pages] Switching ChangeRequestsStateTask to use RequestQueueStore::GetRequestsByIds
* Small refactoring to ChangeRequestsStateTask to use a more efficient
method to query requests (which was not available at the time it was
originally created).
BUG=651238
Committed: https://crrev.com/aa20953bbe09465c66ac135f987b9f8bbb383e94
Cr-Commit-Position: refs/heads/master@{#436096}
Patch Set 1 #Patch Set 2 : Fixing a test #
Total comments: 7
Patch Set 3 : Addressing comments #Patch Set 4 : Adding a comment in test #Patch Set 5 : Fixing the comment #
Messages
Total messages: 29 (19 generated)
The CQ bit was checked by fgorski@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
fgorski@chromium.org changed reviewers: + petewil@chromium.org
PTAL
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by fgorski@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... File components/offline_pages/background/change_requests_state_task.cc (right): https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... components/offline_pages/background/change_requests_state_task.cc:60: // Look up the missing items. This comment is a bit misleading - It applies to the overall operation, but the for loop on the next line is actually removing the IDs that *were* found instead of looking up missing items. Maybe leave a blank line after the existing comment, and add the following comment above the for loop // If we found a request earlier, remove it from our list of IDs. That will make it easier on folks who read the comments in the future. https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... File components/offline_pages/background/change_requests_state_task_unittest.cc (right): https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... components/offline_pages/background/change_requests_state_task_unittest.cc:150: int index_id_1 = Why are you doing this? I found the code easier to understand before, is it now wrong because the algorithm returns things slightly differently? https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... components/offline_pages/background/change_requests_state_task_unittest.cc:200: ASSERT_EQ(2UL, last_result()->item_statuses.size()); Why the change from EXPECT to ASSERT?
The CQ bit was checked by fgorski@chromium.org to run a CQ dry run
PTAL https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... File components/offline_pages/background/change_requests_state_task.cc (right): https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... components/offline_pages/background/change_requests_state_task.cc:60: // Look up the missing items. On 2016/12/02 01:39:06, Pete Williamson wrote: > This comment is a bit misleading - It applies to the overall operation, but the > for loop on the next line is actually removing the IDs that *were* found instead > of looking up missing items. Maybe leave a blank line after the existing > comment, and add the following comment above the for loop > // If we found a request earlier, remove it from our list of IDs. > > That will make it easier on folks who read the comments in the future. Done. https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... File components/offline_pages/background/change_requests_state_task_unittest.cc (right): https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... components/offline_pages/background/change_requests_state_task_unittest.cc:150: int index_id_1 = On 2016/12/02 01:39:06, Pete Williamson wrote: > Why are you doing this? I found the code easier to understand before, is it now > wrong because the algorithm returns things slightly differently? Yes, we did make some changes, mainly the fact that the dictionary might be returning values in a different order on different platforms... hence this change. https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... components/offline_pages/background/change_requests_state_task_unittest.cc:200: ASSERT_EQ(2UL, last_result()->item_statuses.size()); On 2016/12/02 01:39:06, Pete Williamson wrote: > Why the change from EXPECT to ASSERT? When we have too many, I don't have to look at the error message too long to work out what the problem is., when we have too little, there will be a crash later (when accessing the first missing index), and I prefer to crash early.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by fgorski@chromium.org to run a CQ dry run
Added the comment we discussed.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... File components/offline_pages/background/change_requests_state_task.cc (right): https://codereview.chromium.org/2541423002/diff/20001/components/offline_page... components/offline_pages/background/change_requests_state_task.cc:60: // Look up the missing items. On 2016/12/02 22:32:02, fgorski wrote: > On 2016/12/02 01:39:06, Pete Williamson wrote: > > This comment is a bit misleading - It applies to the overall operation, but > the > > for loop on the next line is actually removing the IDs that *were* found > instead > > of looking up missing items. Maybe leave a blank line after the existing > > comment, and add the following comment above the for loop > > // If we found a request earlier, remove it from our list of IDs. > > > > That will make it easier on folks who read the comments in the future. > > Done. Actually, I meant to add a blank line after "// Look up the missing items." and after that blank line, to have this comment: // If we found a request earlier, remove it from our list of IDs.
The CQ bit was checked by fgorski@chromium.org to run a CQ dry run
PTAL
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
The CQ bit was unchecked by fgorski@chromium.org
The CQ bit was checked by fgorski@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 80001, "attempt_start_ts": 1480721505082650,
"parent_rev": "1f7412c3f1f12e078daccea3b6ff126c660a9af9", "commit_rev":
"81046c75a584081bff9d5f3188650fee99ddff1c"}
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== [Offline pages] Switching ChangeRequestsStateTask to use RequestQueueStore::GetRequestsByIds * Small refactoring to ChangeRequestsStateTask to use a more efficient method to query requests (which was not available at the time it was originally created). BUG=651238 ========== to ========== [Offline pages] Switching ChangeRequestsStateTask to use RequestQueueStore::GetRequestsByIds * Small refactoring to ChangeRequestsStateTask to use a more efficient method to query requests (which was not available at the time it was originally created). BUG=651238 Committed: https://crrev.com/aa20953bbe09465c66ac135f987b9f8bbb383e94 Cr-Commit-Position: refs/heads/master@{#436096} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/aa20953bbe09465c66ac135f987b9f8bbb383e94 Cr-Commit-Position: refs/heads/master@{#436096} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
