Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Issue 2799603002: Process TeamDrive change in change list. (Closed)

Created:
3 years, 8 months ago by yamaguchi
Modified:
3 years, 8 months ago
Reviewers:
hashimoto
CC:
chromium-reviews, yamaguchi+watch_chromium.org, oka+watch_chromium.org, oshima+watch_chromium.org, fukino+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Process TeamDrive change in change list. Creates or updates local folder entries of each Team Drive when changelist is received, so that files under Team Drive can link it as their ancestor. Full fetch of Team Drives is not included in this change. TEST=unit_tests --gtest_filter=JobSchedulerTest.*:ResourceEntryConversionTest.*:ResourceMetadataTest.*:ChangeListProcessorTest.* TEST=google_apis_unittests --gtest_filter=DriveAPIParserTest.*:DriveApiUrlGeneratorTest.*:DriveApiRequestsTest.* BUG=none Review-Url: https://codereview.chromium.org/2799603002 Cr-Commit-Position: refs/heads/master@{#463597} Committed: https://chromium.googlesource.com/chromium/src/+/b1bbca356abfa6f8fdec3cd5815f18b164491a45

Patch Set 1 #

Patch Set 2 : Add test case for updating Team Drive name. #

Patch Set 3 : Handle add/replace in List Processor rather than in ResourceMetadata. #

Patch Set 4 : Remove unused "title" message field. #

Patch Set 5 : Add test for update. #

Total comments: 16

Patch Set 6 : Convert to ResourceEntry directly. Switch changeResource to normal class. #

Patch Set 7 : Convert TeamDriveResource to ResourceEntry directly. #

Patch Set 8 : Fix comment #

Patch Set 9 : Avoid crash when receiving TD deletion entry. #

Total comments: 14

Patch Set 10 : Fix the test for removing td. #

Patch Set 11 : Handle changes to Team Drive by the same path as files, including deletion. #

Total comments: 9

Patch Set 12 : Split ConvertTeamDriveResourceToResourceEntry. Remove unused code. #

Patch Set 13 : Stop using a virtual resource ID for /team_drives/. #

Patch Set 14 : Do not call SetParentLocalId when not needed. #

Total comments: 12

Patch Set 15 : . #

Patch Set 16 : reflect review comments #

Patch Set 17 : Remove unnecessary return value, as the TeamDriveResource conversion always succeeds. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -15 lines) Patch
M components/drive/change_list_processor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +74 lines, -3 lines 0 comments Download
M components/drive/chromeos/change_list_processor.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M components/drive/chromeos/change_list_processor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -2 lines 0 comments Download
M components/drive/file_system_core_util.h View 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M components/drive/file_system_core_util.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M components/drive/resource_entry_conversion.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -0 lines 0 comments Download
M components/drive/resource_entry_conversion.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +19 lines, -5 lines 0 comments Download
M components/drive/resource_entry_conversion_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +53 lines, -0 lines 0 comments Download
M google_apis/drive/drive_api_parser.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M google_apis/drive/drive_switches.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M google_apis/drive/drive_switches.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 62 (49 generated)
yamaguchi
ptal
3 years, 8 months ago (2017-04-06 01:12:18 UTC) #19
hashimoto
https://codereview.chromium.org/2799603002/diff/80001/components/drive/change_list_processor_unittest.cc File components/drive/change_list_processor_unittest.cc (right): https://codereview.chromium.org/2799603002/diff/80001/components/drive/change_list_processor_unittest.cc#newcode34 components/drive/change_list_processor_unittest.cc:34: const int64_t kSecondResourceListChangestamp = 4567; You can use kBaseResourceListChangestamp ...
3 years, 8 months ago (2017-04-06 10:23:37 UTC) #20
yamaguchi
Revised to convert TeamDrive changes to ResourceEntry directly. Would it be acceptable to add the ...
3 years, 8 months ago (2017-04-07 03:57:44 UTC) #33
hashimoto
https://codereview.chromium.org/2799603002/diff/160001/components/drive/change_list_processor_unittest.cc File components/drive/change_list_processor_unittest.cc (right): https://codereview.chromium.org/2799603002/diff/160001/components/drive/change_list_processor_unittest.cc#newcode717 components/drive/change_list_processor_unittest.cc:717: change_lists[0]->set_largest_changestamp(kBaseResourceListChangestamp + 3); This is not a ChangeList which ...
3 years, 8 months ago (2017-04-07 07:56:41 UTC) #34
yamaguchi
ptal Now I made it handle Team Drive removal as well. https://codereview.chromium.org/2799603002/diff/160001/components/drive/change_list_processor_unittest.cc File components/drive/change_list_processor_unittest.cc (right): ...
3 years, 8 months ago (2017-04-07 15:31:47 UTC) #37
hashimoto
https://codereview.chromium.org/2799603002/diff/160001/components/drive/chromeos/change_list_processor.cc File components/drive/chromeos/change_list_processor.cc (right): https://codereview.chromium.org/2799603002/diff/160001/components/drive/chromeos/change_list_processor.cc#newcode499 components/drive/chromeos/change_list_processor.cc:499: } else if (parent_resource_id == util::kDriveTeamDrivesDirVirtualResourceId) { On 2017/04/07 ...
3 years, 8 months ago (2017-04-10 11:01:24 UTC) #40
yamaguchi
https://codereview.chromium.org/2799603002/diff/160001/components/drive/chromeos/change_list_processor.cc File components/drive/chromeos/change_list_processor.cc (right): https://codereview.chromium.org/2799603002/diff/160001/components/drive/chromeos/change_list_processor.cc#newcode499 components/drive/chromeos/change_list_processor.cc:499: } else if (parent_resource_id == util::kDriveTeamDrivesDirVirtualResourceId) { On 2017/04/10 ...
3 years, 8 months ago (2017-04-11 07:08:07 UTC) #47
hashimoto
https://codereview.chromium.org/2799603002/diff/200001/components/drive/chromeos/change_list_processor.cc File components/drive/chromeos/change_list_processor.cc (right): https://codereview.chromium.org/2799603002/diff/200001/components/drive/chromeos/change_list_processor.cc#newcode311 components/drive/chromeos/change_list_processor.cc:311: // TODO(yamaguchi): Apply this defensive logic to root directories ...
3 years, 8 months ago (2017-04-11 07:55:14 UTC) #48
yamaguchi
https://codereview.chromium.org/2799603002/diff/260001/components/drive/chromeos/change_list_processor.cc File components/drive/chromeos/change_list_processor.cc (right): https://codereview.chromium.org/2799603002/diff/260001/components/drive/chromeos/change_list_processor.cc#newcode358 components/drive/chromeos/change_list_processor.cc:358: if (entry.parent_local_id().compare(util::kDriveTeamDrivesDirLocalId) != 0) { On 2017/04/11 07:55:14, hashimoto ...
3 years, 8 months ago (2017-04-11 10:11:41 UTC) #53
hashimoto
lgtm
3 years, 8 months ago (2017-04-11 10:22:38 UTC) #54
yamaguchi
On 2017/04/11 10:22:38, hashimoto wrote: > lgtm Thanks!
3 years, 8 months ago (2017-04-11 10:57:14 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2799603002/320001
3 years, 8 months ago (2017-04-11 10:57:38 UTC) #59
commit-bot: I haz the power
3 years, 8 months ago (2017-04-11 11:02:40 UTC) #62
Message was sent while issue was closed.
Committed patchset #17 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/b1bbca356abfa6f8fdec3cd5815f...

Powered by Google App Engine
This is Rietveld 408576698