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

Issue 13933016: Refactor drive::ChangeListLoader. (Closed)

Created:
7 years, 8 months ago by kinaba
Modified:
7 years, 8 months ago
Reviewers:
hashimoto, satorux1
CC:
chromium-reviews, tfarina, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Refactor drive::ChangeListLoader. - Manage all callbacks passed to LoadIfNeeded in the pending queue, not in method argument. This eliminates the need of |refreshing_| variable, and simplify the logic when to wait and when to start loading. - Unify the place where loaded_ is set and OnInitialFeedLoaded() is called. - Unify directory changestamp checking logic into one place. Previously we had it twice. - Get local_changestamp exactly once in every path. Previously we had it twice in some cases, and zero in some case (see the BUG). BUG=231220 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194746

Patch Set 1 : Rough cut. #

Total comments: 8

Patch Set 2 : Review fix. #

Patch Set 3 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -296 lines) Patch
M chrome/browser/chromeos/drive/change_list_loader.h View 1 5 chunks +47 lines, -63 lines 0 comments Download
M chrome/browser/chromeos/drive/change_list_loader.cc View 1 17 chunks +130 lines, -232 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_file_system.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
kinaba
Could you take a look? I gave up fixing the BUG=231220 incrementally and decided to ...
7 years, 8 months ago (2013-04-17 05:33:53 UTC) #1
satorux1
Looks much simpler! LGTM with nits. https://codereview.chromium.org/13933016/diff/4001/chrome/browser/chromeos/drive/change_list_loader.h File chrome/browser/chromeos/drive/change_list_loader.h (right): https://codereview.chromium.org/13933016/diff/4001/chrome/browser/chromeos/drive/change_list_loader.h#newcode107 chrome/browser/chromeos/drive/change_list_loader.h:107: bool refreshing() const; ...
7 years, 8 months ago (2013-04-17 07:50:15 UTC) #2
hashimoto
lgtm https://codereview.chromium.org/13933016/diff/4001/chrome/browser/chromeos/drive/change_list_loader.cc File chrome/browser/chromeos/drive/change_list_loader.cc (right): https://codereview.chromium.org/13933016/diff/4001/chrome/browser/chromeos/drive/change_list_loader.cc#newcode43 chrome/browser/chromeos/drive/change_list_loader.cc:43: return iter != pending_load_callback_.end() && !iter->second.empty(); nit: Is ...
7 years, 8 months ago (2013-04-17 08:15:36 UTC) #3
kinaba
Thanks for the comments. I think we can add more simplification to the class. I'll ...
7 years, 8 months ago (2013-04-17 08:46:23 UTC) #4
hashimoto
lgtm
7 years, 8 months ago (2013-04-17 08:49:53 UTC) #5
kinaba
7 years, 8 months ago (2013-04-18 01:46:17 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 manually as r194746 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698