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

Issue 313883003: Split IndexedDBFactory into virtual base + impl. (Closed)

Created:
6 years, 6 months ago by cmumford
Modified:
6 years, 5 months ago
CC:
alecflett, chromium-reviews, darin-cc_chromium.org, dgrogan, ericu+idb_chromium.org, jam, jsbell+idb_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Split IndexedDBFactory into virtual base + impl. This change makes IndexedDBFactory a virtual base class, and what was IndexedDBFactory is now IndexedDBFactoryImpl. This change will allow tests to create proper mock factories and not require them to instantiate the "real" factory (which often doesn't work) in the test. It will also take us one step closer to eliminating special cases in IDB's other classes where having a factory is optional (because tests don't create them). BUG=393974 R=ericu@chromium.org, jochen@chromium.org, jsbell@chromium.org, michaeln@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284161

Patch Set 1 #

Total comments: 2

Patch Set 2 : Added protected IndexedDBFactory constructor prototype. #

Total comments: 10

Patch Set 3 : Moved DISALLOW_COPY_AND_ASSIGN down and added comment #

Total comments: 4

Patch Set 4 : Removed extraneous method proto's: ReleaseBackingStore & CloseBackingStore #

Total comments: 2

Patch Set 5 : Moved indexed_db_factory_impl.h and relocated IsBackingStoreOpen. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -707 lines) Patch
M content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store_unittest.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/indexed_db/indexed_db_context_impl.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/indexed_db/indexed_db_factory.h View 1 2 3 4 4 chunks +35 lines, -80 lines 0 comments Download
D content/browser/indexed_db/indexed_db_factory.cc View 1 2 1 chunk +0 lines, -503 lines 0 comments Download
A + content/browser/indexed_db/indexed_db_factory_impl.h View 1 2 3 4 5 chunks +46 lines, -68 lines 0 comments Download
A + content/browser/indexed_db/indexed_db_factory_impl.cc View 1 2 19 chunks +45 lines, -42 lines 0 comments Download
M content/browser/indexed_db/indexed_db_factory_unittest.cc View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M content/browser/indexed_db/indexed_db_unittest.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
cmumford
6 years, 6 months ago (2014-06-04 18:53:02 UTC) #1
ericu
I'm missing the point here. All of your test objects now inherit from the impl, ...
6 years, 6 months ago (2014-06-08 19:04:14 UTC) #2
cmumford
On 2014/06/08 19:04:14, ericu wrote: > I'm missing the point here. All of your test ...
6 years, 6 months ago (2014-06-10 17:47:23 UTC) #3
ericu
OK, LGTM. It would be nice to have a standard mock/fake object for use in ...
6 years, 6 months ago (2014-06-11 00:04:23 UTC) #4
cmumford
On 2014/06/11 00:04:23, ericu wrote: > OK, LGTM. > > It would be nice to ...
6 years, 6 months ago (2014-06-11 18:18:48 UTC) #5
cmumford
On 2014/06/11 18:18:48, cmumford wrote: > On 2014/06/11 00:04:23, ericu wrote: > > OK, LGTM. ...
6 years, 6 months ago (2014-06-16 17:45:37 UTC) #6
cmumford
On 2014/06/16 17:45:37, cmumford wrote: > On 2014/06/11 18:18:48, cmumford wrote: > > On 2014/06/11 ...
6 years, 5 months ago (2014-07-14 19:40:23 UTC) #7
ericu
Still LGTM; I suspect you want to use Michael's other account, though.
6 years, 5 months ago (2014-07-14 20:23:41 UTC) #8
michaeln
lgtm2
6 years, 5 months ago (2014-07-15 02:00:46 UTC) #9
jochen (gone - plz use gerrit)
can you reference a bug in the CL description? https://codereview.chromium.org/313883003/diff/20001/content/browser/indexed_db/indexed_db_factory.h File content/browser/indexed_db/indexed_db_factory.h (right): https://codereview.chromium.org/313883003/diff/20001/content/browser/indexed_db/indexed_db_factory.h#newcode33 content/browser/indexed_db/indexed_db_factory.h:33: ...
6 years, 5 months ago (2014-07-15 11:44:46 UTC) #10
cmumford
Thanks for review jochen. I hunted the logs for a better description than "virtual base ...
6 years, 5 months ago (2014-07-15 16:11:48 UTC) #11
jochen (gone - plz use gerrit)
sorry for the back and forth. After rereading this CL and the follow-up CL, I'm ...
6 years, 5 months ago (2014-07-16 08:43:26 UTC) #12
cmumford
On 2014/07/16 08:43:26, jochen wrote: > sorry for the back and forth. > > After ...
6 years, 5 months ago (2014-07-16 16:44:08 UTC) #13
jochen (gone - plz use gerrit)
ok lgtm with nits addressed https://codereview.chromium.org/313883003/diff/40001/content/browser/indexed_db/indexed_db_factory.h File content/browser/indexed_db/indexed_db_factory.h (right): https://codereview.chromium.org/313883003/diff/40001/content/browser/indexed_db/indexed_db_factory.h#newcode105 content/browser/indexed_db/indexed_db_factory.h:105: void ReleaseBackingStore(const GURL& origin_url, ...
6 years, 5 months ago (2014-07-17 09:22:01 UTC) #14
cmumford
jsbell@ PTAL https://codereview.chromium.org/313883003/diff/40001/content/browser/indexed_db/indexed_db_factory.h File content/browser/indexed_db/indexed_db_factory.h (right): https://codereview.chromium.org/313883003/diff/40001/content/browser/indexed_db/indexed_db_factory.h#newcode105 content/browser/indexed_db/indexed_db_factory.h:105: void ReleaseBackingStore(const GURL& origin_url, bool immediate); On ...
6 years, 5 months ago (2014-07-17 18:19:46 UTC) #15
jsbell
lgtm https://codereview.chromium.org/313883003/diff/1/content/browser/indexed_db/indexed_db_factory.h File content/browser/indexed_db/indexed_db_factory.h (right): https://codereview.chromium.org/313883003/diff/1/content/browser/indexed_db/indexed_db_factory.h#newcode104 content/browser/indexed_db/indexed_db_factory.h:104: virtual bool IsBackingStoreOpen(const GURL& origin_url) const = 0; ...
6 years, 5 months ago (2014-07-17 18:45:46 UTC) #16
cmumford
https://codereview.chromium.org/313883003/diff/1/content/browser/indexed_db/indexed_db_factory.h File content/browser/indexed_db/indexed_db_factory.h (right): https://codereview.chromium.org/313883003/diff/1/content/browser/indexed_db/indexed_db_factory.h#newcode104 content/browser/indexed_db/indexed_db_factory.h:104: virtual bool IsBackingStoreOpen(const GURL& origin_url) const = 0; On ...
6 years, 5 months ago (2014-07-17 20:11:52 UTC) #17
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 5 months ago (2014-07-17 20:14:48 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/313883003/80001
6 years, 5 months ago (2014-07-17 20:18:53 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-18 00:27:05 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-18 00:50:53 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/172198)
6 years, 5 months ago (2014-07-18 00:50:54 UTC) #22
jsbell
6 years, 5 months ago (2014-07-18 18:21:48 UTC) #23
Message was sent while issue was closed.
Committed patchset #5 manually as r284161 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698