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

Issue 12744008: SyncFS: store disabled origins in DriveMetadataStore (Closed)

Created:
7 years, 9 months ago by nhiroki
Modified:
7 years, 9 months ago
Reviewers:
kinuko, calvinlo, tzik
CC:
chromium-reviews, tzik+watch_chromium.org, kinuko+watch
Visibility:
Public.

Description

SyncFS: store disabled origins in DriveMetadataStore Store disabled origins when extensions are disabled. Current implementation stores origins only for installed and enabled apps (i.e. batch sync origins and incremental sync origins). Therefore we cannot access files and metadata related to installed but disabled apps. This makes a difference between installing/uninstalling and enabling/disabling extensions. - register an origin when an extension is launched for the first time. - disable the origin when the extension is disabled (not unregister). - enable the origin when the extension is enabled. - unregister the origin when the extension is uninstalled. BUG=184742 TEST=unit_test TEST=manual test (launch, reload, restart, disable, enable and uninstall an app) NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189036

Patch Set 1 : fix #

Total comments: 11

Patch Set 2 : unit tests and review fix #

Total comments: 14

Patch Set 3 : review fix #

Patch Set 4 : rebase #

Total comments: 28

Patch Set 5 : review fix #

Total comments: 2

Patch Set 6 : review fix #

Total comments: 2

Patch Set 7 : review fix #

