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

Issue 10854083: Remove parent* arg from GDataEntry ctor. (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

Remove parent* arg from GDataEntry ctor. * Remove static FromDocumentEntry from GDataEntry, GDataFile, GDataDirectory. Replace with InitFromDocumentEntry. * Move common code from GDataFile::InitFromDocumentEntry and GDataDirectory::InitFromDocumentEntry to GDataEntry::InitFromDocumentEntry. * Add GDataDirectoryService::FromDocumentEntry and use this everywhere. * Make ctors of GDataFile, GDataDirectory private, so these must be created by GDataDirectoryService's CreateGDataFile and CreateGDataDirectory. Make GDataEntry ctor protected. BUG=141494 TEST=unit tests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=151008

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -150 lines) Patch
M chrome/browser/chromeos/gdata/gdata_file_system.cc View 1 2 3 5 chunks +6 lines, -11 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.h View 1 2 3 7 chunks +29 lines, -28 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.cc View 1 2 3 12 chunks +76 lines, -98 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files_unittest.cc View 1 2 3 7 chunks +12 lines, -11 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
achuithb
Please review. Thank you!
8 years, 4 months ago (2012-08-09 23:50:17 UTC) #1
satorux1
LGTM. nice! https://chromiumcodereview.appspot.com/10854083/diff/10002/chrome/browser/chromeos/gdata/gdata_files.cc File chrome/browser/chromeos/gdata/gdata_files.cc (right): https://chromiumcodereview.appspot.com/10854083/diff/10002/chrome/browser/chromeos/gdata/gdata_files.cc#newcode536 chrome/browser/chromeos/gdata/gdata_files.cc:536: entry->InitFromDocumentEntry(doc); because InitFromDocumentEntry() is virtual, GDataDirectory::InitFromDocumentEntry is ...
8 years, 4 months ago (2012-08-10 00:45:27 UTC) #2
achuithb
8 years, 4 months ago (2012-08-10 08:42:00 UTC) #3
https://chromiumcodereview.appspot.com/10854083/diff/10002/chrome/browser/chr...
File chrome/browser/chromeos/gdata/gdata_files.cc (right):

https://chromiumcodereview.appspot.com/10854083/diff/10002/chrome/browser/chr...
chrome/browser/chromeos/gdata/gdata_files.cc:536:
entry->InitFromDocumentEntry(doc);
On 2012/08/10 00:45:27, satorux1 wrote:
> because InitFromDocumentEntry() is virtual,
> GDataDirectory::InitFromDocumentEntry is called if |entry| was created by
> CreateGDataFile() right?

Yup. The correct InitFromDocumentEntry is called due to dynamic/virtual
dispatch. GDataDirectory::InitFromDocumentEntry for CreateGDataDirectory and
GDataFile::InitFromDocumentEntry for CreateGDataFile.

Powered by Google App Engine
This is Rietveld 408576698