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

Issue 671873004: Migrates legacy packaged app data when it's upgraded to a platform app (Closed)

Created:
6 years, 1 month ago by ryanackley
Modified:
5 years, 10 months ago
Reviewers:
benwells, jam, jsbell, cmumford, tzik
CC:
chromium-reviews, extensions-reviews_chromium.org, dgrogan, jam, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, jsbell+idb_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Migrates legacy packaged app data when it's upgraded to a platform app Currently, data stored by a legacy packaged app in the HTML5 filesystem and IndexedDB is lost when it gets migrated to the new type of Chrome App (internally referred to as "platform apps"). This is because Chrome stores extension and legacy packaged app data in the general storage partition and it stores platform app data in a it's own isolated storage partition. When a legacy packaged app is upgraded to the new type of app, a new isolated storage partition is created but the data gets left behind in the general storage partition. This change fixes this by performing a migration of the data to the new storage partition at the time of the upgrade. It only migrates IndexedDB and HTML5 filesystem because these are the only permanent data storage options available to platform apps. Platform apps are prohibited from using DOMStorage and WebSQL. Data stored by chrome.storage APIs is separate from the storage partitions. BUG=302577 Committed: https://crrev.com/48bedbd2773df847e5dbf1c01fb409da4636d542 Cr-Commit-Position: refs/heads/master@{#313394}

Patch Set 1 #

Patch Set 2 : Fixes unit tests #

Patch Set 3 : Rebase on ToT #

Patch Set 4 : Empty patch trying to unwedge try server #

Total comments: 12

Patch Set 5 : Changes based on review comments #

Total comments: 9

Patch Set 6 : More changes for review #

Total comments: 1

Patch Set 7 : Address review comments and adds tests #

Total comments: 7

Patch Set 8 : Changes based on review comments #

Patch Set 9 : Rebase #

Total comments: 7

Patch Set 10 : Addresses review comments #

Total comments: 16

Patch Set 11 : Addresses cmumford comments #

Total comments: 7

Patch Set 12 : Minor changes #

Patch Set 13 : incorporate tzik's feedback #

Patch Set 14 : Puts back some code that was mistakenly deleted in a merge #

Patch Set 15 : rebase #

Patch Set 16 : trybot complaints #

Unified diffs Side-by-side diffs Delta from patch set Stats (+608 lines, -1 line) Patch
M AUTHORS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/extensions/app_data_migrator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/extensions/app_data_migrator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +178 lines, -0 lines 0 comments Download
A chrome/browser/extensions/app_data_migrator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +273 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +13 lines, -1 line 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_context_impl.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_context_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +33 lines, -0 lines 0 comments Download
M content/public/browser/indexed_db_context.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M storage/browser/fileapi/obfuscated_file_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M storage/browser/fileapi/obfuscated_file_util.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +14 lines, -0 lines 0 comments Download
M storage/browser/fileapi/sandbox_file_system_backend_delegate.h View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M storage/browser/fileapi/sandbox_file_system_backend_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +28 lines, -0 lines 0 comments Download

Messages

