Real instance methods for BrowserContext: remaining 5 methods.
This CL refactors non-overridable (i.e. implemented only within
//content) methods of `BrowserContext`, so that they are implemented as
instance methods (rather than as `static` methods taking a `self`
argument). This particular CL refactors the following methods:
- GetMountPoints
- GetSharedCorsOriginAccessList
- EnsureResourceContextInitialized
- NotifyWillBeDestroyed
- SaveSessionState
For the rationale/motivation for this change, please see the CL
description of an earlier CL in this series - r877482.
Bug: 1179776
Change-Id: Ia72acf439e857685592193618baa6d4167983c9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2892048
Commit-Queue: Łukasz Anforowicz <[email protected]>
Commit-Queue: Charlie Reis <[email protected]>
Auto-Submit: Łukasz Anforowicz <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Reviewed-by: Trent Apted <[email protected]>
Owners-Override: Charlie Reis <[email protected]>
Cr-Commit-Position: refs/heads/master@{#884783}
diff --git a/chrome/browser/platform_util_unittest.cc b/chrome/browser/platform_util_unittest.cc
index 5212e4f..4456b23 100644
--- a/chrome/browser/platform_util_unittest.cc
+++ b/chrome/browser/platform_util_unittest.cc
@@ -54,7 +54,7 @@
std::vector<std::unique_ptr<storage::FileSystemBackend>>*
additional_backends) override {
storage::ExternalMountPoints* external_mount_points =
- content::BrowserContext::GetMountPoints(browser_context);
+ browser_context->GetMountPoints();
// New FileSystemBackend that uses our MockSpecialStoragePolicy.
additional_backends->push_back(
@@ -81,9 +81,9 @@
content::SetBrowserClientForTesting(content_browser_client_.get());
// The test_directory needs to be mounted for it to be accessible.
- content::BrowserContext::GetMountPoints(GetProfile())
- ->RegisterFileSystem("test", storage::kFileSystemTypeLocal,
- storage::FileSystemMountOption(), test_directory);
+ GetProfile()->GetMountPoints()->RegisterFileSystem(
+ "test", storage::kFileSystemTypeLocal, storage::FileSystemMountOption(),
+ test_directory);
// To test opening a file, we are going to register a mock extension that
// handles .txt files. The extension doesn't actually need to exist due to