0
Commit Graph

239 Commits

Author SHA1 Message Date
Ayu Ishii
138fdbec08 WebSQL: Delete WebSQL data for Non-Android Platforms
This change deletes WebSQL data from Non-Android Platforms.
WebSQL has been removed by default from M119, and
deprecation trial has ended on May 28,2024 (M126) for
all platforms except Android WebView.

AppCache data cleanup has been removed because it was added
in 2020, and has lived for about 4 years.

Removal on Android WebView is tracked in
https://crbug.com/333756088.

Bug: 40910849
Change-Id: If7bd67a4f3871b7eedeb83a4e50984a1184d2972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5507087
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1314679}
2024-06-13 17:06:13 +00:00
Tom Sepez
80e9e6e546 Avoid two-arg base::HexEncode() and RandBytes() calls.
Force the compiler to deduce the correct size, thus vastly
simplifying the code.

-- fix else-after-return as noticed.

Change-Id: I50a5c3387e0ec7693e1d9a4f72f03e2a980e01da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5241357
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1254884}
2024-02-01 02:34:42 +00:00
Arthur Sonzogni
c686e8f4fd Rename {absl => std}::optional in //content/
Automated patch, intended to be effectively a no-op.

Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email&utm_source=footer

As of https://crrev.com/1204351, absl::optional is now a type alias for
std::optional. We should migrate toward it.

Script:
```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep \
      -e "^content" \
    | sort \
    | uniq \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
      -e "\.py" \
    | xargs sed -i "s/$1/$2/g"
}
replace "absl::make_optional" "std::make_optional"
replace "absl::optional" "std::optional"
replace "absl::nullopt" "std::nullopt"
replace "absl::in_place" "std::in_place"
replace "absl::in_place_t" "std::in_place_t"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"
git cl format
```

# Skipping unrelated "check_network_annotation" errors.
NOTRY=True

Bug: chromium:1500249
Change-Id: Icfd31a71d8faf63a2e8d5401127e7ee74cc1c413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185537
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245739}
2024-01-11 08:36:37 +00:00
Daniel Cheng
cb3ab647b4 Simplify BrowserContext::ForEachLoadedStoragePartition with FunctionRef.
base::RepeatingCallback is intended for asynchronous callbacks. In this
case, the callback is always synchronously invoked, so use
base::FunctionRef to make it easier to write adapter lambdas.

Change-Id: I77dba1bab5d95c4f44a2d62e51ceeb232493ba84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5050415
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Owners-Override: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1227827}
2023-11-22 06:41:59 +00:00
Andrew Rayskiy
3dfec413dd [Base] Introduce FindOrNull() and FindPtrOrNull()
These helpers simplify the process of finding the stored value for a
given key in STL-like maps.

Bug: None
Change-Id: I0976e6d66ec98269910757990414008ff95a9031
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4926655
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1209315}
2023-10-13 09:58:23 +00:00
Yao Xiao
58c2f2c8fd [Topics] Consolidate PrefetchURLLoaderService and BrowsingTopicsURLLoaderService
What: consolidate Prefetch & Topics URLLoaderService into a
single SubresourceProxyingURLLoaderService.

Why:
- It reduces the number of renderer->browser Mojo channels.
  Offline testing shows that this improves ~30 KB
  Memory.Browser.PrivateMemoryFootprint for each frame.
- This makes it easier to extend functions: future features (and
  the pre-existing KeepAlive factory) can all be consolidated into
  this service -- no need to plumb a new factory through layers
  each time.
- This also makes it possible to stack different types of
  requests (e.g. keep-alive & topics, when the keep-alive service
  gets consolidated as well).

Bug: 1444215
Change-Id: Iccee1ff169b6611ec47a9312642e805fd6d9edb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4520622
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1144877}
2023-05-16 20:05:18 +00:00
Xiyuan Xia
b24ccf3670 Revert "cros: Dispose storage partition used for gaia sign-in"
This reverts commit 36ea585db1.

http://crrev.com/c/3691982 introduced DisposeStoragePartition
to ditch the one-time storage partition used in ChromeOS sign-in.
It turns out it is unsafe to dispose SPs because they could
referenced later, even after <webview> referencing them are
destroyed. We hit UAF like in http://crbug/1382971. This CL
removes the unsafe API.

