This CL:
- Adds conversion measurement removal masks to BrowsingDataRemover and
StoragePartition.
- Wires up the mask to DATA_TYPE_SITE_DATA to conversion data is deleted
when deleting site data
- Adds an interface in StoragePartitionImpl to generate a Origin matcher
that abstracts some of the complexities in the code and unifies the
storage_origin, special storage policy, and origin matcher function.
Bug: 1045165
Change-Id: Ieaa55f39aae67aa2e7e0b42fa4ed049f19912604
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2155817
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: John Delaney <johnidel@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763108}
Instead of only passing the scheme of the cookie's source, this now
passes the whole URL.
Most of the call sites already have the URL (e.g. they used it to create
the cookie object in the first place). These callers were previously
passing url.scheme() and were converted to just pass the url.
Some callers did not have the source URL. These were converted to use
a fake URL cobbled together from the original scheme, the cookie's
domain attribute, and the cookie's path attribute. Most of these call
sites were in tests, but a handful were in production code.
As of now, the use of a simulated source URL doesn't matter (since the
CookieStore implementation only uses its scheme anyway).
Bug: 1069642
Change-Id: If239280a3d43b7c0e2ff9af9daa9989350957b3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2145152
Commit-Queue: Lily Chen <chlily@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Wei Li <weili@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759324}
This CL update the functions GetOriginsForTypeOnFileTaskRunner and
GetOriginsForHostOnFileTaskRunner of FileSystemQuotaUtil to use
dedicated Origin type instead of GURL.
Change PluginPrivateDataDeletionHelper::CheckOriginsOnFileTaskRunner
also.
Bug: 598424
Change-Id: Ica53219f4f7acbf457195a7cb964b404bf7af98b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2074842
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746401}
Testing code that was moved from //content to //storage is still under
the content namespace. This is hindering Storage Service-related
refactoring. This CL updates the namespace to reflect the directory
structure.
This CL also makes mechanical code health improvements (such as new ->
base::MakeRefCounted) applied when obvious. clang-tidy improvements are
applied where requested by Tricium.
Bug: 653751
Change-Id: I3d0b5712b531d0d33205ee2a3de3de5dce73e84d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2048986
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Jarryd Goodman <jarrydg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740558}
This is a necessary pre-cursor to cleaning up scheme initialization.
No GURLs should be created before schemes are modified/added and GURL
is ready to use. Enforcement of this will come in a followup CL.
See the bug for additional context.
Replacing static initalizers with functions ensures the GURLs are
only initialized when used, which happens after test setup.
Bug: 783819
Change-Id: Ifafe4a45b69eac0df10ac2125a328d24de130bd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918828
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732950}
No less than 6.5 years after TestBrowserThread was deprecated!
Moved as-is to browser_task_environment.cc % deletion on an unused constructor.
Only actual change in this CL is in
chrome/browser/android/digital_asset_links/digital_asset_links_handler_unittest.cc
to use BrowserTaskEnvironment instead (doesn't alter any logic, just
semantics).
// For minor tweaks to chrome/browser/android/digital_asset_links/digital_asset_links_handler_unittest.cc
TBR=lizeb@chromium.org
// To bypass owners on mechanical removal of unused headers.
TBR=avi@chromium.org
Bug: 272091
Change-Id: I174c23ae436c330b32f14bd12ff5f9dc4e23bab2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1978162
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726871}
This is a mechanical move of content::LocalStorageContextMojo over to
storage::LocalStorageImpl within the Storage Service. No behavioral
changes.
Bug: 1000959
Change-Id: Ic71f11d4bc143c0103171b254c7f0472fca6bc85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1945941
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723121}
Mechanical move of the Local Storage metadata proto into the Storage
Service. This is in preparation for moving the Local Storage
implementation itself into service.
Bug: 1000959
Change-Id: I21a0d75556bc96b451ad1e1fb692cca02102c16f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1944322
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721241}
Also from StoragePetition it uses which is defined in content/public/.
This changes BluetoothDevice::ConnectErrorCallback to be a OnceCallback, then
the Bind() call in content can become a BindOnce().
R=clamy@chromium.org
Bug: 1007763, 1007760
Change-Id: Iaf1928397c3c913df87e1297c1ad4ffe13f907a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1944312
Auto-Submit: danakj <danakj@chromium.org>
Commit-Queue: Camille Lamy <clamy@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720943}
This insulates LocalStorageContextMojo behind a new
LocalStorageControl mojom interface defined by the Storage Service.
DOMStorageContextWrapper no longer has direct access to the
LocalStorageContextMojo instances, instead interacting with them only
through the mojom interface.
This simplifies DOMStorageContextWrapper, but also helps prepare
LocalStorageContextMojo for migration into private Storage Service
code.
Bug: 1000959
Change-Id: I12c6ece0b1dd01c3e17e66e6249b2d01935675f6
Tbr: jam@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1902244
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#717745}
Modify storage partition cookie helper functions to use
MakeAllInclusive() instead of the CookieOptions() in order to prevent
test breakage when cookies become SameSite-by-Default.
MakeAllInclusive() has a SameSite context of STRICT instead
of CookieOptions()'s CROSS_SITE.
Bug: 1016512
Change-Id: Id826eeaf0bea5c0bd60dc6380f57fd419d62388d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879561
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Steven Bingler <bingler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709227}
In the past, "content/*/file_system" was renamed to "fileapi"
to contain both the code for the filesystem API and the blob system.
But the blob system moved out to separate directories,
we have the confusing situation that we have directories named
after one API that contain the implementation of a different API.
This patch rename "storage/common/fileapi" to "file_system"
to actually match for reducing confusion.
Bug: 921260
Change-Id: I5071d6e268aa6824c165678def35d4dfe88a6f89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1871711
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#708948}
This removes util.cc/h from the leveldb service's client library. This
is the last bit of remaining code from the service apart from
LevelDBDatabaseImpl itself, which will be simplified and moved into the
Storage Service as a wrapper around DomStorageDatabase.
The utility functions here are used almost exclusively in tests, and
are all trivial. In many cases their use can be eliminated by proving
the surrounding APIs (e.g. taking spans instead of vectors, or
introducing a more robust key/value type) or by inlining direct use of
base and STL APIs which essentially solve the same problems.
For now, their definitions have been duplicated in the few places they
are used.
Bug: 1000959
Change-Id: I568ac5d829b643d332783faddffa2bc63685e211
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868847
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#707926}
In the past, "content/*/file_system" was renamed to "fileapi"
to contain both the code for the filesystem API and the blob system.
But the blob system moved out to separate directories,
we have the confusing situation that we have directories named
after one API that contain the implementation of a different API.
This patch rename "storage/browser/fileapi" to "file_system"
to actually match for reducing confusion.
Bug: 921260
Change-Id: I18a391b43c054e647d938832f2055580a083437a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1858542
Commit-Queue: DongJun Kim <djmix.kim@samsung.com>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707702}
This gets rid of fake implementations of the LevelDBDatabase mojom
interface and refactors all dependent tests to use a real
in-memory LevelDBDatabaseImpl instead.
Local/SessionStorageContextMojo are updated to use a LevelDBDatabaseImpl
directly, and other DOM storage classes can by updated similarly in
follow-up CLs. This is a step in incrementally deleting the
LevelDBDatabase mojom interface and migrating DOM storage implementation
to consume a DomStorageDatabase directly.
Bug: 1000959
Change-Id: Ieaa8e46a6ebc0f41dc85b3c60423552c88cb0c6a
Tbr: sky@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1837145
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704376}
This deletes LevelDBService and moves LevelDBDatabaseImpl off of Mojo
pipes. A generated mojom interface is still used for now, but calls go
directly into a LevelDBDatabaseImpl.
LevelDBDatabaseImpl is reimplemented in terms of DomStorageDatabase from
the Storage Service. This will allow the many call sites into this class
to be incrementally adapted to directly use the underlying
DomStorageDatabase. Once that migration is complete,
components/services/leveldb/ can be deleted.
Bug: 1000959
Change-Id: I8cd604b895b995de4723cd572e6cc6f67fa5d43e
Tbr: sky@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827186
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701360}
- Splits Write into two parts, response time and data. Uses stream 0
for response time, stream 1 for data, to avoid a slowdown.
- Splits Read similarly.
- Eliminates the extra data copy when writing caused by passing a
span from CodeCacheHostImpl rather than the Mojo BigBuffer received
from the renderer.
- Changes the keyed PendingOperation queues to keep the active op at
the head. This simplifies the helper method and callback signatures.
- PendingOperations now own the IOBuffers for Write and Fetch.
- Using stream 0 now will make deduplication of the code caches (not
storing a copy of the code for each origin) easier in the future.
Behavior changes:
- IssuePendingOperations now runs PendingOperations through the queues
rather than all at once. This was probably didn't happen in the real
world but seems incorrect.
- Reads where one or more parts fail now doom the entry. We should
help the cache eliminate inaccessible data.
- Response time is now stored in stream 0. This means any data in the
cache from previous Chromes where response time was a prefix on
stream 1 will cause a cache miss, since the time stamp read will fail.
This CL then makes the data read fail, since returning data prefixed
with a timestamp could be confusing now. Invalidating the caches
shouldn't be a problem, since we expect a new version of Chrome/V8
to cause the code caches to become invalid since their version/feature
header won't match, see:
https://cs.chromium.org/chromium/src/v8/src/snapshot/code-serializer.cc?rcl=6c89d2ffb531b3c79181532b5de04adaf7206049&l=387
Bug: chromium:992991
Change-Id: If3c5e8a83bca811fcb809a8a89c6d22942456f13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814685
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700307}
In the past, base::File object was passed to the CDM process and it
read/write using the handle. Now that all the reading/writing is done
in the browser process, it's no longer a concern that the handle can
exist after the underlying file was deleted.
The test is removed while removing usages of CreateOrOpen() function
that is on deprecation path.
Bug: 936722
Change-Id: Ic2ab6ffece24118e3f7384b440b77cecd12ddc5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768590
Auto-Submit: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: John Rummell <jrummell@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692383}
Previously CookieInclusionStatus was just an enum with one value for
inclusion and a number of other values for exclusion due to different
reasons.
This changes CookieInclusionStatus to hold multiple exclusion reasons,
with inclusion represented as a lack of any exclusion reasons. This is
implemented as a bit vector with each exclusion reason represented as
a single bit.
This also adds warnings to CookieInclusionStatus, which indicate when
warnings should be emitted about a cookie (regardless of inclusion or
exclusion). This removes the need for the previous hack which indicated
warnings by making a duplicate of the cookie with a different
CookieInclusionStatus.
Bug: 993843
Change-Id: I8f4f76ea5c7225cd01342786b20f9e0b05f582c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756157
Commit-Queue: Lily Chen <chlily@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691902}
This is a reland of 18947083c7
The move_source_file.py script's formatting rules incorrectly
formatted services/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
after all. But we also can't rely 100% on git cl format (crbug.com/997063)
so I ended up performing a git cl format && git add -up
(+interactive addition of missing blank line after foo.h when included
from top of foo.cc)
Also added
$ tools/git/move_source_file.py net/test/test_with_scoped_task_environment.h net/test/test_with_task_environment.h
Original change's description:
> [TaskEnvironment] Complete migration with header rename
>
> This is merely:
>
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
>
> and a few manual renames in DEPS files missed by the script
>
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
>
> TBR=dcheng@chromium.org
>
> Bug: 992483
> Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689778}
TBR=dcheng@chromium.org
Bug: 992483
Change-Id: I6179dd1329a4d30bf5c65450ea893537f31e6f85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767658
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689794}
This reverts commit 18947083c7.
Reason for revert: broke Win
Original change's description:
> [TaskEnvironment] Complete migration with header rename
>
> This is merely:
>
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
>
> and a few manual renames in DEPS files missed by the script
>
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
>
> TBR=dcheng@chromium.org
>
> Bug: 992483
> Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689778}
TBR=dcheng@chromium.org,gab@chromium.org
Change-Id: I9aa8ff558d1ff78cebe0c25e559c017578ad4f53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 992483
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767657
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689780}
This is merely:
$ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
$ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
$ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
$ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
$ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
and a few manual renames in DEPS files missed by the script
This CL uses --bypass-hooks to avoid having to git cl format because
many headers are being reordered by git cl format and it's too many to
figure out in a no-op CL which ones are okay with it.
windows.h for one should typically be first and another one of the
reorderings in PS3 even caused a compile failure:
https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.ccTBR=dcheng@chromium.org
Bug: 992483
Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689778}
This changes the CookieStore's GetCookieListCallback from taking a
CookieList (for included cookies) and a CookieStatusList (for excluded
cookies), to taking a CookieStatusList for both. Previously, the
statuses of included cookies could be assumed to be INCLUDE, so they
did not need to be passed to the callback. The next change adds more
nuanced information to CookieInclusionStatus such that statuses must
be explicitly passed even for included cookies, hence a CookieStatusList
must be provided.
This also makes GetAllCookiesCallback take a CookieList only, since the
second CookieStatusList parameter (for excluded cookies, of which there
were none, since we are getting all cookies) was unused.
Bug: 993843
Change-Id: I4c6bedc0c161f863b9a1755bb93e615f2793202e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758437
Commit-Queue: Lily Chen <chlily@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689162}
- Uses mojo_base::BigBuffer instead of std::vector to avoid unintentional
copies of cache metadata. These copies can be slow.
Bug: chromium:992991
Change-Id: I2cd3a7716e7141f263927dac17b50aa990716119
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1759683
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688982}
This is
1) s/TestBrowserThreadBundle/BrowserTaskEnvironment/ on src/
2) s/([^/])\b\w*thread_bundle(_)?/\1task_environment\2/ on files modified in (1)
3) git cl format
4) Manually fix up remainder "ThreadBundle" and "thread_bundle" found via
string search on the whole of src/.
For ease of review:
* Step #3 is the diff between patch sets 1..2
* Step #4 is the diff between patch sets 2..3
TBR=dcheng@chromium.org
(for post-review owners bypass per mechanical change)
Bug: 992483
Change-Id: I4945141f6d78bdc6c98444198e5012ddc8e5bff0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758440
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688755}
CookieOptions had an optional server_time field, which was used for
clock skew adjustments when creating a cookie, and nothing else.
Since CanonicalCookie::Create no longer depends on the other fields of
CookieOptions, this CL replaces its CookieOptions argument with a
base::Optional<base::Time> server_time argument. The server_time field
is removed from CookieOptions because nothing else needs it. This does
mean that CookieStore::SetCookieWithOptionsAsync needs an additional
server_time argument since CookieOptions no longer includes it. But
that method needs to be removed anyways.
Mostly but not entirely mechanical changes. This should not change any
behavior.
Bug: 989098
Change-Id: Ifd281db9c6412c8123d2f7ced954901ba33bf948
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1732689
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Commit-Queue: Lily Chen <chlily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684780}
*** Note: There is no behavior change from this patch. ***
The PostTask APIs will shortly be changed to require all tasks to explicitly
specify their thread affinity, i.e., whether the task should run on the thread
pool or a specific named thread such as a BrowserThread. This patch updates all
call sites with thread affinity annotation. We also remove the "WithTraits"
suffix to make the call sites more readable.
Before:
// Thread pool task.
base::PostTaskWithTraits(FROM_HERE, {...}, ...);
// UI thread task.
base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI, ...}, ...);
After:
// Thread pool task.
base::PostTask(FROM_HERE, {base::ThreadPool(), ...}, ...);
// UI thread task.
base::PostTask(FROM_HERE, {BrowserThread::UI, ...}, ...);
This patch was semi-automatically prepared with these steps:
1. Patch in https://chromium-review.googlesource.com/c/chromium/src/+/1635827
to make thread affinity a build-time requirement.
2. Run an initial pass with a clang rewriter:
https://chromium-review.googlesource.com/c/chromium/src/+/1635623
3. ninja -C out/Debug | grep 'requested here' | cut -d: -f1-3 | sort | \
uniq > errors.txt
4. while read line; do
f=$(echo $line | cut -d: -f 1)
r=$(echo $line | cut -d: -f 2)
c=$(echo $line | cut -d: -f 3)
sed -i "${r}s/./&base::ThreadPool(),/$c" $f
done < errors.txt
5. GOTO 3 until build succeeds.
6. Remove the "WithTraits" suffix from task API call sites:
$ tools/git/mffr.py -i <(cat <<EOF
[
["PostTaskWithTraits", "PostTask"],
["PostDelayedTaskWithTraits", "PostDelayedTask"],
["PostTaskWithTraitsAndReply", "PostTaskAndReply"],
["CreateTaskRunnerWithTraits", "CreateTaskRunner"],
["CreateSequencedTaskRunnerWithTraits", "CreateSequencedTaskRunner"],
["CreateUpdateableSequencedTaskRunnerWithTraits", "CreateUpdateableSequencedTaskRunner"],
["CreateSingleThreadTaskRunnerWithTraits", "CreateSingleThreadTaskRunner"],
["CreateCOMSTATaskRunnerWithTraits", "CreateCOMSTATaskRunner"]
]
EOF
)
This CL was uploaded by git cl split.
R=boliu@chromium.org, tsepez@chromium.org
Bug: 968047
Change-Id: I346372d16a3856186ea74d14e0dd8a12f7cacae5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729589
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683554}
devtools:// scheme
This change replaces the chrome-devtools:// URL scheme, with a more
browser-agnostic equivalent.
Naturally, many files had to be touched, but it's mostly a
straightforward find/replace.
A related change is out against the catapult repo here:
https://chromium-review.googlesource.com/c/catapult/+/1606268,
which removes a test file containing the old scheme. Once it goes in,
the root DEPS file in the chromium repo needs to be updated as well.
Note:
This is a continuation of patch 1552143, but since Fabio is out on
leave and I don't have permissions to upload to his patch, I needed to
start a new one.
Bug: 960409
Change-Id: I3ede7f8d1dcbca457167eb3641ae60e9685d8d78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1582881
Commit-Queue: James Lissiak <jalissia@microsoft.com>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659944}
Part of an effort to send better cookie information, and more specifically information as to *when* any *why* a cookie has been blocked from sending or storing.
Matt: //net
Maks: //service
Elly: //ios
Jochen: //chrome and //content
Torne: //android_webview
Bug: 856777
Change-Id: Ide937b3d00e0d1aca2d5155c21310fa072b022df
Reviewed-on: https://chromium-review.googlesource.com/c/1470931
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Aaron Tagliaboschi <aarontag@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634238}
Add suppoort to clear the code cache that are accessed over a
date range and/or that match particular URL. Earlier we used
to clear the entire cache by ignoring these filters.
Bug: chromium:866419
Change-Id: I9b9a6f388d6629e0e95eb7a010fe46f08e3fda96
Reviewed-on: https://chromium-review.googlesource.com/c/1396221
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626514}
Added CookieWithStatus and CookieStatusList typedefs to clean things up a little
TBRing reviewers:
jochen: Mostly mechanical changes all over the place. render_frame_message_filter.cc has a helper function that might be interesting
Bug: 856777
Change-Id: Icd8d4348623a602540cf5aca2865e190359d379d
Reviewed-on: https://chromium-review.googlesource.com/c/1416151
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Aaron Tagliaboschi <aarontag@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625977}
Since read and write involves multiple operations (for ex: open entry,
create entry, write data) it is possible that these operations overlap
and we may read an incomplete entry. Hence it is safer to serialize
the operations at the GeneratedCodeCache layer.
Bug: 886892
Change-Id: Idc26079b6e3d4682a030b9ba04b11c624119dad4
Reviewed-on: https://chromium-review.googlesource.com/c/1398085
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623676}
Conversion done at API boundaries is minimal.
There are no functional changes.
Bug: 915773
Change-Id: I99c8157cde329a24d2bcaeb868c5ddf1fbffddc1
Reviewed-on: https://chromium-review.googlesource.com/c/1378978
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617534}
- Adds kWasmCodeCache to blink::features.
- Checks if enabled before creating the cache in the browser.
- Checks if enabled before fetching from cache in renderer.
This is patterned after the Javascript IsolatedCodeCache feature.
Bug: chromium:719172
Change-Id: I1ffea5d8029b2b550c45e3ba25821889c7c2183c
Reviewed-on: https://chromium-review.googlesource.com/c/1341071
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609705}
Code in chrome/browser/browsing_data queries storage back-ends for
origins and the size on disk and last modified time of each origin's
data. This is done for each storage backend by unique plumbing between
a BrowsingDataXXXHelper and the corresponding XXXContext via the
BrowsingContext's StoragePartition. The same data (list of
origin/size/time tuples) is reported for each storage backend.
Replace structs specific to each type (e.g. XXXUsageInfo) with a
generic StorageUsageInfo struct. This removes several nearly identical
classes from content/public/browser (for Indexed DB, Cache Storage
API, Local Storage, Service Worker). Follow ons can remove similar
classes (e.g. PendingXXXUsageInfo) and do other code deduplication.
One functional change: The list of scopes registered for Service
Workers is no longer displayed in the "cookies tree"
(chrome://settings/siteData); this is not useful for end users and
developers should use devtools instead.
Change-Id: Ibd759c3e303188580aea8bfcaa450b44183bc100
Reviewed-on: https://chromium-review.googlesource.com/c/1308074
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605521}
Rebuild leveldb for LocalStorage when deleting all cookies. This will
remove traces of deleted data from disk.
This change adds a RewriteDB() method to leveldb.mojom and adds
handling of error cases, where the database service becomes unusable
and closes the mojo connection.
TBR: michaelbai@chromium.org
Bug: 823071
Change-Id: I639ce21d7578d19e45ea9b7329b6ccbdfab8b527
Reviewed-on: https://chromium-review.googlesource.com/c/1162172
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Paul Meyer <paulmeyer@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603057}
Http caches are owned by network service when network service is enabled
otherwise they are owned by browser thread. HttpCaches are cleared by
StoragePartitionHttpDataRemover on browser thread when network service
is not enabled. However, with network service enabled they are cleared by
a different mechanism by the network service.
GeneratedCodeCaches are owned by the browser process and clearing them
should be cleared by the browser process. Hence clearing the
GeneratedCodeCache along with HttpCaches in StoragePartitionDataRemover
doesn't work. This cl refactors the clearing of code caches into a separate
class, so it can be used both with and without network service.
Bug: chromium:892652
Change-Id: I5238de412f35f3dc90ae69c37b76e83d34a0d089
Reviewed-on: https://chromium-review.googlesource.com/c/1270946
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601897}
Add support that lets embedder specify if code caching is enabled
and if enabled the disk size that can be used by the cache. By default
code caching is disabled. This cl also adds implementation for chrome
that enables code caching.
Bug: chromium:867552
Change-Id: I6edb4c0c4f3830d44731225ec91c5e95005be9da
Reviewed-on: https://chromium-review.googlesource.com/c/1213093
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601524}