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

Issue 14292002: drive: Minor cleanup around ChangeListLoader::LoadFromServerIfNeeded() (Closed)

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

Description

drive: Minor cleanup around ChangeListLoader::LoadFromServerIfNeeded() Add ChangeListLoader::CheckForUpdates() Make ChangeListLoader::LoadFromServerIfNeeded() private. BUG=193417 TEST=Open Drive in Files.app; Ctrl-click-on the gear menu and select 'Reload'. Confirm that the files appear shortly. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194496

Patch Set 1 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -15 lines) Patch
M chrome/browser/chromeos/drive/change_list_loader.h View 2 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/drive/change_list_loader.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_file_system.cc View 2 chunks +3 lines, -7 lines 1 comment Download
M chrome/browser/chromeos/drive/drive_file_system_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
satorux1
7 years, 8 months ago (2013-04-16 08:12:35 UTC) #1
kinaba
lgtm. I need this one to land for cleanly fixing https://code.google.com/p/chromium/issues/detail?id=231220.
7 years, 8 months ago (2013-04-16 08:14:45 UTC) #2
kinaba
Still lgtm for the current patch because it is broken already, but added one comment. ...
7 years, 8 months ago (2013-04-16 08:54:28 UTC) #3
satorux1
On 2013/04/16 08:54:28, kinaba wrote: > Still lgtm for the current patch because it is ...
7 years, 8 months ago (2013-04-17 00:14:23 UTC) #4
satorux1
Committed patchset #1 manually as r194496 (presubmit successful).
7 years, 8 months ago (2013-04-17 00:20:43 UTC) #5
kinaba
On 2013/04/17 00:14:23, satorux1 wrote: > > But it is actually already broken already, since ...
7 years, 8 months ago (2013-04-17 00:26:47 UTC) #6
satorux1
On 2013/04/17 00:26:47, kinaba wrote: > On 2013/04/17 00:14:23, satorux1 wrote: > > > But ...
7 years, 8 months ago (2013-04-17 00:36:31 UTC) #7
kinaba
7 years, 8 months ago (2013-04-18 00:55:14 UTC) #8
Message was sent while issue was closed.
On 2013/04/17 00:36:31, satorux1 wrote:
> On 2013/04/17 00:26:47, kinaba wrote:
> > On 2013/04/17 00:14:23, satorux1 wrote:
> > > > But it is actually already broken already, since
> > > > LoadFromServerIfNeeded automatically respects the cache
> > > > timestamp (after we switched to level DB).
> > > 
> > > Could you explain a bit more?
> > 
> > Normal loading process: LoadIfNeeded = (LoadFromCache, then
> > LoadFromServerIfNeeded).
> > "Reload" case: just do LoadFromServerIfNeeded.
> > 
> > When we used protobuffer for the cache, skipping LoadFromCache effectively
> > ignored the cached metadata, and triggered full feed fetching.
> > 
> > Now since we have switched to levelDB, LoadFromCache() is no-op (it's even
> > removed) because there is nothing to load to memory; db access is
disk-based.
> > 
> > So, from the point of view how metadata is loaded, LoadIfNeeded and
> > LoadFromServerIfNeeded is doing the same thing now. (there's a difference
> > in when callbacks are invoked, etc, though.)
> 
> I see. Thanks!

Ah, this was actually no problem.
We've had a code to explicitly blow out cached metadata in the reloading case.

void DriveFileSystem::Reload() {
  resource_metadata_->Reset(base::Bind(&DriveFileSystem::ReloadAfterReset,
                                       weak_ptr_factory_.GetWeakPtr()));
}

So there's nothing to worry. Ignore my last comments.

Powered by Google App Engine
This is Rietveld 408576698