The memory issue will be fixed in a different way.

Bug: 1308831, b:260522812
Change-Id: Ic6d1b219037f8424bc8031415b7cd2e2238336fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4184936
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1095918}
2023-01-24 00:08:28 +00:00
Avi Drissman
adac219925 Update header includes for /base/functional in /content
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I32ec425b9c0e52ec4b50047bf3290fecc5c905ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4148554
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091567}
2023-01-11 23:46:39 +00:00
Sean Maher
5b9af51fdd task posting v3: moving away from ThreadTaskRunnerHandle
To continue the migration away from TaskRunnerHandles, the codebase
was refactored using the following scripts:
shell script:
https://paste.googleplex.com/4673967729147904
python:
https://paste.googleplex.com/5824001174667264

This will do a few sed-like modifications, changing calls to methods of
ThreadTaskRunnerHandle to calls to methods of
SingleThreadTaskRunner::CurrentDefaultHandle, and swapping includes.

Bug: 1026641
AX-Relnotes: n/a.
Change-Id: Ia33b6dfebb15937481c619f5c838720ce7bb2676
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4031817
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1074085}
2022-11-21 15:32:47 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Xiyuan Xia
36ea585db1 cros: Dispose storage partition used for gaia sign-in
Each gaia sign-in attempt creates an in-memory storage partition.
After the sign-in attempt, the storage partition needs to be disposed.
Otherwise, they are kept around indefinite, which wastes memory.

Bug: 1308831
Cq-Include-Trybots: luci.chromium.try:linux_chromium_chromeos_msan_rel_ng
Change-Id: I4631a2b1630ce6d37b863e3ec0aebc635c6179c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3691982
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1016742}
2022-06-22 16:17:23 +00:00
sbingler
39663321a0 Refactor ClearData to take StorageKey
This CL refactors the origin version of ClearData() to take a
StorageKey in place of the origin.

This change allows callers of the function to clear the data contained
in a partition addressed by any arbitrary StorageKey. However, no
behavior is changed as part of this CL, callers' origins are just
converted to StorageKeys.

Bug: 1319427
Change-Id: I92192c9845d6c30ca02045b7b1f3e46b45e089f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3702946
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Steven Bingler <bingler@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1016712}
2022-06-22 14:37:43 +00:00
Xiaohan Wang
06b7fdb48d base: Refactor base::GetDeleteFileCallback()
Instead of returning a generic callback and let the caller bind the path
as a parameter. This CL changes this function to take the `path` as a
parameter, so the caller doesn't need to call BindOnce() to bind the
path.

Same change for base::GetDeletePathRecursivelyCallback().

Bug: 1321695
Test: No functionality change
Change-Id: I45eb5217635e5fe1de6c1120ebaa99f0e068ad3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3632179
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1000422}
2022-05-06 17:08:52 +00:00
Jeremy Roman
9ec5db968e base: Return by value from FilePath::GetComponents instead of out-param.
Absolutely no call site ever does anything except call this on a newly
constructed vector, so this is much more natural. Some trivial
simplification is possible at call sites.

Change-Id: I989dd2ce569fe46afd2abc6b6cc325aa85e7225f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3456906
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#970764}
2022-02-14 19:46:34 +00:00
Lei Zhang
3ea7594623 Simplify BrowserContext::GarbageCollectStoragePartitions().
Just pass a std::unordered_set around, and don't bother wrapping it
inside a std::unique_ptr. Along the way, modernize / clean up its caller
and callee.

Change-Id: Ie4c451faea7e513df33c2ecfc1d48f7d32f3e271
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3400550
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Charles Reis <creis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#961489}
2022-01-20 16:57:03 +00:00
Xiaohan Wang
1ecfd006fd content: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: Ia0eae6f9396065e190929d42600012c9324c07e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3399774
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Owners-Override: Xiaohan Wang <xhwang@chromium.org>
Auto-Submit: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#961157}
2022-01-19 22:33:10 +00:00
Hiroki Nakagawa
c2486a8eb4 ServiceWorker: Move ServiceWorkerUtils::ContainsDisallowedCharacter()
This is a part of the service worker onion soup project. This CL moves
ServiceWorkerUtils::ContainsDisallowedCharacter() in
content/common/service_worker/ to service_worker_scope_match in
blink/public/common/service_worker/.

