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

Issue 10116044: gdata: Support mounting archive files in GData cache. (Closed)

Created:
8 years, 8 months ago by hshi
Modified:
8 years, 8 months ago
Reviewers:
satorux1, tbarzic, kuan
CC:
chromium-reviews, achuith+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

gdata: Support mounting archive files in GData cache. Handle the archive file to be mounted like a dirty file, e.g. by moving it to cache/persistent/<resource_id>.mounted, which prevents it from being modified, deleted, or moved. BUG=chromium-os:28678 TEST=Verify that mounting/unmounting archive files on GData works correctly. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=133571

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 7

Patch Set 3 : gdata: Support mounting archive files in GData cache. #

Patch Set 4 : gdata: Support mounting archive files in GData cache. #

Total comments: 2

Patch Set 5 : gdata: Support mounting archive files in GData cache. #

Patch Set 6 : gdata: Support mounting archive files in GData cache. #

Patch Set 7 : gdata: Support mounting archive files in GData cache. #

Total comments: 6

Patch Set 8 : gdata: Support mounting archive files in GData cache. #

Total comments: 13

Patch Set 9 : gdata: Support mounting archive files in GData cache. #

Total comments: 3

Patch Set 10 : gdata: Support mounting archive files in GData cache. #

Patch Set 11 : gdata: Support mounting archive files in GData cache. #

Total comments: 9

Patch Set 12 : gdata: Support mounting archive files in GData cache. #

Total comments: 16

