The spec defines it to be an unsigned long long (uint64_t in Chromium),
so let's make sure all the plumbing agrees with that.
Change-Id: I9c22d4a197d726c276b3e69818276a4d149c68c8
Reviewed-on: https://chromium-review.googlesource.com/c/1356709
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Mugdha Lakhani <nator@chromium.org>
Commit-Queue: Mugdha Lakhani <nator@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612684}
This test doesn't unregister the service worker unlike others in the same file and
is likely working by accident. This becomes a problem when we migrate from
MessageLoop to the SequenceManager.
Bug: 863341, 891670
Change-Id: I658ce56f244d1beda44f02e53cceaf0a7ea7b45b
Reviewed-on: https://chromium-review.googlesource.com/c/1356940
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612669}
Use batches of 5 seconds instead of immediate log emission.
(An upcoming CL should make this configurable from JS.)
Bug: 910576
Change-Id: Ib2b804e1e8c7798b744548fb343776fa8a315a65
Reviewed-on: https://chromium-review.googlesource.com/c/1356800
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Elad Alon <eladalon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612663}
When Clear-Site-Data is triggered during a ServiceWorker update request,
there is a deadlock because the update task is waiting for the request,
the request is waiting for Clear-Site-Data, Clear-Site-Data is waiting
for the unregistration of the service worker and the unregistration is
waiting for the update task.
This is fixed by cancelling the update task and removing the service
worker without updating it.
Also requests from Service Workers are not associated with a
WebContents, so we need a better way to get a BrowserContext for these
requests.
Bug: 898465
Change-Id: I543b44e07720cf1849d1d4245ee7d36ec762efb6
Reviewed-on: https://chromium-review.googlesource.com/c/1348058
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612634}
As explained in the bug by pwnall:
ServiceWorkerDatabase::GetRegistrationsForOrigin() obtains a LevelDB
iterator and calls ServiceWorkerDatabase::ReadResourceRecords() in a
loop. ReadResourceRecords() in turn calls
ServiceWorkerDatabase::HandleReadResult(), which may call
ServiceWorkerDatabase::Disable() if the status is a failure. Disable()
contains a "db_.reset()" which deletes the leveldb::DB instance. So,
ReadResourceRecords() may end up deleting the database before the
iterator used by GetRegistrationsForOrigin() is deleted. The contract
for leveldb::DB::NewIterator() [1] states that the iterator must be
deleted before the DB instance is deleted.
[1] https://cs.chromium.org/chromium/src/third_party/leveldatabase/src/include/leveldb/db.h?l=92&rcl=73d5834eceee8efa9a8ccfec77dc096a9e8ba18a
Bug: 909024
Change-Id: Ifee9aa0f7e1db9168d61b6407a11e249b2001986
Reviewed-on: https://chromium-review.googlesource.com/c/1354730
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612599}
Adds a new DataSource for the Cast system tracing agent and enables the
corresponding TracingController test on Cast for perfetto.
Bug: 900603
Change-Id: I249066a57003996bb0c40dcc88bcbe5b23414b8d
Reviewed-on: https://chromium-review.googlesource.com/c/1353892
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612597}
Migrates a bunch of stuff related to either ash, mash, or viz, over to
ServiceBinding instead of the deprecated
ServiceContext/EmbeddedServiceInfo etc APIs.
Bug: 891780
Change-Id: Ia5313525013cd75c845b04f7ff6550a2880553f6
Reviewed-on: https://chromium-review.googlesource.com/c/1355981
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612589}
BrowserWithTestWindowTest now creates a MusClient, which is important for its native widget factory.
AshTestViewsDelegate doesn't set the context on context/parentless widgets for Mash, since DesktopNativeWidgetAura doesn't require that and it interferes with getting the correct aura::Env. Using Shell's Env is problematic because the aura::Window for a WebContents wants to use aura::Env::GetInstance, which differs from the shell's Env.
WebContentsViewAura uses the Env of its context for the aura::Window it creates, if there is a context.
Also, spot fixes for:
1. LockScreenAppStateTest
2. ChromeLauncherControllerTest
3. ImmersiveModeControllerAshTest (some of these pass, a couple still
fail, but none should crash)
4. TabStripTest
5. BookmarkBarViewTest
Bug: 906906,905430
Change-Id: I19ce303a0cad91262c1a393379ecd5c9d2bf75fb
Reviewed-on: https://chromium-review.googlesource.com/c/1351884
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612587}
This reverts commit 173a384b25.
Reason for revert: Breaks WebKit Unit Tests
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Cast%20Audio%20Linux/26824
[ RUN ] LazyLoadFramesTest.LazyLoadWhenNotRestricted
Received signal 11 SEGV_MAPERR 000000000000
#0 0x5583c9247e5f base::debug::StackTrace::StackTrace()
#1 0x5583c92479e1 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7fe0e028f330 <unknown>
#3 0x5583cb205d8b content::WebURLLoaderImpl::Context::Start()
#4 0x5583cb209f04 content::WebURLLoaderImpl::LoadAsynchronously()
#5 0x5583cb226023 blink::WebURLLoaderMock::LoadAsynchronously()
#6 0x5583c75e2862 blink::ResourceLoader::StartWith()
#7 0x5583c75df8ba blink::ResourceLoadScheduler::Request()
#8 0x5583c75e2458 blink::ResourceLoader::Start()
#9 0x5583c75d3d19 blink::ResourceFetcher::StartLoad()
#10 0x5583c75d2dd0 blink::ResourceFetcher::RequestResource()
#11 0x5583c75c0f96 blink::RawResource::FetchMainResource()
#12 0x5583ca624b45 blink::DocumentLoader::StartLoading()
#13 0x5583ca63158c blink::FrameLoader::CommitNavigation()
#14 0x5583ca22aed2 blink::WebLocalFrameImpl::CommitNavigation()
Original change's description:
> LazyLoad: Add support for restricting LazyLoad to Data Saver users.
>
> This CL adds support for restricting the lazy loading of frames and
> images separately by field trial parameters. For lazy image loading, to
> avoid the performance hit from repeatedly locking the mutex in
> NetworkStateNotifier, the value of
> NetworkStateNotifier::SaveDataEnabled() is queried once for each frame
> and used for all images in that frame.
>
> Bug: 901571
> Change-Id: Ic08416ebe40b6377d5c383616b4f0ceff920637a
> Reviewed-on: https://chromium-review.googlesource.com/c/1354694
> Commit-Queue: Scott Little <sclittle@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#612554}
TBR=dcheng@chromium.org,pfeldman@chromium.org,sclittle@chromium.org
Change-Id: I95266601549407d894a91ea3b7724b0b8bceed2c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 901571
Reviewed-on: https://chromium-review.googlesource.com/c/1355318
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612574}
This patch makes BrowserContext manages per-profile CORS access lists
even if NetworkService is enabled, and use it to setup initial access
lists for the non-primary NetworkContext. It will also work for
restoring per-profile CORS settings on network service restarts.
This patch makes following tests work even with
--enable-features=OutOfBlinkCors,NetworkService.
- CrossOriginReadBlockingExtensionTest.ProgrammaticContentScriptVsAppCache
- CrossOriginReadBlockingExtensionTest.WebViewContentScript
- ExtensionWebRequestApiTest.ExtensionRequests
- PlatformAppBrowserTest.Isolation
Bug: 908324, 891891
Change-Id: Ib0cfc2f5633f25187366a4d7d63168d60ea51f71
Reviewed-on: https://chromium-review.googlesource.com/c/1351208
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612567}
This CL adds support for restricting the lazy loading of frames and
images separately by field trial parameters. For lazy image loading, to
avoid the performance hit from repeatedly locking the mutex in
NetworkStateNotifier, the value of
NetworkStateNotifier::SaveDataEnabled() is queried once for each frame
and used for all images in that frame.
Bug: 901571
Change-Id: Ic08416ebe40b6377d5c383616b4f0ceff920637a
Reviewed-on: https://chromium-review.googlesource.com/c/1354694
Commit-Queue: Scott Little <sclittle@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612554}
This is part 4/4 CLs to move the <audio>/<video> elements off of
a synchronous API that can lead to renderer hangs and premature
audio renderer errors.
This changes the AudioRendererMixerPool API to require an
AudioRendererSink and OutputDeviceInfo when providing a mixer.
AudioRendererMixerInputs are subsequently changed to use the new
API.
Likewise AudioRendererImpl also now uses the asynchronous API. To
simplify the async process, AudioRendererMixerInputs will only setup
correctly when OutputDeviceInfo has been requested ahead of time,
since that's the pattern that AudioRendererImpl will use.
This also moves the NullAudioSink setup from WebAudioSourceProvider
over to the AudioRendererImpl. This causes WebAudio to be disconnected
from the element, but if audio isn't work anyways, it shouldn't matter.
BUG=905506
TEST=updated tests, compiles, runs.
R=olka
Change-Id: I4edf89bb1e20cc91191a6eb97a0e38b6aeba68f8
Reviewed-on: https://chromium-review.googlesource.com/c/1347795
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612526}
This CL creates a bool in WebSettings to enable lazyloading of frames and images.
The bool is populated by WebContentsDelegate which offline pages listens to and
disables lazy loading.
Bug: 701884
Change-Id: I1ad1776adf3f9c7e6a8a3a68507aa9dc419e3955
Reviewed-on: https://chromium-review.googlesource.com/c/1352817
Commit-Queue: rajendrant <rajendrant@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Peter Williamson <petewil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612507}
Currently, SiteInstance::IsSameWebSite() is static and will need to be
modified to support dynamic isolated origins. Those origins will
apply only to future BrowsingInstances, meaning the answer to
IsSameWebSite will depend on which frame/SiteInstance is asking this
question. This CL replaces this method with a non-static
SiteInstance::IsSameSiteWithURL method. This will ensure that the
internal implementation will be able to provide sufficient context
(i.e., BrowsingInstance info) in the future, without having to expose
that context outside of content/. Note that the content-internal
version of this call, SiteInstanceImpl::IsSameWebSite, stays as-is for
now.
The only two non-test uses of this were in NaCl code. They were
checking whether the current SiteInstance's site URL is same-site with
the URL of the NaCl file to be loaded, with both URLs expected to be
extension URLs. There should be no behavior change in these, as the
underlying implementation doesn't change.
A few tests are also refactored to either avoid using IsSameWebSite
entirely, or, for tests inside content/, to use the internal version
of IsSameWebSite.
Bug: 905513
Change-Id: Ia2957bb1ec7a16de8c3d18ef167149f1f5a08066
Reviewed-on: https://chromium-review.googlesource.com/c/1352856
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612495}
This is part 3/4 CLs to move the <audio>/<video> elements off of
a synchronous API that can lead to renderer hangs and premature
audio renderer errors.
This moves the AudioRendererSinkCache from AudioRendererMixerManger
to a base::NoDestructor instance in AudioDeviceFactory and stops
ARMM from using the cache at all. The users remaining are WebAudio
and WebRTC, we can reevaluate metrics on keeping it after.
Due to base::(SingleThread|Sequenced)TaskRunner::Get() being
deprecated for content/ I've had to switch to use base::PostTask to
generate a cleanup task runner. Unfortunately this doesn't guarantee
that it runs on the render thread, but since we're now using a static
instance, we can just always use base::Unretained and drop the WeakPtr
factory that was handling the cancellation of these tasks.
There's no point in the cache for ARMM since we're going to require
a sink to get a mixer. That sink will always be used to get output
device info first too and then reused for the mixer.
BUG=905506
TEST=updated tests, compiles.
R=olka
Change-Id: I03408753f974e4c6fb9c89270508e26689162002
Reviewed-on: https://chromium-review.googlesource.com/c/1347730
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612460}
This patch makes WebContentsViewAura manage its web content's visibility
state based on its current mirror window's occlusion state. To achieve
this, the patch makes the following changes:
- Adds a new callback in WindowObserver to receive occlusion state
changes.
- Creates a subclass of aura::WindowObserver to manage mirror window
occlusion states for the WebContentsViewAura.
- Replaces a DCHECK with an early return when an already tracked window
is requested to be tracked again.
- Replaces the boolean window property of mirror window with a vector
list of mirror windows.
- Updates the unittest and adds a new method to WindowTestApi.
Bug: 901555
Change-Id: I70566c544def6129c7410af84f91e6501a5479d5
Component: Window Mirror View, web contents, Window occlusion tracker
Reviewed-on: https://chromium-review.googlesource.com/c/1313753
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612457}
It doesn't override to arbitrary things, so let the RenderViewImpl have
a better idea what is going on by only asking for a bool to use
kPrerender visibility instead of shown/hidden.
This will help us allow the RenderViewImpl to control the visibility
of the RenderWidgets.
R=dcheng@chromium.org
Change-Id: I8b4bc4a8fd969c1c2e6a4c90f1269a5d41b41ba6
Bug: 908582
Reviewed-on: https://chromium-review.googlesource.com/c/1355773
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612422}
This removes the dependency ChromeDataUseMeasurement has on
g_browser_process (when kNetworkService is enabled) and fixes a
crash when starting in service-manager-only mode.
Bug: 902791
Change-Id: I0ed11f4735f4494247a7c17767b53aab695d0f14
Reviewed-on: https://chromium-review.googlesource.com/c/1334334
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: rajendrant <rajendrant@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612421}
This is part 2/4 CLs to move the <audio>/<video> elements off of
a synchronous API that can lead to renderer hangs and premature
audio renderer errors.
Specifically this will allow us to create AudioRendererMixerInputs
with an authorization timeout of zero when the asynchronous API
is the only one in use.
BUG=905506
TEST=compiles.
R=olka
Change-Id: I298550db1e7bac9b73033566c17cff8f1d2252b3
Reviewed-on: https://chromium-review.googlesource.com/c/1347146
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612400}
This deletes all code supporting the deprecated ServiceTest framework
and also cleans up a bunch of superfluous dependencies on service stuff
around the tree.
TBR=sky@chromium.org
Bug: 906239
Change-Id: I56db6c5a4c1d0ffab1be5dde08692383c424d5b6
Reviewed-on: https://chromium-review.googlesource.com/c/1354507
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612389}
RenderWidgetHostViewMac explicitly sets NeedsBeginFrames upon startup.
This was setup to address some race condition.
However this is not handled by the browser process when Viz Display
Compositor is enabled. DelegatedFrameHost is spamming debug logs with
NOTIMPLEMENTED messages as a result.
All other paths to this is already checking the Viz status and not
calling in. Once Viz has launched we'll remove this legacy path.
This change updates RenderWidgetHostViewMac to not explicitly set
NeedsBeginFrames upon startup when Viz Display Compositor is
enabled.
Bug: 907246
Change-Id: I9a584c4bedcdb1da897f8155eb151ff63ef3c8b2
Reviewed-on: https://chromium-review.googlesource.com/c/1355479
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: ccameron <ccameron@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612386}
In https://codereview.chromium.org/2674002, Google code was put into
the third_party/mozilla/NSPasteboard+Utils.h|mm files. This was not
imported code from Mozilla and did not belong there.
This utility code is moved into a Chromium file (with slight
modernization.)
The lawyers have approved this.
BUG=none
TEST=no visible change intended
Change-Id: Icf3a91d10d7d52757b7dd220b2703acf3ff45b4d
Reviewed-on: https://chromium-review.googlesource.com/c/1355525
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612379}
This CL adds the required pathways to support double-tap-zoom for OOPIF.
1) Modifies WebFrameWidgetImpl to get the box_bounds of the double-
tapped element, and
2) sends the tapped point and box_bounds to the browser, where
3) RenderFrameHostImpl transforms them into root-view coordinates, and
4) sends them to the renderer via the main-frame's RenderViewHostImpl.
5) From there RenderViewImpl invokes WebViewImpl's
AnimateDoubleTapZoom.
Bug: 734209
Change-Id: Ic55afb6154356d676872ced93f64a243190cf289
Reviewed-on: https://chromium-review.googlesource.com/c/1298081
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612371}
This changes CtapGetAssertionRequest to carry the unhashed AppID rather only
its hashed form, the "Alternative Application Parameter". The unhashed value
is passed to the Windows WebAuthn API for U2F sign requests.
Bug: 898718
Change-Id: I2d9e6b80463859adba9a786e0c478c9d63e4164b
Reviewed-on: https://chromium-review.googlesource.com/c/1354689
Commit-Queue: Martin Kreichgauer <martinkr@chromium.org>
Reviewed-by: Adam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612349}
Adds periodic pausing/resuming of random mojo bindings, to test whether Mojo users are relying on FIFO ordering of messages sent over different message pipes.
Bug: 830815
Change-Id: Ie765813235a6ff720b2c4c3be550ad474b7be566
Reviewed-on: https://chromium-review.googlesource.com/c/1325551
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612321}
Original change's description:
> MediaLicenses can be cleared from the ClearBrowsingData dialog, so update the
> BrowsingDataRemoverBrowserTest to check them as well. This uses the test-only
> External Clear Key CDM to store the license in the file system, if it is
> available.
>
> The original CL was flaky due to Mac's only saving file timestamps to
> second granularity. As a result it was possible for the newly created license
> to be saved with a timestamp prior to the current actual time, and deleting
> "old" licenses would include it in the deletion. Change is to wait for some
> time on Macs only to ensure that the "new" license has a later timestamp.
This reverts commit b6bfa2b7f9.
BUG=808690
TEST=new browser_tests pass
Change-Id: Iad919ec23bf157a9bc4af3e6d54af2b28fdc217e
Reviewed-on: https://chromium-review.googlesource.com/c/1354498
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612301}