In addition to that, this CL removes content/common/service_worker/ as
ServiceWorkerUtils::ContainsDisallowedCharacter() was the last function
in the directory.

Bug: 789857
Change-Id: Ifb57a08c8e1641182befd8b98d19c63e869037b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3312389
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#948934}
2021-12-07 11:58:51 +00:00
Peter Boström
1d6a095400 Remove unused "base/macros.h" in content/
Removes `#include "base/macros.h"` from files in content/ that do not
contain `ignore_result(`.

Bug: 1010217
No-Try: true
Change-Id: I887403408704241047e3bd66e953ff7df195368b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3274993
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940781}
2021-11-11 16:07:03 +00:00
Adrienne Walker
6be4e05629 appcache: remove uses of AppCacheService
Bug: 582750
Change-Id: I9ef4c051d2bce48403b3dc9eb054ba841e9f877c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3227478
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Mark Seaborn <mseaborn@chromium.org>
Auto-Submit: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#933578}
2021-10-20 19:13:37 +00:00
Patrick Monette
643cdf6190 Replace base/task/ temporary forward headers with their final locations
Note to QA: This merely changes includes and should not be blamed
for files it touched.

Bug: 1255932
Change-Id: I1ce4e31efd5792ebf2080812e665cae838a54972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3226943
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#932153}
2021-10-15 19:13:42 +00:00
Patrick Monette
3d7d70920a Replace task-related headers to their equivalent in base/task/
This CL was generated by using tools/git/move_source_file.py to change
the includes for those files:
base/bind_post_task.h
base/deferred_sequenced_task_runner.h
base/post_task_and_reply_with_result_internal.h
base/sequenced_task_runner.h
base/sequenced_task_runner_helpers.h
base/single_thread_task_runner.h
base/task_runner.h
base/task_runner_util.h
base/updateable_sequenced_task_runner.h

Then formatted using "git cl format". DEPS files were fixed with a
simple search and replace script.

Bug: 1255932
Change-Id: I0d9b5ddd9260fde5e4581e6c6e0080bdb0ed2c44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3209175
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929867}
2021-10-08 20:27:23 +00:00
Maria Petrisor
2d611d62e6 Add callback to extension uninstall
We added an optional callback to ExtensionService::UninstallExtension()
in order to be informed about when the extension data is safely deleted
(ExtensionService::UninstallExtensionOnFileThread() and
DataDeleter::StartDeleting()).

This is part of a bigger effort to create a data clean-up mechanism for
Chrome apps/extensions. Since Chrome apps/extensions don’t have a
built-in “reset” operation, we uninstall them to fully clear their state
(thus we need to wait for the data to be completely deleted) and
reinstall them back.

More details can be found here: go/imprivata-extension-data-cleanup

Bug: b:186737187
Change-Id: I49ef81af3b5573169ac681c137b3a00798817899
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3109967
Commit-Queue: Maria Petrisor <mpetrisor@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#917859}
2021-09-02 22:44:15 +00:00
Matt Falkenhagen
978d20c470 bgfetch: Remove PostTask workaround for BackgroundFetchContext init.
This is no longer needed as the linked bug is fixed. This CL also
removes up old comments/code that no longer appear relevant to this
function.

Bug: 960012
Change-Id: I346db797afa4899367ecd5527c10233cf3901f84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3055813
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#909110}
2021-08-05 23:32:01 +00:00
Victor Costan
2f6509e833 Cookie Store: Remove CookieStoreContext.
The CookieStoreContext class was responsible for straddling between the
UI thread and the service worker core thread. However, the service
workers implementation now always runs on the UI thread, so no thread
hopping is required.

Since the CookieStoreContext class has lost its responsibility, this
CL removes it.

