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

Issue 10258004: Parent/child fixes. (Closed)

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

Description

Parent/child fixes. * Split GDataDirectory::children_ into child_files_ and child_directories_. This is necessary because we plan to offload child_files_ to GDataDB (but not child_directories_). * Add helpers FindChild and AddChild. Rename RemoveEntryFromChildrenList to RemoveChild. * Do not serialize GDataEntry::file_name, serialize GDataEntry::parent_resource_id * Use SetParent instead of set_parent, which also sets the parent_resource_id. * Implement GetFilePath using recursion instead for simplicity. * Move SetFileNameFromTitle to within AddEntry. * Move kGDataRootDirectory (gdata) to ctor of GDataRootDirectory. * Other minor cleanup. BUG=chromium-os:29232 TEST=compiles, unit tests pass. Everything looks ok in chrome file manager. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=134405

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Patch Set 3 : minor comment #

Total comments: 4

Patch Set 4 : #

Patch Set 5 : rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -195 lines) Patch
M chrome/browser/chromeos/gdata/gdata.proto View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/gdata/gdata_db_unittest.cc View 1 2 3 4 8 chunks +46 lines, -42 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system.cc View 1 2 3 4 4 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc View 1 2 3 4 2 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc View 1 2 3 4 5 chunks +14 lines, -13 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.h View 1 2 3 4 10 chunks +43 lines, -21 lines 2 comments Download
M chrome/browser/chromeos/gdata/gdata_files.cc View 1 2 3 4 17 chunks +133 lines, -104 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
achuithb
Please review
8 years, 8 months ago (2012-04-27 21:17:13 UTC) #1
achuithb
We need to distinguish between child files and child directories, so I've split them up. ...
8 years, 8 months ago (2012-04-27 21:19:16 UTC) #2
satorux1
Could you explain "We need to distinguish between child file"? and add it to the ...
8 years, 8 months ago (2012-04-27 21:35:41 UTC) #3
achuithb
I've added another comment to GDataFileSystem::RenameFileOnFilesystem (shouldn't it be RenameFileOnFileSystem?) http://codereview.chromium.org/10258004/diff/1/chrome/browser/chromeos/gdata/gdata.proto File chrome/browser/chromeos/gdata/gdata.proto (right): http://codereview.chromium.org/10258004/diff/1/chrome/browser/chromeos/gdata/gdata.proto#newcode28 ...
8 years, 8 months ago (2012-04-27 22:15:03 UTC) #4
satorux1
LGTM http://codereview.chromium.org/10258004/diff/1/chrome/browser/chromeos/gdata/gdata_files.h File chrome/browser/chromeos/gdata/gdata_files.h (right): http://codereview.chromium.org/10258004/diff/1/chrome/browser/chromeos/gdata/gdata_files.h#newcode101 chrome/browser/chromeos/gdata/gdata_files.h:101: void set_file_name(const FilePath::StringType& name) { file_name_ = name; ...
8 years, 8 months ago (2012-04-27 22:29:41 UTC) #5
achuithb
http://codereview.chromium.org/10258004/diff/11001/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10258004/diff/11001/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2557 chrome/browser/chromeos/gdata/gdata_file_system.cc:2557: // to file_name. On 2012/04/27 22:29:41, satorux1 wrote: > ...
8 years, 8 months ago (2012-04-27 22:43:22 UTC) #6
zel
lgtm http://codereview.chromium.org/10258004/diff/8005/chrome/browser/chromeos/gdata/gdata_files.h File chrome/browser/chromeos/gdata/gdata_files.h (right): http://codereview.chromium.org/10258004/diff/8005/chrome/browser/chromeos/gdata/gdata_files.h#newcode333 chrome/browser/chromeos/gdata/gdata_files.h:333: const GDataFileCollection& child_files() const { return child_files_; } ...
8 years, 8 months ago (2012-04-27 23:10:30 UTC) #7
achuithb
8 years, 7 months ago (2012-04-28 00:20:15 UTC) #8
Thanks for the reviews Zel and Satoru-san.

http://codereview.chromium.org/10258004/diff/8005/chrome/browser/chromeos/gda...
File chrome/browser/chromeos/gdata/gdata_files.h (right):

http://codereview.chromium.org/10258004/diff/8005/chrome/browser/chromeos/gda...
chrome/browser/chromeos/gdata/gdata_files.h:333: const GDataFileCollection&
child_files() const { return child_files_; }
On 2012/04/27 23:10:31, zel wrote:
> it would be great to provide an iterator that goes over both

Yup, we would hide the read from the database (as necessary) behind such an
iterator.

Powered by Google App Engine
This is Rietveld 408576698