Patch Set 8 : fix #

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+593 lines, -135 lines) Patch
M chrome/browser/sync_file_system/drive_file_sync_service.h View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/sync_file_system/drive_file_sync_service.cc View 1 2 3 4 5 6 7 8 7 chunks +110 lines, -19 lines 0 comments Download
M chrome/browser/sync_file_system/drive_metadata_store.h View 1 2 3 4 5 6 7 8 6 chunks +27 lines, -8 lines 0 comments Download
M chrome/browser/sync_file_system/drive_metadata_store.cc View 1 2 3 4 5 6 7 8 23 chunks +204 lines, -25 lines 0 comments Download
M chrome/browser/sync_file_system/drive_metadata_store_unittest.cc View 1 2 3 4 5 6 7 8 11 chunks +138 lines, -49 lines 0 comments Download
M chrome/browser/sync_file_system/local_file_sync_service.cc View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/sync_file_system/mock_remote_file_sync_service.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync_file_system/remote_file_sync_service.h View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/sync_file_system/sync_file_system_service.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/sync_file_system/sync_file_system_service.cc View 1 2 3 4 3 chunks +87 lines, -28 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
nhiroki
I know this is still rough, but since I'm afraid I'm going the wrong way ...
7 years, 9 months ago (2013-03-14 09:10:57 UTC) #1
tzik
Looks good. https://codereview.chromium.org/12744008/diff/14001/chrome/browser/sync_file_system/drive_metadata_store.cc File chrome/browser/sync_file_system/drive_metadata_store.cc (right): https://codereview.chromium.org/12744008/diff/14001/chrome/browser/sync_file_system/drive_metadata_store.cc#newcode519 chrome/browser/sync_file_system/drive_metadata_store.cc:519: std::map<GURL, std::string>::iterator found; How about doing like ...
7 years, 9 months ago (2013-03-14 12:50:54 UTC) #2
calvinlo
I think this is fine for now. However I'd really be interested in cleaning this ...
7 years, 9 months ago (2013-03-15 03:37:48 UTC) #3
nhiroki
Updated, thanks! https://codereview.chromium.org/12744008/diff/14001/chrome/browser/sync_file_system/drive_metadata_store.cc File chrome/browser/sync_file_system/drive_metadata_store.cc (right): https://codereview.chromium.org/12744008/diff/14001/chrome/browser/sync_file_system/drive_metadata_store.cc#newcode111 chrome/browser/sync_file_system/drive_metadata_store.cc:111: SyncStatusCode UpdateEntry(const FileSystemURL& url, I wouldn't think ...
7 years, 9 months ago (2013-03-15 12:08:56 UTC) #4
nhiroki
Remaining tasks (just an implementation memo): - When an origin is disabled, drop MetadataStore entries ...
7 years, 9 months ago (2013-03-15 12:27:08 UTC) #5
calvinlo
LGTM
7 years, 9 months ago (2013-03-15 12:54:22 UTC) #6
kinuko
https://codereview.chromium.org/12744008/diff/14001/chrome/browser/sync_file_system/drive_metadata_store.h File chrome/browser/sync_file_system/drive_metadata_store.h (right): https://codereview.chromium.org/12744008/diff/14001/chrome/browser/sync_file_system/drive_metadata_store.h#newcode84 chrome/browser/sync_file_system/drive_metadata_store.h:84: bool IsDisabledSyncOrigin(const GURL& origin) const; On 2013/03/15 12:08:56, nhiroki ...
7 years, 9 months ago (2013-03-16 22:11:03 UTC) #7
kinuko
https://chromiumcodereview.appspot.com/12744008/diff/22001/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://chromiumcodereview.appspot.com/12744008/diff/22001/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode459 chrome/browser/sync_file_system/drive_file_sync_service.cc:459: origin_to_changes_map_.erase(found); I'm afraid I'm lost here... do we call ...
7 years, 9 months ago (2013-03-16 23:16:51 UTC) #8
nhiroki
Thank you for reviewing! Updated. I made sure that this works well in my local. ...
7 years, 9 months ago (2013-03-18 09:40:17 UTC) #9
kinuko
https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode431 chrome/browser/sync_file_system/drive_file_sync_service.cc:431: const SyncStatusCallback& callback) { I think we can likely ...
7 years, 9 months ago (2013-03-18 18:09:43 UTC) #10
nhiroki
Updated, thanks! https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode431 chrome/browser/sync_file_system/drive_file_sync_service.cc:431: const SyncStatusCallback& callback) { On 2013/03/18 18:09:43, ...
7 years, 9 months ago (2013-03-19 02:35:42 UTC) #11
kinuko
https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode1067 chrome/browser/sync_file_system/drive_file_sync_service.cc:1067: metadata_store_->IsOriginDisabled(origin)) { On 2013/03/19 02:35:42, nhiroki wrote: > On ...
7 years, 9 months ago (2013-03-19 02:44:44 UTC) #12
nhiroki
https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode1067 chrome/browser/sync_file_system/drive_file_sync_service.cc:1067: metadata_store_->IsOriginDisabled(origin)) { On 2013/03/19 02:44:44, kinuko wrote: > On ...
7 years, 9 months ago (2013-03-19 03:43:52 UTC) #13
kinuko
https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode1067 chrome/browser/sync_file_system/drive_file_sync_service.cc:1067: metadata_store_->IsOriginDisabled(origin)) { On 2013/03/19 03:43:52, nhiroki wrote: > On ...
7 years, 9 months ago (2013-03-19 03:51:39 UTC) #14
kinuko
ok, let me stamp this lgtm. (It's great if tzik@ could take another look too)
7 years, 9 months ago (2013-03-19 03:58:08 UTC) #15
kinuko
https://codereview.chromium.org/12744008/diff/50001/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/50001/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode470 chrome/browser/sync_file_system/drive_file_sync_service.cc:470: } nit: it may look nicer if we define ...
7 years, 9 months ago (2013-03-19 04:01:49 UTC) #16
nhiroki
Updated https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode1067 chrome/browser/sync_file_system/drive_file_sync_service.cc:1067: metadata_store_->IsOriginDisabled(origin)) { On 2013/03/19 03:51:39, kinuko wrote: > ...
7 years, 9 months ago (2013-03-19 08:47:38 UTC) #17
tzik
lgtm https://codereview.chromium.org/12744008/diff/55001/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/55001/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode956 chrome/browser/sync_file_system/drive_file_sync_service.cc:956: if (extension_service->GetInstalledExtension(extension_id) == NULL) { s/== NULL// ?
7 years, 9 months ago (2013-03-19 09:24:03 UTC) #18
nhiroki
Updated, thanks! https://codereview.chromium.org/12744008/diff/50001/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/50001/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode470 chrome/browser/sync_file_system/drive_file_sync_service.cc:470: } On 2013/03/19 04:01:49, kinuko wrote: > ...
7 years, 9 months ago (2013-03-19 09:36:13 UTC) #19
kinuko
https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc File chrome/browser/sync_file_system/drive_file_sync_service.cc (right): https://codereview.chromium.org/12744008/diff/43002/chrome/browser/sync_file_system/drive_file_sync_service.cc#newcode1067 chrome/browser/sync_file_system/drive_file_sync_service.cc:1067: metadata_store_->IsOriginDisabled(origin)) { On 2013/03/19 08:47:38, nhiroki wrote: > On ...
7 years, 9 months ago (2013-03-19 09:56:30 UTC) #20
nhiroki
On 2013/03/19 09:56:30, kinuko wrote: > > I meant I don't think we need to ...
7 years, 9 months ago (2013-03-19 11:03:29 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/12744008/47012
7 years, 9 months ago (2013-03-19 11:03:56 UTC) #22
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=94705
7 years, 9 months ago (2013-03-19 12:07:56 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/12744008/75002
7 years, 9 months ago (2013-03-19 12:59:09 UTC) #24
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) sync_integration_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=124315
7 years, 9 months ago (2013-03-19 15:55:19 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/12744008/75002
7 years, 9 months ago (2013-03-19 16:28:04 UTC) #26
commit-bot: I haz the power
7 years, 9 months ago (2013-03-19 16:29:47 UTC) #27
Message was sent while issue was closed.
Change committed as 189036

Powered by Google App Engine
This is Rietveld 408576698