Bug: 1138155
Change-Id: I8efbf0acdc6ac6a75805b7163a71fccabcb1c3d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3064416
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#908445}
2021-08-04 14:32:41 +00:00
Matt Falkenhagen
73efd47f2a bgfetch: Simplify now that service worker is on the UI thread (pt 1).
Change-Id: If9e516bc5eeb06c9dded1caea787a89ab227d9fb
Bug: 1138155
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3052884
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#908254}
2021-08-04 00:48:56 +00:00
Robbie McElrath
291fa5c3b6 [PWA] Add StoragePartitionConfig getter to StoragePartition
This CL adds a GetConfig() method to StoragePartition, which returns the
config used to create the StoragePartition. It also defines a new
StoragePartitionConfig::CreateForTesting helper to create
StoragePartitionConfig's without a BrowserContext.

Bug: 1212266, 1229912
Change-Id: I05cb1990121828a24c01d1956915b16559496e88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3027490
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#903702}
2021-07-20 23:39:08 +00:00
Anton Bikineev
f62d1bf48e content: Replace base::Optional and friends with absl counterparts
This replaces:
- base::Optional -> absl::optional
- include "base/optional.h"
  ->
  include "third_party/abseil-cpp/absl/types/optional.h"
- base::nullopt -> absl::nullopt
- base::make_optional -> absl::make_optional

Bug: 1202909
Change-Id: Ie9f37bcbf6115632a19f4d063387d07b3723926f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2897246
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883270}
2021-05-15 17:56:07 +00:00
Lei Zhang
b49a213e32 Remove unneeded base/strings/stringprintf.h includes.
List of files to delete from generated using the following command:

git grep -l base/strings/stringprintf.h | \
    xargs grep -L 'StringPrint[fV]' | xargs grep -L StringAppend | \
    grep -E '(cc|mm|h)$'

Change-Id: Ibc72245f08730b4d25283e2d966235b61513c7ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2849392
Reviewed-by: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#876365}
2021-04-26 23:48:55 +00:00
Gabriel Charette
c40dd9cd44 [BrowserThread] Migrate callers using dynamic BrowserTaskTraits
This CL is a no-op.

Expose BrowserThread::GetTaskRunnerForThread helper and use it to
migrate remaining callers of the old BrowserThread APIs going through
base::.

All other callers using static BrowserTaskTraits (i.e. pre-determined
at compile time, no variables) have already been migrated, these
are the only ones remaining.

Bug: 1026641
Change-Id: I7d068872bda21810e430ce4844f728e4e94c1b35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2787574
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#867554}
2021-03-30 11:00:11 +00:00
Adrienne Walker
e8161f4668 cachestorage: remove direct access to (Chrome)BlobStorageContext
This is a cleanup of a long-ago change I made to how cache storage got
initialized with the BlobStorageContext.  As cache storage is moving to
the storage service, it can't access BlobStorageContext directly
anymore.

This cleans up the initialization dance to pass in the remote at
construction time rather than a pointer much later on.  It also moves
BlobStorageContextWrapper (a sequence-bound refcounted remote) which is
only used by cache storage into the cache storage directory, as cache
storage will not be able to access blob_storage from the storage
service.

This is a reland of:
https://chromium-review.googlesource.com/c/chromium/src/+/2651182

Bug: 1147642,1172212
Change-Id: I1241abd435a1ccb316d04dcb706d4820db9eee63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2659226
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Auto-Submit: enne <enne@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850762}
2021-02-04 21:09:27 +00:00
Rune Lillesveen
f29f4d8172 Revert "cachestorage: remove direct access to (Chrome)BlobStorageContext"
This reverts commit e6a23b7939.

Reason for revert: https://crbug.com/1172212

Original change's description:
> cachestorage: remove direct access to (Chrome)BlobStorageContext
>
> This is a cleanup of a long-ago change I made to how cache storage got
> initialized with the BlobStorageContext.  As cache storage is moving to
> the storage service, it can't access BlobStorageContext directly
> anymore.
>
> This cleans up the initialization dance to pass in the remote at
> construction time rather than a pointer much later on.  It also moves
> BlobStorageContextWrapper (a sequence-bound refcounted remote) which is
> only used by cache storage into the cache storage directory, as cache
> storage will not be able to access blob_storage from the storage
> service.
>
> Bug: 1147642
> Change-Id: I8f41c5bca1cac12135eb85358fd1d49269693791
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2651182
> Auto-Submit: enne <enne@chromium.org>
> Reviewed-by: Jonathan Metzman <metzman@chromium.org>
> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
> Reviewed-by: Ben Kelly <wanderview@chromium.org>
> Commit-Queue: enne <enne@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#848320}

