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

Issue 10800092: Database support for GDataDirectoryService. (Closed)

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

Database support for GDataDirectoryService. * Add methods InitFromDB and SaveToDB to GDataDirectoryService, along with other helper methods to save/load the directory service from level db instead of from a proto file. * Add a wrapper class GDataDirectoryServiceDB to hold the level db, with methods Create, Save, Read, Truncate, etc. This object lives on the blocking thread. * Add CreateDBParams to facilitate creation of GDataDirectoryServiceDB on the blocking thread. * Add GDataDirectoryService::FromProtoString to create a GDataEntry from a string saved in the db. * Add unit tests for the db methods. * Move LoadRootFeedParams to gdata_params. Move typedefs before struct definitions. * Add a timer to measure the time to restore the filesystem from db or proto. For hugefileman, it's 3000 msec for db, and 2500 for proto, with debug code on a z600. Measurements on device TBD. BUG=127856 TEST=unit tests, manual tests with hugefileman. TBR=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=150022

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 9

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Total comments: 36

Patch Set 22 : satorux feedback #

Patch Set 23 : use ScopedClosureRunner #

Patch Set 24 : add missing file #

Patch Set 25 : rebase #

Patch Set 26 : minor #

Total comments: 33

Patch Set 27 : more satorux review feedback #

Patch Set 28 : nits #

Total comments: 8

Patch Set 29 : rebase + satorux feedback #

Total comments: 6

Patch Set 30 : #

Total comments: 4

Patch Set 31 : another error fix #

Patch Set 32 : oops #

Patch Set 33 : change callback of InitFromDB #

Patch Set 34 : comments #

Total comments: 4

Patch Set 35 : more fixes #

