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

Issue 2048993002: Add an API to get total size of Drive cache including non-evictable ones. (Closed)

Created:
4 years, 6 months ago by fukino
Modified:
4 years, 6 months ago
Reviewers:
yawano
CC:
chromium-reviews, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add an API to get total size of Drive cache including non-evictable ones. The API is needed to show the total size of Drive cache in storage manager. This CL also changes the type of cache size to int64_t, to be consistent with functions under base/files. BUG=591958 TEST=manually Committed: https://crrev.com/6380c07c5be816838aa3e8027d32b1cc2404c9c9 Cr-Commit-Position: refs/heads/master@{#398805}

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : Check the metadata about existence of cache before calculating size. #

Patch Set 4 : Check is_present() #

Patch Set 5 : Remove an unnecessary parameter. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -15 lines) Patch
M chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/drive/chromeos/dummy_file_system.h View 1 chunk +2 lines, -1 line 0 comments Download
M components/drive/chromeos/fake_file_system.h View 1 chunk +2 lines, -2 lines 0 comments Download
M components/drive/chromeos/fake_file_system.cc View 1 chunk +5 lines, -1 line 0 comments Download
M components/drive/chromeos/file_cache.h View 1 chunk +4 lines, -1 line 0 comments Download
M components/drive/chromeos/file_cache.cc View 1 2 3 4 3 chunks +32 lines, -3 lines 0 comments Download
M components/drive/chromeos/file_system.h View 1 chunk +2 lines, -2 lines 0 comments Download
M components/drive/chromeos/file_system.cc View 1 2 chunks +14 lines, -2 lines 0 comments Download
M components/drive/chromeos/file_system_interface.h View 1 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
fukino
Awano-san, could you take a look?
4 years, 6 months ago (2016-06-08 11:32:08 UTC) #3
yawano
lgtm!
4 years, 6 months ago (2016-06-08 11:45:46 UTC) #4
yawano
Sorry. not lgtm. I'll add a comment.
4 years, 6 months ago (2016-06-08 11:48:20 UTC) #5
yawano
https://codereview.chromium.org/2048993002/diff/20001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/2048993002/diff/20001/components/drive/chromeos/file_cache.cc#newcode276 components/drive/chromeos/file_cache.cc:276: if (base::GetFileSize(GetCacheFilePath(it->GetID()), &cache_size)) { We should check the existence ...
4 years, 6 months ago (2016-06-08 11:53:45 UTC) #6
fukino
Thank you! Could you take another look? https://codereview.chromium.org/2048993002/diff/20001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/2048993002/diff/20001/components/drive/chromeos/file_cache.cc#newcode276 components/drive/chromeos/file_cache.cc:276: if (base::GetFileSize(GetCacheFilePath(it->GetID()), ...
4 years, 6 months ago (2016-06-09 04:36:47 UTC) #7
yawano
https://codereview.chromium.org/2048993002/diff/20001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/2048993002/diff/20001/components/drive/chromeos/file_cache.cc#newcode276 components/drive/chromeos/file_cache.cc:276: if (base::GetFileSize(GetCacheFilePath(it->GetID()), &cache_size)) { You also need to check ...
4 years, 6 months ago (2016-06-09 05:19:19 UTC) #8
fukino
Thanks! Updated. Is this how you think to fix? https://codereview.chromium.org/2048993002/diff/20001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/2048993002/diff/20001/components/drive/chromeos/file_cache.cc#newcode276 components/drive/chromeos/file_cache.cc:276: ...
4 years, 6 months ago (2016-06-09 06:38:22 UTC) #9
yawano
lgtm. Thank you!
4 years, 6 months ago (2016-06-09 06:45:31 UTC) #10
fukino
On 2016/06/09 06:45:31, yawano wrote: > lgtm. Thank you! Thank you!
4 years, 6 months ago (2016-06-09 06:46:30 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2048993002/80001
4 years, 6 months ago (2016-06-09 06:46:57 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-09 07:28:43 UTC) #15
commit-bot: I haz the power
4 years, 6 months ago (2016-06-09 07:30:21 UTC) #17
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/6380c07c5be816838aa3e8027d32b1cc2404c9c9
Cr-Commit-Position: refs/heads/master@{#398805}

Powered by Google App Engine
This is Rietveld 408576698