TBR=mek@chromium.org,enne@chromium.org,metzman@chromium.org,wanderview@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I7181f5866c49855db05dc365288da2e7dea68459
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1147642
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657823
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848491}
2021-01-29 13:17:34 +00:00
Adrienne Walker
e6a23b7939 cachestorage: remove direct access to (Chrome)BlobStorageContext
This is a cleanup of a long-ago change I made to how cache storage got
initialized with the BlobStorageContext.  As cache storage is moving to
the storage service, it can't access BlobStorageContext directly
anymore.

This cleans up the initialization dance to pass in the remote at
construction time rather than a pointer much later on.  It also moves
BlobStorageContextWrapper (a sequence-bound refcounted remote) which is
only used by cache storage into the cache storage directory, as cache
storage will not be able to access blob_storage from the storage
service.

Bug: 1147642
Change-Id: I8f41c5bca1cac12135eb85358fd1d49269693791
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2651182
Auto-Submit: enne <enne@chromium.org>
Reviewed-by: Jonathan Metzman <metzman@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848320}
2021-01-28 23:51:59 +00:00
danakj
db9ae7941a Rename includes from bind_helpers.h to callback_helpers.h
R=dcheng@chromium.org
NOPRESUBMIT=true
TBR=
NOTRY=true

Change-Id: I93bc6a9360997fae7adeab8c01f56e08fc025dd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523543
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826289}
2020-11-11 16:01:35 +00:00
John Abd-El-Malek
7081094241 Further simplify ProfileIOData now that service workers don't access it on the IO thread.
Bug: 908955, 997108, 997109, 990868
Change-Id: Ieb98aa1b22a8b16c45a41a523b562d7b091d01dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2500447
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821087}
2020-10-27 05:14:38 +00:00
Marijn Kruisselbrink
8ffda44d4b [FileAPI] Change BlobUrlRegistry to be per storage partition.
Different storage partitions should not be able to resolve blob URLs
created in other partitions. To ensure this, give each partition their
own blob url registry.

There is one exception though, a <webview> inside a chrome app should
be able to resolve blob URLs that were created by the chrome app. To
enable this, we add the concept of a "fallback url registry" to
BlobUrlRegistry, and pass the BlobUrlRegistry of the app in as fallback
when creating the storage partition for a <webview>.

Bug: 1106890
Change-Id: I809f24a2c0b4d8d21e53d46bb6d3e2027b21281b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324110
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Aaron Colwell <acolwell@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804321}
2020-09-03 18:29:47 +00:00
Adrienne Walker
d701f47939 appcache: delete appcache directory from profile when disabled
Once AppCache has been removed from Chrome, sites will have no way of
cleaning up user data in local profiles.  To fix this, when a storage
partition is accessed when AppCache has been disabled, we will delete
the AppCache directory from that profile directory.

This is a relanding of:
https://chromium-review.googlesource.com/c/chromium/src/+/2343588

Bug: 1081897
Change-Id: I14498094d0262c2806eb66ca3cfde85956d59d17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357071
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Auto-Submit: enne <enne@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799952}
2020-08-20 02:15:11 +00:00
Wez
d223c2a70c Revert "appcache: delete appcache directory from profile when disabled"
This reverts commit bd17f19837.

Reason for revert: Test is flaky, especially on Fuchsia bots.

Original change's description:
> appcache: delete appcache directory from profile when disabled
> 
> Once AppCache has been removed from Chrome, sites will have no way of
> cleaning up user data in local profiles.  To fix this, when a storage
> partition is accessed when AppCache has been disabled, we will delete
> the AppCache directory from that profile directory.
> 
> Bug: 1081897
> Change-Id: Iea404f7c83595ba1397fab4a5d3f97d1e3280916
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343588
> Commit-Queue: enne <enne@chromium.org>
> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#796938}

TBR=kinuko@chromium.org,mek@chromium.org,enne@chromium.org

