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

Issue 10876075: AddEntryToDirectory now takes a FilePath and scoped_ptr<DocumentEntry> (Closed)

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

Description

AddEntryToDirectory now takes a FilePath and scoped_ptr<DocumentEntry> * DriveResourceMetadata::AddEntryToDirectory now takes a FilePath and scoped_ptr<DocumentEntry>. * DriveFileSystem::AddUploadedParams now take a directory FilePath and a scoped_ptr<DocumentEntry>. * Anon helper function PostError in drive_resource_metadata.cc posts an async callback error. * DriveFileSystem's OnCreateDirectoryCompleted renamed to AddNewDirectory. The old synchronous AddNewDirectory is gone, replaced by a call to DriveResourceMetadata::AddEntryToDirectory, continuing with DriveFileSystem::ContinueCreateDirectory. * DriveFileSystem's CreateDirectoryParams has moved to the header file so AddNewDirectory may be called by the unit test. * DriveFileSystem's RenameEntryLocally, RenameAfterGetEntryInfo and NotifyAndRunFileMoveCallback now require a non-null callback. * AddUploadedFileToCache calls OnDirectoryChanged directly instead of the indirection through NotifyAndRunFileMoveCallback. Also additional DCHECKs in AddUploadedFileToCache. * callback_runner no longer necessary in AddUploadedFileOnUIThread. * entry replaced with doc_entry everywhere to avoid confusion with GDataEntry. * virtual_dir_path replaced with directory_path everywhere for consistency. * delete FindEntryCallback, which is no longer used. BUG=142048 TEST=unit tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=153582

Patch Set 1 #

Patch Set 2 : fix test #

Patch Set 3 : minor #

Patch Set 4 : delete FindEntryCallback #

Total comments: 5

Patch Set 5 : hashimoto feedback #

Total comments: 5

Patch Set 6 : satorux feedback #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -176 lines) Patch
M chrome/browser/chromeos/gdata/drive_file_system.h View 1 2 3 4 5 6 7 chunks +32 lines, -15 lines 0 comments Download
M chrome/browser/chromeos/gdata/drive_file_system.cc View 1 2 3 4 5 6 16 chunks +64 lines, -138 lines 0 comments Download
M chrome/browser/chromeos/gdata/drive_file_system_interface.h View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/gdata/drive_file_system_unittest.cc View 1 2 3 4 5 6 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/gdata/drive_resource_metadata.h View 1 2 3 4 5 6 2 chunks +4 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/gdata/drive_resource_metadata.cc View 1 2 3 4 5 6 2 chunks +32 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
achuithb
Please review, Ryo-san and Satoru-san. Thank you!
8 years, 4 months ago (2012-08-26 04:29:14 UTC) #1
hashimoto
http://codereview.chromium.org/10876075/diff/3004/chrome/browser/chromeos/gdata/drive_file_system.h File chrome/browser/chromeos/gdata/drive_file_system.h (right): http://codereview.chromium.org/10876075/diff/3004/chrome/browser/chromeos/gdata/drive_file_system.h#newcode168 chrome/browser/chromeos/gdata/drive_file_system.h:168: struct CreateDirectoryParams { Hmm, I'd like to keep this ...
8 years, 3 months ago (2012-08-27 20:36:41 UTC) #2
achuithb
http://codereview.chromium.org/10876075/diff/3004/chrome/browser/chromeos/gdata/drive_resource_metadata.cc File chrome/browser/chromeos/gdata/drive_resource_metadata.cc (right): http://codereview.chromium.org/10876075/diff/3004/chrome/browser/chromeos/gdata/drive_resource_metadata.cc#newcode45 chrome/browser/chromeos/gdata/drive_resource_metadata.cc:45: void PostError(const FileMoveCallback& callback, DriveFileError error) { On 2012/08/27 ...
8 years, 3 months ago (2012-08-27 21:20:34 UTC) #3
achuithb
PTAL
8 years, 3 months ago (2012-08-27 21:33:04 UTC) #4
hashimoto
lgtm
8 years, 3 months ago (2012-08-27 22:21:00 UTC) #5
satorux1
I like this patch. LGTM with nits. http://codereview.chromium.org/10876075/diff/13001/chrome/browser/chromeos/gdata/drive_file_system.cc File chrome/browser/chromeos/gdata/drive_file_system.cc (right): http://codereview.chromium.org/10876075/diff/13001/chrome/browser/chromeos/gdata/drive_file_system.cc#newcode3240 chrome/browser/chromeos/gdata/drive_file_system.cc:3240: } // ...
8 years, 3 months ago (2012-08-27 22:45:56 UTC) #6
achuithb
8 years, 3 months ago (2012-08-27 23:10:03 UTC) #7
Thanks for the reviews, Ryo-san and Satoru-san!

http://codereview.chromium.org/10876075/diff/13001/chrome/browser/chromeos/gd...
File chrome/browser/chromeos/gdata/drive_file_system_unittest.cc (right):

http://codereview.chromium.org/10876075/diff/13001/chrome/browser/chromeos/gd...
chrome/browser/chromeos/gdata/drive_file_system_unittest.cc:328: directory_path,
directory_path, false, false,
On 2012/08/27 22:45:57, satorux1 wrote:
> align parameters vertically? please also add comments to the false false as
> these are cryptic.

Done.

http://codereview.chromium.org/10876075/diff/13001/chrome/browser/chromeos/gd...
File chrome/browser/chromeos/gdata/drive_resource_metadata.cc (right):

http://codereview.chromium.org/10876075/diff/13001/chrome/browser/chromeos/gd...
chrome/browser/chromeos/gdata/drive_resource_metadata.cc:31: void
PostError(const FileMoveCallback& callback, DriveFileError error) {
On 2012/08/27 22:45:57, satorux1 wrote:
> function comment missing. this seems to be used to run a callback with an
error
> code asynchronously.

Done.

Powered by Google App Engine
This is Rietveld 408576698