Total messages: 67 (12 generated)
dgrogan
Drive by comments on patchset 1: 1. There are some trivial conflicts applying your patch ...
6 years, 1 month ago (2014-10-29 21:20:01 UTC) #2
benwells
Before looking I started a bunch of try jobs. I don't think you can run ...
6 years, 1 month ago (2014-10-30 06:09:13 UTC) #5
benwells
On 2014/10/30 06:09:13, benwells wrote: > Before looking I started a bunch of try jobs. ...
6 years, 1 month ago (2014-10-30 06:10:28 UTC) #6
ryanackley
On 2014/10/30 06:10:28, benwells wrote: > On 2014/10/30 06:09:13, benwells wrote: > > Before looking ...
6 years, 1 month ago (2014-10-30 17:16:57 UTC) #7
benwells
Overall looks pretty good, but I don't know much about the storage stuff so we'll ...
6 years, 1 month ago (2014-11-03 00:08:42 UTC) #8
ryanackley
https://codereview.chromium.org/671873004/diff/60001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/671873004/diff/60001/chrome/browser/extensions/extension_service.cc#newcode148 chrome/browser/extensions/extension_service.cc:148: GURL extension_url = Extension::GetBaseURLFromExtensionId(extension->id()); On 2014/11/03 00:08:41, benwells wrote: ...
6 years, 1 month ago (2014-11-04 22:51:54 UTC) #10
ryanackley
I just added tzik as a reviewer since he is in the OWNERS file in ...
6 years, 1 month ago (2014-11-04 22:55:13 UTC) #11
benwells
On 2014/11/04 22:55:13, ryanackley wrote: > I just added tzik as a reviewer since he ...
6 years, 1 month ago (2014-11-05 02:22:54 UTC) #12
tzik
Data migration is nice to have. Though I'm afraid it's hard to do it safely. ...
6 years, 1 month ago (2014-11-06 14:18:25 UTC) #13
ryanackley
On 2014/11/06 14:18:25, tzik wrote: > Data migration is nice to have. Though I'm afraid ...
6 years, 1 month ago (2014-11-06 15:23:53 UTC) #14
benwells
Some more nits. Like tzik@ said, migration is good so thanks for the doing this! ...
6 years, 1 month ago (2014-11-06 20:45:35 UTC) #15
ryanackley
@tzik, the latest patch set should address your concerns. I moved the indexeddb migration logic ...
6 years, 1 month ago (2014-11-13 02:05:41 UTC) #16
tzik
On 2014/11/13 02:05:41, ryanackley wrote: > @tzik, the latest patch set should address your concerns. ...
6 years, 1 month ago (2014-11-17 07:23:50 UTC) #17
tzik
https://codereview.chromium.org/671873004/diff/100001/chrome/browser/extensions/app_data_migrator.cc File chrome/browser/extensions/app_data_migrator.cc (right): https://codereview.chromium.org/671873004/diff/100001/chrome/browser/extensions/app_data_migrator.cc#newcode36 chrome/browser/extensions/app_data_migrator.cc:36: origin, type, false); The backing database may be left ...
6 years, 1 month ago (2014-11-20 06:56:21 UTC) #18
ryanackley
On 2014/11/20 06:56:21, tzik wrote: > https://codereview.chromium.org/671873004/diff/100001/chrome/browser/extensions/app_data_migrator.cc > File chrome/browser/extensions/app_data_migrator.cc (right): > > https://codereview.chromium.org/671873004/diff/100001/chrome/browser/extensions/app_data_migrator.cc#newcode36 > ...
6 years ago (2014-12-03 01:21:16 UTC) #19
tzik
Looks good overall. Adding jsbell@ for IDB part. https://codereview.chromium.org/671873004/diff/120001/chrome/browser/extensions/app_data_migrator.cc File chrome/browser/extensions/app_data_migrator.cc (right): https://codereview.chromium.org/671873004/diff/120001/chrome/browser/extensions/app_data_migrator.cc#newcode69 chrome/browser/extensions/app_data_migrator.cc:69: } ...
6 years ago (2014-12-03 08:35:50 UTC) #21
jsbell
Sorry for taking so long. I'll go through it again in detail but on first ...
6 years ago (2014-12-05 01:12:57 UTC) #22
jsbell
On 2014/12/05 01:12:57, jsbell wrote: > Sorry for taking so long. I'll go through it ...
6 years ago (2014-12-08 21:49:00 UTC) #23
jsbell
On 2014/12/08 21:49:00, jsbell wrote: > FYI, crbug.com/435627 is being tackled over in crrev.com/779303003 which ...
6 years ago (2014-12-10 19:15:27 UTC) #24
jsbell
https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (right): https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc#newcode333 content/browser/indexed_db/indexed_db_context_impl.cc:333: GetFilePathForTesting(origin_url.possibly_invalid_spec()); The "ForTesting" methods should only be called from ...
6 years ago (2014-12-12 17:46:09 UTC) #25
cmumford
On 2014/12/12 17:46:09, jsbell wrote: > https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc > File content/browser/indexed_db/indexed_db_context_impl.cc (right): > > https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc#newcode333 > ...
6 years ago (2014-12-12 18:43:10 UTC) #26
cmumford
https://codereview.chromium.org/671873004/diff/160001/chrome/browser/extensions/app_data_migrator.cc File chrome/browser/extensions/app_data_migrator.cc (right): https://codereview.chromium.org/671873004/diff/160001/chrome/browser/extensions/app_data_migrator.cc#newcode1 chrome/browser/extensions/app_data_migrator.cc:1: // Copyright (c) 2014 The Chromium Authors. All rights ...
6 years ago (2014-12-12 18:43:24 UTC) #28
ryanackley
https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (right): https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc#newcode334 content/browser/indexed_db/indexed_db_context_impl.cc:334: base::FilePath dest_directory = On 2014/12/12 17:46:09, jsbell wrote: > ...
6 years ago (2014-12-12 19:03:05 UTC) #29
cmumford
On 2014/12/12 19:03:05, ryanackley wrote: > https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc > File content/browser/indexed_db/indexed_db_context_impl.cc (right): > > https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc#newcode334 > ...
6 years ago (2014-12-12 19:06:34 UTC) #30
ryanackley
On 2014/12/12 19:06:34, cmumford wrote: > On 2014/12/12 19:03:05, ryanackley wrote: > > > https://codereview.chromium.org/671873004/diff/160001/content/browser/indexed_db/indexed_db_context_impl.cc ...
6 years ago (2014-12-12 19:14:36 UTC) #31
cmumford
On 2014/12/12 19:14:36, ryanackley wrote: > On 2014/12/12 19:06:34, cmumford wrote: > > On 2014/12/12 ...
6 years ago (2014-12-12 19:19:52 UTC) #32
ryanackley
bump. In case nobody noticed, I uploaded a new changeset prior to the holidays. I ...
5 years, 11 months ago (2015-01-06 00:20:43 UTC) #33
cmumford
One question and the rest are just nit's on my part. Looking pretty good. Do ...
5 years, 11 months ago (2015-01-06 15:30:27 UTC) #34
ryanackley
@cmumford Thanks for getting back to me. I really appreciate it. I'm trying to get ...
5 years, 11 months ago (2015-01-09 17:48:36 UTC) #35
cmumford
On 2015/01/09 17:48:36, ryanackley wrote: > @cmumford Thanks for getting back to me. I really ...
5 years, 11 months ago (2015-01-09 18:42:05 UTC) #36
benwells
On 2015/01/06 00:20:43, ryanackley wrote: > bump. > > In case nobody noticed, I uploaded ...
5 years, 11 months ago (2015-01-12 05:19:57 UTC) #37
ryanackley
https://codereview.chromium.org/671873004/diff/180001/storage/browser/fileapi/obfuscated_file_util.cc File storage/browser/fileapi/obfuscated_file_util.cc (right): https://codereview.chromium.org/671873004/diff/180001/storage/browser/fileapi/obfuscated_file_util.cc#newcode907 storage/browser/fileapi/obfuscated_file_util.cc:907: DirectoryMap::iterator iter = directories_.find(key); On 2015/01/06 15:30:27, cmumford wrote: ...
5 years, 11 months ago (2015-01-12 21:18:17 UTC) #38
cmumford
On 2015/01/12 21:18:17, ryanackley wrote: > https://codereview.chromium.org/671873004/diff/180001/storage/browser/fileapi/obfuscated_file_util.cc > File storage/browser/fileapi/obfuscated_file_util.cc (right): > > https://codereview.chromium.org/671873004/diff/180001/storage/browser/fileapi/obfuscated_file_util.cc#newcode907 > ...
5 years, 11 months ago (2015-01-12 21:55:53 UTC) #39
ryanackley
On 2015/01/12 21:55:53, cmumford wrote: > On 2015/01/12 21:18:17, ryanackley wrote: > > > https://codereview.chromium.org/671873004/diff/180001/storage/browser/fileapi/obfuscated_file_util.cc ...
5 years, 11 months ago (2015-01-12 22:11:43 UTC) #40
ryanackley
5 years, 11 months ago (2015-01-13 00:00:53 UTC) #41
cmumford
lgtm
5 years, 11 months ago (2015-01-13 21:09:12 UTC) #42
benwells
c/b/extensions lgtm. Thanks! https://codereview.chromium.org/671873004/diff/200001/chrome/browser/extensions/app_data_migrator.cc File chrome/browser/extensions/app_data_migrator.cc (right): https://codereview.chromium.org/671873004/diff/200001/chrome/browser/extensions/app_data_migrator.cc#newcode1 chrome/browser/extensions/app_data_migrator.cc:1: // Copyright 2014 The Chromium Authors. ...
5 years, 11 months ago (2015-01-14 03:34:28 UTC) #43
jsbell
I defer to cmumford for indexeddb/ tzik@ - do you want to take another look?
5 years, 11 months ago (2015-01-14 18:21:01 UTC) #44
cmumford
On 2015/01/14 18:21:01, jsbell wrote: > I defer to cmumford for indexeddb/ > > tzik@ ...
5 years, 11 months ago (2015-01-14 23:45:04 UTC) #45
ryanackley
On 2015/01/14 23:45:04, cmumford wrote: > On 2015/01/14 18:21:01, jsbell wrote: > > I defer ...
5 years, 11 months ago (2015-01-16 00:20:43 UTC) #46
cmumford
On 2015/01/16 00:20:43, ryanackley wrote: > On 2015/01/14 23:45:04, cmumford wrote: > > On 2015/01/14 ...
5 years, 11 months ago (2015-01-16 01:02:51 UTC) #47
benwells
On 2015/01/16 01:02:51, cmumford wrote: > On 2015/01/16 00:20:43, ryanackley wrote: > > On 2015/01/14 ...
5 years, 11 months ago (2015-01-16 03:22:25 UTC) #48
tzik
https://codereview.chromium.org/671873004/diff/180001/chrome/browser/extensions/app_data_migrator.cc File chrome/browser/extensions/app_data_migrator.cc (right): https://codereview.chromium.org/671873004/diff/180001/chrome/browser/extensions/app_data_migrator.cc#newcode112 chrome/browser/extensions/app_data_migrator.cc:112: base::Bind(&MigrateFileSystem, old_partition, current_partition, This closure may run after the ...
5 years, 11 months ago (2015-01-16 05:56:36 UTC) #49
ryanackley
On 2015/01/16 03:22:25, benwells wrote: > On 2015/01/16 01:02:51, cmumford wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-20 15:00:22 UTC) #50
jsbell
On 2015/01/20 15:00:22, ryanackley wrote: > On 2015/01/16 03:22:25, benwells wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-20 16:37:22 UTC) #51
ryanackley
On 2015/01/16 05:56:36, tzik wrote: > https://codereview.chromium.org/671873004/diff/180001/chrome/browser/extensions/app_data_migrator.cc > File chrome/browser/extensions/app_data_migrator.cc (right): > > https://codereview.chromium.org/671873004/diff/180001/chrome/browser/extensions/app_data_migrator.cc#newcode112 > ...
5 years, 11 months ago (2015-01-20 20:39:40 UTC) #52
benwells
On 2015/01/20 16:37:22, jsbell wrote: > On 2015/01/20 15:00:22, ryanackley wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-21 03:53:22 UTC) #53
ryanackley
On 2015/01/16 05:56:36, tzik wrote: > https://codereview.chromium.org/671873004/diff/180001/chrome/browser/extensions/app_data_migrator.cc > File chrome/browser/extensions/app_data_migrator.cc (right): > > https://codereview.chromium.org/671873004/diff/180001/chrome/browser/extensions/app_data_migrator.cc#newcode112 > ...
5 years, 11 months ago (2015-01-22 21:19:04 UTC) #55
jam
content/public lgtm
5 years, 11 months ago (2015-01-23 17:39:04 UTC) #56
tzik
lgtm
5 years, 11 months ago (2015-01-26 09:46:49 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/671873004/280001
5 years, 10 months ago (2015-01-27 20:03:44 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/38672) Try jobs failed on following ...
5 years, 10 months ago (2015-01-27 20:12:34 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/671873004/300001
5 years, 10 months ago (2015-01-27 21:05:30 UTC) #65
commit-bot: I haz the power
Committed patchset #16 (id:300001)
5 years, 10 months ago (2015-01-27 23:12:44 UTC) #66
commit-bot: I haz the power
5 years, 10 months ago (2015-01-27 23:14:13 UTC) #67
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/48bedbd2773df847e5dbf1c01fb409da4636d542
Cr-Commit-Position: refs/heads/master@{#313394}

Powered by Google App Engine
This is Rietveld 408576698