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

Issue 537053002: Implement ManifestManager to handle manifest in content/ (Closed)

Created:
6 years, 3 months ago by mlamouri (slow - plz ping)
Modified:
6 years, 3 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, kenneth.r.christiansen, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@manifest_fetcher
Project:
chromium
Visibility:
Public.

Description

Implement ManifestManager to handle manifest in content/. This can be used from the renderer process or the browser process. Requesting the manifest can be done via one call, a callback has to be passed and will run with the manifest passed as parameter. A failure will return the empty manifest. Some more logic could be added like caching the manifest in the browser process or keeping track of the manifest dirty state in the browser process but those things can be added transparently later. BUG=366145 Committed: https://crrev.com/efdca9d8f31e7aa0ce7cb7a2eff5f08dead2498b Cr-Commit-Position: refs/heads/master@{#295085}

Patch Set 1 #

Patch Set 2 : wip - can be used via WebContents::GetManifest() #

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Patch Set 5 : with tests #

Total comments: 6

Patch Set 6 : review comments #

Total comments: 20

Patch Set 7 : review comments #

Total comments: 8

Patch Set 8 : michael's comments #

Patch Set 9 : ipc security comments #

Total comments: 6

Patch Set 10 #

Patch Set 11 : fix content_browsertests compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+758 lines, -0 lines) Patch
A content/browser/manifest/OWNERS View 1 2 3 4 5 6 7 10 1 chunk +1 line, -0 lines 0 comments Download
A content/browser/manifest/manifest_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +202 lines, -0 lines 0 comments Download
A content/browser/manifest/manifest_manager_host.h View 1 2 3 4 5 6 7 1 chunk +66 lines, -0 lines 0 comments Download
A content/browser/manifest/manifest_manager_host.cc View 1 2 3 4 5 6 7 8 9 1 chunk +121 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -0 lines 0 comments Download
M content/common/content_message_generator.h View 1 1 chunk +1 line, -0 lines 0 comments Download
A content/common/manifest_manager_messages.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M content/public/common/manifest.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/common/manifest.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/renderer/render_frame_observer.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A content/renderer/manifest/manifest_manager.h View 1 2 3 4 5 6 1 chunk +81 lines, -0 lines 0 comments Download
A content/renderer/manifest/manifest_manager.cc View 1 2 3 4 5 6 7 8 1 chunk +140 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 4 chunks +11 lines, -0 lines 0 comments Download
A content/test/data/manifest/404-manifest.html View 1 2 3 4 5 6 7 10 1 chunk +8 lines, -0 lines 0 comments Download
A content/test/data/manifest/dummy-manifest.html View 1 2 3 4 5 6 7 10 1 chunk +8 lines, -0 lines 0 comments Download
A content/test/data/manifest/dummy-manifest.json View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A content/test/data/manifest/dynamic-manifest.html View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
A content/test/data/manifest/empty-manifest.html View 1 2 3 4 5 6 7 10 1 chunk +8 lines, -0 lines 0 comments Download
A content/test/data/manifest/empty-manifest.json View 1 2 3 4 5 6 7 10 1 chunk +2 lines, -0 lines 0 comments Download
A content/test/data/manifest/no-manifest.html View 1 2 3 4 5 6 7 10 1 chunk +7 lines, -0 lines 0 comments Download
A content/test/data/manifest/parse-error-manifest.html View 1 2 3 4 5 6 7 10 1 chunk +8 lines, -0 lines 0 comments Download
A content/test/data/manifest/parse-error-manifest.json View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 27 (5 generated)
mlamouri (slow - plz ping)
Kenneth and Michael, could you take a look at this CL as non-owners? Chris, could ...
6 years, 3 months ago (2014-09-09 12:40:39 UTC) #2
Michael van Ouwerkerk
https://codereview.chromium.org/537053002/diff/80001/content/renderer/manifest/manifest_manager.cc File content/renderer/manifest/manifest_manager.cc (right): https://codereview.chromium.org/537053002/diff/80001/content/renderer/manifest/manifest_manager.cc#newcode39 content/renderer/manifest/manifest_manager.cc:39: request_ids_.push_back(request_id); Why store this list of ids separately? You ...
6 years, 3 months ago (2014-09-09 15:34:56 UTC) #3
jochen (gone - plz use gerrit)
https://codereview.chromium.org/537053002/diff/80001/content/browser/web_contents/web_contents_impl.h File content/browser/web_contents/web_contents_impl.h (right): https://codereview.chromium.org/537053002/diff/80001/content/browser/web_contents/web_contents_impl.h#newcode333 content/browser/web_contents/web_contents_impl.h:333: virtual void GetManifest(const GetManifestCallback&) OVERRIDE; why does this have ...
6 years, 3 months ago (2014-09-10 08:02:44 UTC) #4
mlamouri (slow - plz ping)
Comments applied. I've also applied some changes we talked to with Michael with regards to ...
6 years, 3 months ago (2014-09-10 17:06:20 UTC) #5
kenneth.christiansen
Some nits: https://codereview.chromium.org/537053002/diff/100001/content/browser/manifest/manifest_browsertest.cc File content/browser/manifest/manifest_browsertest.cc (right): https://codereview.chromium.org/537053002/diff/100001/content/browser/manifest/manifest_browsertest.cc#newcode96 content/browser/manifest/manifest_browsertest.cc:96: // manifest should return a properly filed ...
6 years, 3 months ago (2014-09-11 09:33:10 UTC) #7
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/537053002/diff/100001/content/browser/manifest/manifest_browsertest.cc File content/browser/manifest/manifest_browsertest.cc (right): https://codereview.chromium.org/537053002/diff/100001/content/browser/manifest/manifest_browsertest.cc#newcode96 content/browser/manifest/manifest_browsertest.cc:96: // manifest should return a properly filed manifest. ...
6 years, 3 months ago (2014-09-11 10:30:32 UTC) #8
Michael van Ouwerkerk
lgtm with nits https://codereview.chromium.org/537053002/diff/120001/content/browser/manifest/manifest_manager_host.cc File content/browser/manifest/manifest_manager_host.cc (right): https://codereview.chromium.org/537053002/diff/120001/content/browser/manifest/manifest_manager_host.cc#newcode75 content/browser/manifest/manifest_manager_host.cc:75: LOG(ERROR) << "Unexpected ManifestResponse to RFH."; ...
6 years, 3 months ago (2014-09-11 11:03:14 UTC) #9
mlamouri (slow - plz ping)
https://codereview.chromium.org/537053002/diff/120001/content/browser/manifest/manifest_manager_host.cc File content/browser/manifest/manifest_manager_host.cc (right): https://codereview.chromium.org/537053002/diff/120001/content/browser/manifest/manifest_manager_host.cc#newcode75 content/browser/manifest/manifest_manager_host.cc:75: LOG(ERROR) << "Unexpected ManifestResponse to RFH."; On 2014/09/11 11:03:14, ...
6 years, 3 months ago (2014-09-11 11:11:49 UTC) #10
palmer
Where is manifest.h, and struct Manifest? I don't have it in my source tree, and ...
6 years, 3 months ago (2014-09-11 20:47:31 UTC) #11
mlamouri (slow - plz ping)
On 2014/09/11 20:47:31, Chromium Palmer wrote: > It looks like the struct contains 2 strings, ...
6 years, 3 months ago (2014-09-12 12:08:33 UTC) #12
palmer
On 2014/09/12 12:08:33, Mounir Lamouri wrote: > On 2014/09/11 20:47:31, Chromium Palmer wrote: > > ...
6 years, 3 months ago (2014-09-12 18:34:14 UTC) #13
mlamouri (slow - plz ping)
I've uploaded a new patch with IPC security comments taken into consideration. PTAL. On 2014/09/12 ...
6 years, 3 months ago (2014-09-15 13:44:24 UTC) #14
palmer
> > * Truncation may be, or tickle, a bug. If you find you have ...
6 years, 3 months ago (2014-09-15 21:26:17 UTC) #15
palmer
LGTM
6 years, 3 months ago (2014-09-15 21:29:21 UTC) #16
mlamouri (slow - plz ping)
Jochen, PTAL.
6 years, 3 months ago (2014-09-16 09:14:07 UTC) #17
jochen (gone - plz use gerrit)
lgtm with nits https://codereview.chromium.org/537053002/diff/160001/content/browser/manifest/manifest_browsertest.cc File content/browser/manifest/manifest_browsertest.cc (right): https://codereview.chromium.org/537053002/diff/160001/content/browser/manifest/manifest_browsertest.cc#newcode41 content/browser/manifest/manifest_browsertest.cc:41: }; disallow copy and assign https://codereview.chromium.org/537053002/diff/160001/content/browser/manifest/manifest_manager_host.cc ...
6 years, 3 months ago (2014-09-16 14:41:39 UTC) #18
mlamouri (slow - plz ping)
https://codereview.chromium.org/537053002/diff/160001/content/browser/manifest/manifest_browsertest.cc File content/browser/manifest/manifest_browsertest.cc (right): https://codereview.chromium.org/537053002/diff/160001/content/browser/manifest/manifest_browsertest.cc#newcode41 content/browser/manifest/manifest_browsertest.cc:41: }; On 2014/09/16 14:41:39, jochen wrote: > disallow copy ...
6 years, 3 months ago (2014-09-16 15:32:37 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/537053002/180001
6 years, 3 months ago (2014-09-16 15:34:01 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/56550)
6 years, 3 months ago (2014-09-16 15:51:32 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/537053002/200001
6 years, 3 months ago (2014-09-16 15:58:06 UTC) #25
commit-bot: I haz the power
Committed patchset #11 (id:200001) as e599179a70c53af300874c5e2dbea8c1bbb0a2c4
6 years, 3 months ago (2014-09-16 16:56:29 UTC) #26
commit-bot: I haz the power
6 years, 3 months ago (2014-09-16 16:57:59 UTC) #27
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/efdca9d8f31e7aa0ce7cb7a2eff5f08dead2498b
Cr-Commit-Position: refs/heads/master@{#295085}

Powered by Google App Engine
This is Rietveld 408576698