Patch Set 36 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+720 lines, -103 lines) Patch
M chrome/browser/chromeos/gdata/gdata_file_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 3 chunks +8 lines, -7 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 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 12 chunks +62 lines, -51 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 4 chunks +40 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 5 chunks +337 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 2 chunks +195 lines, -1 line 0 comments Download
M chrome/browser/chromeos/gdata/gdata_params.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 2 chunks +60 lines, -40 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_params.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
achuithb
This CL is not ready. I need to write unit tests to make sure this ...
8 years, 5 months ago (2012-07-24 08:23:02 UTC) #1
hashimoto
http://codereview.chromium.org/10800092/diff/8009/chrome/browser/chromeos/gdata/gdata_file_system.h File chrome/browser/chromeos/gdata/gdata_file_system.h (right): http://codereview.chromium.org/10800092/diff/8009/chrome/browser/chromeos/gdata/gdata_file_system.h#newcode45 chrome/browser/chromeos/gdata/gdata_file_system.h:45: GDataDirectoryService* directory_service, Are you going to inject a mock ...
8 years, 5 months ago (2012-07-24 08:41:51 UTC) #2
satorux1
The loading/saving seems to be much more expensive with the DB. Please do some benchmark ...
8 years, 5 months ago (2012-07-24 16:30:33 UTC) #3
achuithb
Satoru-san, please take a look at this CL again. I can close this CL and ...
8 years, 4 months ago (2012-08-02 02:25:19 UTC) #4
achuithb
On 2012/08/02 02:25:19, achuith.bhandarkar wrote: > Satoru-san, please take a look at this CL again. ...
8 years, 4 months ago (2012-08-02 09:32:22 UTC) #5
satorux1
http://codereview.chromium.org/10800092/diff/21008/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): http://codereview.chromium.org/10800092/diff/21008/chrome/browser/about_flags.cc#newcode819 chrome/browser/about_flags.cc:819: }, It'd be nicer to create a separate patch ...
8 years, 4 months ago (2012-08-02 17:24:03 UTC) #6
achuithb
Thanks for the detailed feedback! Please diff against patch 21. http://codereview.chromium.org/10800092/diff/21008/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): http://codereview.chromium.org/10800092/diff/21008/chrome/browser/about_flags.cc#newcode819 ...
8 years, 4 months ago (2012-08-02 20:26:25 UTC) #7
achuithb
I'm going to need to rebase as well, but I'll do it after you're done ...
8 years, 4 months ago (2012-08-02 20:29:25 UTC) #8
achuithb
I've rebased.
8 years, 4 months ago (2012-08-02 21:53:02 UTC) #9
hashimoto
http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode3000 chrome/browser/chromeos/gdata/gdata_file_system.cc:3000: nit: Remove this line. http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_files.cc File chrome/browser/chromeos/gdata/gdata_files.cc (right): http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_files.cc#newcode1088 ...
8 years, 4 months ago (2012-08-03 05:17:06 UTC) #10
satorux1
http://codereview.chromium.org/10800092/diff/21032/chrome/common/chrome_switches.h File chrome/common/chrome_switches.h (right): http://codereview.chromium.org/10800092/diff/21032/chrome/common/chrome_switches.h#newcode375 chrome/common/chrome_switches.h:375: extern const char kUseLevelDBForGData[]; You might want to move ...
8 years, 4 months ago (2012-08-03 05:44:44 UTC) #11
satorux1
http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_files.cc File chrome/browser/chromeos/gdata/gdata_files.cc (right): http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_files.cc#newcode449 chrome/browser/chromeos/gdata/gdata_files.cc:449: class GDataDirectoryServiceDB { From this name, I originally thought ...
8 years, 4 months ago (2012-08-03 06:32:49 UTC) #12
achuithb
Thanks for the comments! PTAL. I've reworked the InitResourceMap logic to first do a version ...
8 years, 4 months ago (2012-08-03 19:15:59 UTC) #13
satorux1
almost there! http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_files.cc File chrome/browser/chromeos/gdata/gdata_files.cc (right): http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_files.cc#newcode1090 chrome/browser/chromeos/gdata/gdata_files.cc:1090: if (entry_proto.file_info().is_directory()) { On 2012/08/03 19:15:59, achuith.bhandarkar ...
8 years, 4 months ago (2012-08-03 20:19:15 UTC) #14
achuithb
Apologize for the rebase, but the diffs should be easy to see. http://codereview.chromium.org/10800092/diff/21032/chrome/browser/chromeos/gdata/gdata_params.h File chrome/browser/chromeos/gdata/gdata_params.h ...
8 years, 4 months ago (2012-08-03 21:41:04 UTC) #15
achuithb
PTAL!
8 years, 4 months ago (2012-08-03 21:41:16 UTC) #16
satorux1
LGTM with nits. You'll need approval for chrome_siwtches.h from someone else. http://codereview.chromium.org/10800092/diff/27019/chrome/browser/chromeos/gdata/gdata_files_unittest.cc File chrome/browser/chromeos/gdata/gdata_files_unittest.cc (right): ...
8 years, 4 months ago (2012-08-03 21:45:54 UTC) #17
achuithb
PTAL! http://codereview.chromium.org/10800092/diff/27019/chrome/browser/chromeos/gdata/gdata_files_unittest.cc File chrome/browser/chromeos/gdata/gdata_files_unittest.cc (right): http://codereview.chromium.org/10800092/diff/27019/chrome/browser/chromeos/gdata/gdata_files_unittest.cc#newcode439 chrome/browser/chromeos/gdata/gdata_files_unittest.cc:439: GDataFileError error; On 2012/08/03 21:45:54, satorux1 wrote: > ...
8 years, 4 months ago (2012-08-03 22:05:34 UTC) #18
satorux1
http://codereview.chromium.org/10800092/diff/35001/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10800092/diff/35001/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2878 chrome/browser/chromeos/gdata/gdata_file_system.cc:2878: &params->load_error, base::Bind( I think I was confused about this ...
8 years, 4 months ago (2012-08-03 22:17:26 UTC) #19
achuithb
http://codereview.chromium.org/10800092/diff/35001/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10800092/diff/35001/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2878 chrome/browser/chromeos/gdata/gdata_file_system.cc:2878: &params->load_error, base::Bind( On 2012/08/03 22:17:26, satorux1 wrote: > I ...
8 years, 4 months ago (2012-08-03 22:25:58 UTC) #20
satorux1
http://codereview.chromium.org/10800092/diff/35001/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): http://codereview.chromium.org/10800092/diff/35001/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode2878 chrome/browser/chromeos/gdata/gdata_file_system.cc:2878: &params->load_error, base::Bind( On 2012/08/03 22:25:58, achuith.bhandarkar wrote: > On ...
8 years, 4 months ago (2012-08-03 22:33:30 UTC) #21
achuithb
Ok, switched to using a different callback. Also added some function comments that I missed ...
8 years, 4 months ago (2012-08-03 23:27:35 UTC) #22
satorux1
LGTM with nits. Looks much better! Please submit shortly, so I can start creating a ...
8 years, 4 months ago (2012-08-04 00:00:38 UTC) #23
achuithb
Thanks for the review! http://codereview.chromium.org/10800092/diff/23063/chrome/browser/chromeos/gdata/gdata_files_unittest.cc File chrome/browser/chromeos/gdata/gdata_files_unittest.cc (right): http://codereview.chromium.org/10800092/diff/23063/chrome/browser/chromeos/gdata/gdata_files_unittest.cc#newcode452 chrome/browser/chromeos/gdata/gdata_files_unittest.cc:452: AppendASCII("meta").AppendASCII("resource_metadata.db")); On 2012/08/04 00:00:38, satorux1 ...
8 years, 4 months ago (2012-08-04 00:24:11 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/10800092/35011
8 years, 4 months ago (2012-08-04 03:11:54 UTC) #25
commit-bot: I haz the power
Presubmit check for 10800092-35011 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-04 03:12:00 UTC) #26
achuithb
TBR Scott for chrome_switches changes. Please take a look when you get a chance.
8 years, 4 months ago (2012-08-04 03:14:07 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/10800092/35011
8 years, 4 months ago (2012-08-04 03:14:25 UTC) #28
commit-bot: I haz the power
Try job failure for 10800092-35011 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-04 03:37:54 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/10800092/35011
8 years, 4 months ago (2012-08-04 05:48:25 UTC) #30
commit-bot: I haz the power
Try job failure for 10800092-35011 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-04 06:06:39 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/10800092/35011
8 years, 4 months ago (2012-08-04 06:08:17 UTC) #32
commit-bot: I haz the power
Try job failure for 10800092-35011 (retry) (retry) on win for step "compile" (clobber build). It's ...
8 years, 4 months ago (2012-08-04 06:35:12 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/10800092/35011
8 years, 4 months ago (2012-08-04 06:43:02 UTC) #34
commit-bot: I haz the power
Try job failure for 10800092-35011 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-04 07:04:45 UTC) #35
satorux1
8 years, 4 months ago (2012-08-04 07:32:58 UTC) #36
submitted on behalf as CQ was failing forever for an unrelated error in win bot.

Powered by Google App Engine
This is Rietveld 408576698