This change improves ContentVerifyJob to handle read errors. Several
tests for uncommon scenarios were adjusted, but the verification
behavior is mainly unchanged. This change makes the verification flow
more robust and will help with further improvements.
Bug: 40642940
Change-Id: I60deb1db0f05bdf6ca742538d14872c2cdf44767
Include-Ci-Only-Tests: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5752523
Commit-Queue: Michael Maltsev <michaelm@island.io>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1338684}
This reverts commit ef037a35bd.
Reason for revert: seems to be culprit for consistent ContentVerifierTest failures on Mac builders. See crbug.com/356584963 for details.
Original change's description:
> Handle file read errors in extension content verification
>
> This change improves ContentVerifyJob to handle read errors. Several
> tests for uncommon scenarios were adjusted, but the verification
> behavior is mainly unchanged. This change makes the verification flow
> more robust and will help with further improvements.
>
> Bug: 40642940
> Change-Id: I29c840cf306d5d1226cdd6835cccfc4b82bc201d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5713651
> Reviewed-by: Oleg Davydov <burunduk@chromium.org>
> Commit-Queue: Michael Maltsev <michaelm@island.io>
> Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
> Reviewed-by: Tim <tjudkins@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1335357}
Bug: 40642940, 356584963
Change-Id: Ibb82db98be5854414d8150a132fc757fbcb038dd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5752643
Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Maksim Moskvitin <mmoskvitin@google.com>
Cr-Commit-Position: refs/heads/main@{#1335383}
This change improves ContentVerifyJob to handle read errors. Several
tests for uncommon scenarios were adjusted, but the verification
behavior is mainly unchanged. This change makes the verification flow
more robust and will help with further improvements.
Bug: 40642940
Change-Id: I29c840cf306d5d1226cdd6835cccfc4b82bc201d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5713651
Reviewed-by: Oleg Davydov <burunduk@chromium.org>
Commit-Queue: Michael Maltsev <michaelm@island.io>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Reviewed-by: Tim <tjudkins@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1335357}
This change is part of a series of changes to make the verification flow
less asynchronous and more reliable. This change makes job creation
easier to reason about and addresses the TODO that suggests to get rid
of the thread hopping solution which is no longer needed.
Bug: 826584
Change-Id: Ib44e770b57d6fedb3225a71b9cff8765cbc05a2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5712808
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1335146}
Also fixed tests that started to fail with PlzDedicatedWorker flag enabled.
- DedicatedWorkerTest.TopLevelFrameSecurityOrigin
The test double did not have PlzDedicatedWorker support.
- HeadlessProtocolBrowserTest.VirtualTimeWorkerBasic
- HeadlessProtocolBrowserTest.VirtualTimeWorkerFetch
maybe change checker? Adjusted values to the value with
PlzDedicatedWorker.
- MV2/ExtensionProtocolsTest.InvalidBackgroundScriptRequest/0
- MV3/ExtensionProtocolsTest.InvalidBackgroundScriptRequest/0
While the test think ExtensionURLLoader bans kWorker destination,
it is allowed if PlzDedicatedWorker is enabled.
Note that I left fuchsia as-is because it needs
https://chromium-review.googlesource.com/c/chromium/src/+/5100024.
I will address that in crbug.com/350785857 in the future.
Bug: 906991, 350775884
Change-Id: Id937ae56b2d713a75b2ce61077741307b2657d14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5671624
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Keita Suzuki <suzukikeita@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1324648}
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:
- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)
Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.
#crbug-todo-migration
Bug: b/321899722
Change-Id: I0e09a8a2601438083334cfeeea09962d85c2ac8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5465984
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Charles Meng <charlesmeng@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1289415}
base::DictionaryValue is deprecated. Once all callers are migrated, the
base::DictAdapterForMigration argument can be moved to base::Value::Dict
too. This cl migrates chrome/{browser,common}/extensions.
Bug: 1187061
Change-Id: I4e6d62ae7d142b13502a93d59c1801da51400066
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4084016
Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org>
Auto-Submit: Alex Turner <alexmt@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1082826}
DictionaryBuilder::Build() is deprecated and should be replaced with
BuildDict(). Also migrated some uses of ListBuilder::Build() and other
deprecated base::Value types. This cl migrates all of //chrome/{browser,
common}/extensions except the api subdirectory handled in
crrev.com/c/4091443
Bug: 1187061
Change-Id: Ifd91205aad39330c4023d79499b9534c844ddafe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4089472
Auto-Submit: Alex Turner <alexmt@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1082088}
Progressively rename some usages of GetMainFrame to GetPrimaryMainFrame.
This is an automated change via emacs xref integration via codesearch
restricted to chrome/*
BUG=1250404
Change-Id: Ib5bcebf5e12631eb4823ac393921334b0b68f27a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3687769
Owners-Override: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011128}
Some special attention was required due to crbug.com/949461 - had to
leave one SetString() behind in test_extension_prefs.cc. In other cases
(in chrome_app_sorting_unittest.cc), it could be worked around by simply
avoiding SetStringPath(keys::kApp, ...) if it's immediately followed by
something that was expected to overwrite it. kApp is "app", and if we
then try to set the path "app.launch.web_url" or
"app.launch.local_path", SetStringPath() will fail and do nothing,
whereas SetString() will overwrite it.
Bug: 1187025, 1187026, 1187028
Change-Id: Ic70bc3346faac66668221dd22408903e2970e69c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3452303
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#970517}
The core of this bug was that ExtensionService::BlockAllExtensions
removed the extension from the enabled/disbled/terminated lists before
unloading it, so ExtensionRegistrar couldn't know the state of the
extension which caused incorrect notifications. ExtensionService
shouldn't modify those lists, and shoud let RemoveExtension function of
ExtensionRegistrar handle them instead.
So now RemoveExtension handles terminated extensions too, and doesn't
handle blacklisted/blocked extensions. (it handled them before the same
as enabled extensions)
After this patch, ExtensionRegistrar is the sole mutator of the enabled,
disabled and terminated lists, so we can be sure that ActivateExtension
will never be called twice for the same extension and
DeactivateExtension will never be called when the extension is not
loaded (ExtensionRegistrar guarantees it as it always calls
ActivateExtension/DeactiveExtension together with AddEnabled/
RemoveEnabled and vice versa)
UnregisterExtensionWithRequestContexts is now only called from
DeactivateExtension (as RegisterExtensionWithRequestContexts is only
called from ActivateExtension), so removing disabled and terminated
extensions won't cause unnecessary double notification that won't be
handled anyway. The reason argument was removed as it is not needed
anymore.
New DCHECKs were added to ensure that all the notifications are valid.
Bug: 708230, 1289269
Change-Id: I7fec0e1d1844ad295b1683d6120da0df1540dd95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3402210
Reviewed-by: Nancy Wang <nancylingwang@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Reviewed-by: Junbo Ke <juke@chromium.org>
Commit-Queue: Devlin Cronin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#963079}
* Fixes bug in which null-timestamped resources weren't getting stamped
with ETag headers. This was causing issues in test code because files
served under /pkg are reported as having null timestamps.
* Disables portions of tests which rely on platform chmod support.
Bug: 1238790
Change-Id: Iba1f69c349f8c9cf39007c3ecd1b798fa5b24422
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3271882
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940483}
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).
This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: I882202fb6295332b52c34ba12fae4705276b0b5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3165772
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#922479}
This removes references to Media Router component extension and Cast
extension IDs from extensions code. Both of these extensions are
obsolete and no longer in use.
Bug: 1097594
Change-Id: If1f73c91798b1be467aeef88ba637ea67efacd4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3059520
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: Ryan Keane <rwkeane@google.com>
Reviewed-by: Ben Wells <benwells@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907245}
Removes the default value of the newly added |create_if_needed|
aregument of Profile::GetOffTheRecordProfile() and updates all use cases
with adding the new argument.
This CL does not change any behavior.
AX-Relnotes: n/a.
Bug: 1191315
Change-Id: Ifdfbc045529f27ad5baa5a7e92092be1a17fc2f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2794485
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#871904}
As a pre-work to convert ExtensionMsg_Loaded to Mojo, this CL
replaces uses of Manifest::Location enum type with
extensions::mojom::ManifestLocationType progressly because it's
a too huge work to convert them at once.
As the second step, this CL converts the native type to
Mojo type in Extension::Create() method.
AX-Relnotes: n/a
Bug: 1146100
Change-Id: Ifd84d87a86dbd9014fe6c6979c0d92bb38b8472d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2757592
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Sergey Volk <servolk@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#864093}
As a pre-work to convert ExtensionMsg_Loaded to Mojo, this CL
replaces uses of Manifest::Location enum type with
extensions::mojom::ManifestLocationType progressly because it's
a too huge work to convert them at once.
As the first step, this CL converts the native type to
Mojo type in ExtensionBuilder::SetLocation() method.
AX-Relnotes: n/a
Bug: 1146100
Change-Id: I64375c9173cb8d24f1eb9b0ef967caa0877f9258
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752666
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#863207}