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

Issue 10854199: ResourceId and unit test cleanup. (Closed)

Created:
8 years, 4 months ago by achuithb
Modified:
8 years, 4 months ago
Reviewers:
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

ResourceId and unit test cleanup. * GDataEntry must always be constructed with a valid directory_service ptr. Add a DCHECK for this, and remove runtime tests for null directory_service_ ptr in all methods. * RemoveEntryFromResourceMap takes resource_id instead of GDataEntry*. * RemoveEntryFromResourceMap ensures resource_id is non-empty and that an actual deletion occurs every time. * AddEntryToResourceMap has a DCHECK to guard against multiple additions, or addition of empty resource_id. * Remove accessors child_files() and child_directories() and make typedefs for GDataFileCollection and GDataDirectoryCollection private. * Move GetChildDirectoryPaths from gdata_wapi_feed_processor.cc anon namespace to GDataDirectory. * Fixes for unit tests that added entries with null resource ids, and duplicate resource ids. BUG=137725 TEST=unit tests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152151

Patch Set 1 #

Patch Set 2 : missing file #

Patch Set 3 : reverts #

Patch Set 4 : more unit test fixes #

Patch Set 5 : minor #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -74 lines) Patch
M chrome/browser/chromeos/gdata/gdata_directory_service.h View 1 1 chunk +1 line, -1 line 1 comment Download
M chrome/browser/chromeos/gdata/gdata_directory_service.cc View 1 2 3 4 4 chunks +13 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_directory_service_unittest.cc View 1 2 3 7 chunks +29 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc View 6 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.h View 1 2 5 chunks +10 lines, -11 lines 1 comment Download
M chrome/browser/chromeos/gdata/gdata_files.cc View 1 2 3 4 10 chunks +32 lines, -22 lines 2 comments Download
M chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.cc View 3 chunks +5 lines, -21 lines 0 comments Download
M chrome/test/data/chromeos/gdata/basic_feed.json View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/chromeos/gdata/directory_entry_atom2.json View 1 chunk +86 lines, -0 lines 0 comments Download
M chrome/test/data/chromeos/gdata/uploaded_document.json View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
achuithb
I was pursuing another CL when it became apparent that this cleanup patch was necessary. ...
8 years, 4 months ago (2012-08-17 11:06:17 UTC) #1
satorux1
LGTM with a nit. Nice work. http://codereview.chromium.org/10854199/diff/7014/chrome/browser/chromeos/gdata/gdata_directory_service.h File chrome/browser/chromeos/gdata/gdata_directory_service.h (right): http://codereview.chromium.org/10854199/diff/7014/chrome/browser/chromeos/gdata/gdata_directory_service.h#newcode184 chrome/browser/chromeos/gdata/gdata_directory_service.h:184: void RemoveEntryFromResourceMap(const std::string& ...
8 years, 4 months ago (2012-08-17 11:49:17 UTC) #2
achuithb
8 years, 4 months ago (2012-08-17 21:02:27 UTC) #3
Thanks for the review!

http://codereview.chromium.org/10854199/diff/7014/chrome/browser/chromeos/gda...
File chrome/browser/chromeos/gdata/gdata_files.cc (right):

http://codereview.chromium.org/10854199/diff/7014/chrome/browser/chromeos/gda...
chrome/browser/chromeos/gdata/gdata_files.cc:345: // Recursively extracts the
paths set of all sub-directories.
On 2012/08/17 11:49:17, satorux1 wrote:
> remove this comment?

Done.

Powered by Google App Engine
This is Rietveld 408576698