Change-Id: Ic43fce0f9ad605a7bfb3a291a320e45d8c329b9d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1081897, 1115296
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351834
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797219}
2020-08-12 13:22:03 +00:00
Adrienne Walker
bd17f19837 appcache: delete appcache directory from profile when disabled
Once AppCache has been removed from Chrome, sites will have no way of
cleaning up user data in local profiles.  To fix this, when a storage
partition is accessed when AppCache has been disabled, we will delete
the AppCache directory from that profile directory.

Bug: 1081897
Change-Id: Iea404f7c83595ba1397fab4a5d3f97d1e3280916
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343588
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796938}
2020-08-11 19:20:48 +00:00
Adrienne Walker
840d717a82 appcache: don't create service when its feature is disabled
Currently, disabling AppCache by turning off blink::features::kAppCache
is a shallow disabling, in that the web api and the loader no longer use
it, and its preference is disabled, but the service is still created.

This is a step towards adding data deletion behavior when this feature
is disabled.  It doesn't make sense to delete the data folder when there
is still an appcache service that exists at runtime.

This patch makes the AppCache service optional and does not create it
when the kAppCache feature is disabled.

Bug: 1081897
Change-Id: I3a2a6cf4dd5bb8654a3c0da9ce310acff91766eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339920
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Auto-Submit: enne <enne@chromium.org>
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796715}
2020-08-11 05:55:57 +00:00
Lei Zhang
746ce47465 Rename base::DeleteFileRecursively() to DeletePathRecursively().
Take the name suggestion from several reviewers while converting
base::DeleteFile(path, true) calls.

Tbr: blundell@chromium.org,jamiewalch@chromium.org,jkarlin@chromium.org,kinuko@chromium.org,reillyg@chromium.org,sdefresne@chromium.org,xdai@chromium.org
Bug: 1009837
Change-Id: Ie0a3bbe7bae4844f4f29a4ffd63fd032128e599d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274676
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784327}
2020-07-01 04:39:45 +00:00
Bret Sepulveda
566521534d Reland "Add StoragePartitionConfig class."
This reverts commit e16ff9f100.

Reason for revert: Bot was still red after revert: https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Linux%20Leak/15944

Original change's description:
> Revert "Add StoragePartitionConfig class."
> 
> This reverts commit 225f6f4c82.
> 
> Reason for revert: I think this is causing failures in:
> virtual/omt-worker-fetch/external/wpt/workers/modules/dedicated-worker-import.any.worker.html
> http/tests/workers/worker-usecounter.html
> virtual/omt-worker-fetch/http/tests/workers/worker-usecounter.html
> and the "webkit_lint" step.
> See example failure: https://ci.chromium.org/p/chromium/builders/ci/Win10%20Tests%20x64/47132
> 
> Original change's description:
> > Add StoragePartitionConfig class.
> > 
> > Introducing StoragePartitionConfig to make it easier for code to
> > directly request the StoragePartition they need instead of having to
> > go through the indirection of site URLs. Grouping the 3 attributes of
> > a config into a class also makes several call sites simpler. This is
> > being done as part of an effort to reduce the amount of code that
> > depends on site URLs.
> > 
> > - Created class for storing the storage partition
> >   <domain, name, in_memory> tuple.
> > - Update GetStoragePartitionConfigForSite() and related code to use
> >   this new class.
> > - Create BrowserContest::GetStoragePartition() method that takes
> >   StoragePartitionConfig as a parameter so future callers do not need
> >   to construct a site URL to get a storage partition.
> > - Remove StoragePartitionImplMap::StoragePartitionConfig struct and
> >   convert StoragePartitionImplMap to use the new StoragePartitionConfig
> >   class.
> > 
> > Bug: 1085275
> > Change-Id: I6679ee79ce88cf7cbfdfeb2686452d0cfcc1a9c3
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253240
> > Commit-Queue: Aaron Colwell <acolwell@chromium.org>
> > Reviewed-by: Aaron Colwell <acolwell@chromium.org>
> > Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> > Reviewed-by: James MacLean <wjmaclean@chromium.org>
> > Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
> > Auto-Submit: Aaron Colwell <acolwell@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#781691}
> 
> TBR=acolwell@chromium.org,alexmos@chromium.org,karandeepb@chromium.org,wjmaclean@chromium.org
> 
> Change-Id: Iec47df87cb66a779d2d569e825c9b4ecccf1f2ef
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1085275
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2263216
> Reviewed-by: Bret Sepulveda <bsep@chromium.org>
> Commit-Queue: Bret Sepulveda <bsep@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#781798}