Patch Set 13 : gdata: Support mounting archive files in GData cache. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+428 lines, -46 lines) Patch
M chrome/browser/chromeos/gdata/gdata_file_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +34 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +151 lines, -32 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +92 lines, -14 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.h View 1 2 3 4 5 6 5 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_util.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +69 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_util_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +42 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/mock_gdata_file_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (0 generated)
hshi
Hi, this CL is split from (https://chromiumcodereview.appspot.com/10008100) as suggested by Satoru. This CL addresses the ...
8 years, 8 months ago (2012-04-18 22:42:53 UTC) #1
kuan
i assume u've run the scenarios to mount and unmount. if yes, lgtm, with nits. ...
8 years, 8 months ago (2012-04-18 22:57:40 UTC) #2
hshi
http://codereview.chromium.org/10116044/diff/1/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/1/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode4134 chrome/browser/chromeos/gdata/gdata_file_system.cc:4134: << (entry ? (entry->IsDirty() ? "is dirty" : "is ...
8 years, 8 months ago (2012-04-18 23:04:38 UTC) #3
kuan
LGTM.
8 years, 8 months ago (2012-04-18 23:06:51 UTC) #4
satorux1
Can you write some unit tests? We usually write unit tests when adding new features. ...
8 years, 8 months ago (2012-04-18 23:29:03 UTC) #5
tbarzic
http://codereview.chromium.org/10116044/diff/5001/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/5001/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2080 chrome/browser/chromeos/gdata/gdata_file_system.cc:2080: if ((to_mount && entry->IsMounted()) || if (to_mount == entry->IsMounted()) ...
8 years, 8 months ago (2012-04-18 23:43:14 UTC) #6
hshi
On 2012/04/18 23:43:14, tbarzic wrote: > I would find > source_path = to_mount ? unmounted_path ...
8 years, 8 months ago (2012-04-18 23:54:15 UTC) #7
satorux1
Started tryjobs on behalf. FWIW, here's the command lines: % trychange.py -R codereview.chromium.org/10116044 --email hshi@chromium.org,satorux@chromium.org ...
8 years, 8 months ago (2012-04-19 00:21:57 UTC) #8
hshi
It appears that try build has failed with linux_chromeos_clang: need changes in mock file system ...
8 years, 8 months ago (2012-04-19 01:30:05 UTC) #9
kuan
i'm gonna have to hold back the lgtm, i apolgoize. i forgot 2 things: 1) ...
8 years, 8 months ago (2012-04-19 11:03:00 UTC) #10
hshi
For files already mounted when I start chrome, is there any way to recover the ...
8 years, 8 months ago (2012-04-19 17:35:49 UTC) #11
kuan
On 2012/04/19 17:35:49, hshi wrote: > For files already mounted when I start chrome, is ...
8 years, 8 months ago (2012-04-19 17:39:23 UTC) #12
kuan
i guess u're asking because u want to rename it back to .md5 extension on ...
8 years, 8 months ago (2012-04-19 17:41:21 UTC) #13
hshi
Here's an experiment I just did: force shut down a device with an archive already ...
8 years, 8 months ago (2012-04-19 18:05:41 UTC) #14
tbarzic
On 2012/04/19 18:05:41, hshi wrote: > Here's an experiment I just did: force shut down ...
8 years, 8 months ago (2012-04-19 18:14:22 UTC) #15
kuan
On 2012/04/19 18:14:22, tbarzic wrote: > On 2012/04/19 18:05:41, hshi wrote: > > Here's an ...
8 years, 8 months ago (2012-04-19 18:17:06 UTC) #16
Ben Chan
On 2012/04/19 18:17:06, kuan wrote: > On 2012/04/19 18:14:22, tbarzic wrote: > > On 2012/04/19 ...
8 years, 8 months ago (2012-04-19 18:28:53 UTC) #17
kuan
if we reset all mount points on logout/shutdown, then we probably need to unmount the ...
8 years, 8 months ago (2012-04-19 18:32:26 UTC) #18
hshi
Here's a cheap-and-quick solution suggested by Satoru: (1) When mounting, copy, instead of move, the ...
8 years, 8 months ago (2012-04-19 18:41:38 UTC) #19
hshi
Hi all, can you please review Patch Set #4 that implements Satoru's suggestion. I have ...
8 years, 8 months ago (2012-04-19 19:27:13 UTC) #20
kuan
http://codereview.chromium.org/10116044/diff/13003/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/13003/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2121 chrome/browser/chromeos/gdata/gdata_file_system.cc:2121: // When unmounting, move the file back to replace ...
8 years, 8 months ago (2012-04-19 21:01:09 UTC) #21
kuan
http://codereview.chromium.org/10116044/diff/13003/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/13003/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2073 chrome/browser/chromeos/gdata/gdata_file_system.cc:2073: if (md5.compare(kMountedArchiveFileExtension) == 0) { i'm wondering if u ...
8 years, 8 months ago (2012-04-19 21:02:15 UTC) #22
hshi
Sure I'll do that. I wasn't exactly sure std::string's operator == works as strcmp (or ...
8 years, 8 months ago (2012-04-19 21:06:13 UTC) #23
hshi
Hi, I have uploaded Patch Set #5 with the following changes: (1) Added unit test ...
8 years, 8 months ago (2012-04-19 23:04:58 UTC) #24
hshi
Sorry but there is one more issue. Please see changes in Patch Set #6. Issue ...
8 years, 8 months ago (2012-04-19 23:59:41 UTC) #25
hshi
Uploaded Patch Set #7 due to conflicts with TOT (GDataFileBase got renamed to GDataEntry last ...
8 years, 8 months ago (2012-04-20 18:48:31 UTC) #26
satorux1
http://codereview.chromium.org/10116044/diff/31003/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/31003/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2143 chrome/browser/chromeos/gdata/gdata_file_system.cc:2143: FilePath::StringType md5 = FilePath::StringType(); nit: the following is sufficient ...
8 years, 8 months ago (2012-04-20 20:11:25 UTC) #27
hshi
http://codereview.chromium.org/10116044/diff/31003/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/31003/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode4390 chrome/browser/chromeos/gdata/gdata_file_system.cc:4390: // suffix ".mounted" and moved to tmp. Move it ...
8 years, 8 months ago (2012-04-20 20:20:30 UTC) #28
hshi
Please review Patch Set #8. This refactors the ParseCacheFilePath code, thanks! On 2012/04/20 20:11:25, satorux1 ...
8 years, 8 months ago (2012-04-20 21:28:58 UTC) #29
satorux1
http://codereview.chromium.org/10116044/diff/31003/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/31003/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode4390 chrome/browser/chromeos/gdata/gdata_file_system.cc:4390: // suffix ".mounted" and moved to tmp. Move it ...
8 years, 8 months ago (2012-04-20 21:46:10 UTC) #30
hshi
http://codereview.chromium.org/10116044/diff/52002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc File chrome/browser/chromeos/gdata/gdata_util_unittest.cc (right): http://codereview.chromium.org/10116044/diff/52002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc#newcode62 chrome/browser/chromeos/gdata/gdata_util_unittest.cc:62: EXPECT_EQ(resource_id, "pdf:a1b2"); I also assumed "pdf:" is not part ...
8 years, 8 months ago (2012-04-20 22:04:51 UTC) #31
satorux1
http://codereview.chromium.org/10116044/diff/52002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc File chrome/browser/chromeos/gdata/gdata_util_unittest.cc (right): http://codereview.chromium.org/10116044/diff/52002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc#newcode62 chrome/browser/chromeos/gdata/gdata_util_unittest.cc:62: EXPECT_EQ(resource_id, "pdf:a1b2"); On 2012/04/20 22:04:51, hshi wrote: > I ...
8 years, 8 months ago (2012-04-20 22:27:20 UTC) #32
hshi
Please see Patch Set #9, thanks! On 2012/04/20 22:27:20, satorux1 wrote: > http://codereview.chromium.org/10116044/diff/52002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc > File ...
8 years, 8 months ago (2012-04-20 22:45:00 UTC) #33
satorux1
http://codereview.chromium.org/10116044/diff/52002/chrome/browser/chromeos/gdata/gdata_util.h File chrome/browser/chromeos/gdata/gdata_util.h (right): http://codereview.chromium.org/10116044/diff/52002/chrome/browser/chromeos/gdata/gdata_util.h#newcode70 chrome/browser/chromeos/gdata/gdata_util.h:70: std::string* extra_suffix); On 2012/04/20 21:46:10, satorux1 wrote: > i ...
8 years, 8 months ago (2012-04-20 23:05:39 UTC) #34
hshi
Hi Satoru, I uploaded Patch Set #10 to address the issues: rename "extra_suffix" to "extra_extension"; ...
8 years, 8 months ago (2012-04-20 23:28:05 UTC) #35
hshi
I'm afraid that this last patch set is failing the InitializeCache test. Problem is that ...
8 years, 8 months ago (2012-04-21 00:02:04 UTC) #36
satorux1
On 2012/04/21 00:02:04, hshi wrote: > I'm afraid that this last patch set is failing ...
8 years, 8 months ago (2012-04-21 00:12:49 UTC) #37
hshi
Kuan, are you ok with the assumption that resource_id will never contain the "." character? ...
8 years, 8 months ago (2012-04-21 00:16:38 UTC) #38
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
8 years, 8 months ago (2012-04-21 01:25:26 UTC) #39
hshi
Satoru, can I commit this change now? I have got all the try tests passing. ...
8 years, 8 months ago (2012-04-23 17:11:49 UTC) #40
tbarzic
http://codereview.chromium.org/10116044/diff/48029/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/48029/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2145 chrome/browser/chromeos/gdata/gdata_file_system.cc:2145: // The extra_extension can only be ".mounted" when unmounting. ...
8 years, 8 months ago (2012-04-23 18:03:22 UTC) #41
hshi
http://codereview.chromium.org/10116044/diff/48029/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10116044/diff/48029/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2145 chrome/browser/chromeos/gdata/gdata_file_system.cc:2145: // The extra_extension can only be ".mounted" when unmounting. ...
8 years, 8 months ago (2012-04-23 18:56:21 UTC) #42
hshi
http://codereview.chromium.org/10116044/diff/48029/chrome/browser/chromeos/gdata/gdata_file_system.h File chrome/browser/chromeos/gdata/gdata_file_system.h (right): http://codereview.chromium.org/10116044/diff/48029/chrome/browser/chromeos/gdata/gdata_file_system.h#newcode1214 chrome/browser/chromeos/gdata/gdata_file_system.h:1214: // - moves |source_path| to |dest_path| On 2012/04/23 18:03:22, ...
8 years, 8 months ago (2012-04-23 19:01:09 UTC) #43
tbarzic
btw, why am I suddenly the only reviewer here (adding back satorux and kuan) http://codereview.chromium.org/10116044/diff/48029/chrome/browser/chromeos/gdata/gdata_file_system.cc ...
8 years, 8 months ago (2012-04-23 19:02:52 UTC) #44
hshi
Please review Patch Set #12. This addresses the remaining comments and adds separate escape/unescape routines ...
8 years, 8 months ago (2012-04-23 20:45:47 UTC) #45
satorux1
http://codereview.chromium.org/10116044/diff/64002/chrome/browser/chromeos/gdata/gdata_util.cc File chrome/browser/chromeos/gdata/gdata_util.cc (right): http://codereview.chromium.org/10116044/diff/64002/chrome/browser/chromeos/gdata/gdata_util.cc#newcode272 chrome/browser/chromeos/gdata/gdata_util.cc:272: for (unsigned int i = 0; i < filename.length(); ...
8 years, 8 months ago (2012-04-23 21:02:25 UTC) #46
hshi
http://codereview.chromium.org/10116044/diff/64002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc File chrome/browser/chromeos/gdata/gdata_util_unittest.cc (right): http://codereview.chromium.org/10116044/diff/64002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc#newcode55 chrome/browser/chromeos/gdata/gdata_util_unittest.cc:55: std::string filename_unescaped("tmp:`~!@#$%^&*()-_=+[{|]}\\\\;\',<.>/?"); On 2012/04/23 21:02:25, satorux1 wrote: > const ...
8 years, 8 months ago (2012-04-23 21:47:36 UTC) #47
satorux1
http://codereview.chromium.org/10116044/diff/64002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc File chrome/browser/chromeos/gdata/gdata_util_unittest.cc (right): http://codereview.chromium.org/10116044/diff/64002/chrome/browser/chromeos/gdata/gdata_util_unittest.cc#newcode55 chrome/browser/chromeos/gdata/gdata_util_unittest.cc:55: std::string filename_unescaped("tmp:`~!@#$%^&*()-_=+[{|]}\\\\;\',<.>/?"); On 2012/04/23 21:47:37, hshi wrote: > On ...
8 years, 8 months ago (2012-04-23 21:49:07 UTC) #48
hshi
Please review Patch Set #13. Sorry that there are many bogus diffs because of merge ...
8 years, 8 months ago (2012-04-23 22:01:23 UTC) #49
satorux1
LGTM
8 years, 8 months ago (2012-04-23 22:40:01 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hshi@google.com/10116044/30016
8 years, 8 months ago (2012-04-23 22:41:46 UTC) #51
commit-bot: I haz the power
8 years, 8 months ago (2012-04-24 00:06:12 UTC) #52
Change committed as 133571

Powered by Google App Engine
This is Rietveld 408576698