TBR=acolwell@chromium.org,alexmos@chromium.org,bsep@chromium.org,karandeepb@chromium.org,wjmaclean@chromium.org

# Not skipping CQ checks because this is a reland.

Bug: 1085275
Change-Id: I6eaf4a96de9e08f93e450f708cf6eea5c33ec5b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264292
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781864}
2020-06-24 14:47:13 +00:00
Bret Sepulveda
e16ff9f100 Revert "Add StoragePartitionConfig class."
This reverts commit 225f6f4c82.

Reason for revert: I think this is causing failures in:
virtual/omt-worker-fetch/external/wpt/workers/modules/dedicated-worker-import.any.worker.html
http/tests/workers/worker-usecounter.html
virtual/omt-worker-fetch/http/tests/workers/worker-usecounter.html
and the "webkit_lint" step.
See example failure: https://ci.chromium.org/p/chromium/builders/ci/Win10%20Tests%20x64/47132

Original change's description:
> Add StoragePartitionConfig class.
> 
> Introducing StoragePartitionConfig to make it easier for code to
> directly request the StoragePartition they need instead of having to
> go through the indirection of site URLs. Grouping the 3 attributes of
> a config into a class also makes several call sites simpler. This is
> being done as part of an effort to reduce the amount of code that
> depends on site URLs.
> 
> - Created class for storing the storage partition
>   <domain, name, in_memory> tuple.
> - Update GetStoragePartitionConfigForSite() and related code to use
>   this new class.
> - Create BrowserContest::GetStoragePartition() method that takes
>   StoragePartitionConfig as a parameter so future callers do not need
>   to construct a site URL to get a storage partition.
> - Remove StoragePartitionImplMap::StoragePartitionConfig struct and
>   convert StoragePartitionImplMap to use the new StoragePartitionConfig
>   class.
> 
> Bug: 1085275
> Change-Id: I6679ee79ce88cf7cbfdfeb2686452d0cfcc1a9c3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253240
> Commit-Queue: Aaron Colwell <acolwell@chromium.org>
> Reviewed-by: Aaron Colwell <acolwell@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Reviewed-by: James MacLean <wjmaclean@chromium.org>
> Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
> Auto-Submit: Aaron Colwell <acolwell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#781691}

TBR=acolwell@chromium.org,alexmos@chromium.org,karandeepb@chromium.org,wjmaclean@chromium.org

Change-Id: Iec47df87cb66a779d2d569e825c9b4ecccf1f2ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1085275
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2263216
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781798}
2020-06-24 10:48:36 +00:00
Aaron Colwell
225f6f4c82 Add StoragePartitionConfig class.
Introducing StoragePartitionConfig to make it easier for code to
directly request the StoragePartition they need instead of having to
go through the indirection of site URLs. Grouping the 3 attributes of
a config into a class also makes several call sites simpler. This is
being done as part of an effort to reduce the amount of code that
depends on site URLs.

- Created class for storing the storage partition
  <domain, name, in_memory> tuple.
- Update GetStoragePartitionConfigForSite() and related code to use
  this new class.
- Create BrowserContest::GetStoragePartition() method that takes
  StoragePartitionConfig as a parameter so future callers do not need
  to construct a site URL to get a storage partition.
- Remove StoragePartitionImplMap::StoragePartitionConfig struct and
  convert StoragePartitionImplMap to use the new StoragePartitionConfig
  class.

Bug: 1085275
Change-Id: I6679ee79ce88cf7cbfdfeb2686452d0cfcc1a9c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253240
Commit-Queue: Aaron Colwell <acolwell@chromium.org>
Reviewed-by: Aaron Colwell <acolwell@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Auto-Submit: Aaron Colwell <acolwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781691}
2020-06-24 03:51:52 +00:00
Lei Zhang
3190449f77 Add base::GetDeletePathRecursivelyCallback().
There exists some base::DeleteFileRecursively() callers that want to use
PostTask() APIs to delete a path on another task runner. To do so, they
currently write:

base::BindOnce(base::IgnoreResult(&base::DeleteFile), path, true)

To simply the callers, and help transition base::DeleteFile() to remove
its |recursive| boolean parameter, add
base::GetDeletePathRecursivelyCallback(). Now, callers can just write:

base::BindOnce(base::GetDeletePathRecursivelyCallback(), path)

Use base::GetDeletePathRecursivelyCallback() in chrome/ and content/,
and add a TODO note to rename base::DeleteFileRecursively() to
base::DeletePathRecursively().

Bug: 1009837
Change-Id: I9c229fa668dea13f0bf24f20eb6ce066ac1eca33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2204683
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777685}
2020-06-12 05:14:04 +00:00
Gabriel Charette
e7cdc5cd07 [BrowserThread] Migration callers without full content:: namespace
Note to QA: This CL is purely mechanical and shouldn't be blamed
for future regressions on touched files.

This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/2211138
which already removed all usage using content::BrowserThread.

Hence this script now matches unqualified BrowserThread:: without
risking having "content::" be selected as "traits_before" by the regex
(ran on same revision as step ).

content:: is now always added if outside namespace content {}
(deleting unused using content::BrowserThread; decls)

Script @ https://crbug.com/1026641#c92

(will TBR fdoray@ post-review for mechanical change)
TBR=fdoray@hchromium.org

AX-Relnotes: n/a.
Bug: 1026641
Change-Id: I51ae2f83eb17d19b54563fd9b4fc040d2aa0c948
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212469
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772458}
2020-05-27 23:35:05 +00:00
Gabriel Charette
9fb704a00b Mass-migrate users of base::ThreadPool() as a trait to base::ThreadPool:: API [content/]
Split content/ from https://chromium-review.googlesource.com/c/chromium/src/+/2026350
as it had trouble landing in one go.

The following script was used to generate this CL (run on every C++
file in the codebase; processing .h before matching .cc/.mm):
https://bugs.chromium.org/p/chromium/issues/detail?id=1026641#c22
(intentionally ignores cleaning post_task.h for now).

TBR=fdoray@chromium.org, tsepez@chromium.org

Bug: 1026641
Change-Id: I27c51f5648ea518122b90fde09f09b19afd07972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2074918
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744669}
2020-02-26 16:10:21 +00:00
danakj
151f8fdd0c Convert Callbacks to {Once,Repeating}Callback in content/browser/
Use OnceCallback where possible because the callback is only used once
and RepeatingCallback and BindRepeating otherwise.

Pass RepeatingCallback ownership by value instead of const ref.

R=avi@chromium.org

Bug: 1007760
Change-Id: I18ea04793d877ab91733dc3ecba363c2509ea68a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1961134
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723678}
2019-12-11 03:11:14 +00:00
danakj
6a28d7d586 Convert base::Bind to base::Bind{Once,Repeating} in content/public/.
Use OnceCallback where possible, otherwise rename to RepeatingCallback
and BindRepeating.

R=avi@chromium.org

Bug: 1007763
Change-Id: I06c210dafc3066d4b26da90e484d3099dcf28b4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1958891
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723401}
2019-12-10 18:56:29 +00:00
Aaron Colwell
dd0ae764d5 Replace site URL with partition_domain in BrowserContext::AsyncObliterateStoragePartition()
This change simply removes the need to wrap the extension ID in a site URL and then
immediately extract it to delete the partition. The partition_domain is always the
extension ID so I'm just making that fact explicit.

Bug: None
Change-Id: Ie138d70a3489d6bbdf927190ebb811664c47d398
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947813
Commit-Queue: Aaron Colwell <acolwell@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Auto-Submit: Aaron Colwell <acolwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722246}
2019-12-05 22:24:57 +00:00
Lei Zhang
eaaabcf79a Use base::DeleteFileRecursively() in 3 top-level dirs.
Make it more obvious "rm -rf" is happening, for content/, extensions/,
and storage/.

Bug: 1009837
Change-Id: Ia96e4a4149eb4389ba337d239a3c1be115f0f6e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1952195
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722084}
2019-12-05 17:29:09 +00:00