Change FileSystemContext::OpenPluginPrivateFileSystem to use url::Origin
This CL update the function FileSystemContext::OpenPluginPrivateFileSystem to use url::Origin instead of GURL. Bug: 598424 Change-Id: I6d5b6326036d5e8c82eaa2e8863aa3cd664735d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040977 Reviewed-by: Joshua Bell <jsbell@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Commit-Queue: Md. Hasanur Rashid <hasanur.r@samsung.com> Cr-Commit-Position: refs/heads/master@{#739823}
This commit is contained in:

committed by
Commit Bot

parent
72f207b892
commit
ecfe103b8f
chrome/browser/browsing_data
content/browser
storage/browser/file_system
@ -195,8 +195,8 @@ class BrowsingDataMediaLicenseHelperTest : public testing::Test {
|
||||
ppapi::kPluginPrivateRootName, base::FilePath());
|
||||
EXPECT_TRUE(storage::ValidateIsolatedFileSystemId(fsid));
|
||||
filesystem_context_->OpenPluginPrivateFileSystem(
|
||||
origin, storage::kFileSystemTypePluginPrivate, fsid, plugin_name,
|
||||
storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
||||
url::Origin::Create(origin), storage::kFileSystemTypePluginPrivate,
|
||||
fsid, plugin_name, storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
||||
base::Bind(&BrowsingDataMediaLicenseHelperTest::OnFileSystemOpened,
|
||||
base::Unretained(this), await_completion.NotifyClosure()));
|
||||
await_completion.BlockUntilNotified();
|
||||
|
@ -146,7 +146,7 @@ void CdmStorageImpl::Open(const std::string& file_name, OpenCallback callback) {
|
||||
origin().GetURL(), fsid, ppapi::kPluginPrivateRootName);
|
||||
|
||||
file_system_context_->OpenPluginPrivateFileSystem(
|
||||
origin().GetURL(), storage::kFileSystemTypePluginPrivate, fsid,
|
||||
origin(), storage::kFileSystemTypePluginPrivate, fsid,
|
||||
cdm_file_system_id_, storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
||||
base::BindOnce(&CdmStorageImpl::OnFileSystemOpened,
|
||||
weak_factory_.GetWeakPtr()));
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "storage/browser/file_system/obfuscated_file_util.h"
|
||||
#include "storage/browser/quota/special_storage_policy.h"
|
||||
#include "storage/common/file_system/file_system_util.h"
|
||||
#include "url/origin.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
@ -127,8 +128,8 @@ void PluginPrivateDataByOriginChecker::CheckFilesOnIOThread() {
|
||||
|
||||
IncrementTaskCount();
|
||||
filesystem_context_->OpenPluginPrivateFileSystem(
|
||||
origin_, storage::kFileSystemTypePluginPrivate, fsid_, plugin_name_,
|
||||
storage::OPEN_FILE_SYSTEM_FAIL_IF_NONEXISTENT,
|
||||
url::Origin::Create(origin_), storage::kFileSystemTypePluginPrivate,
|
||||
fsid_, plugin_name_, storage::OPEN_FILE_SYSTEM_FAIL_IF_NONEXISTENT,
|
||||
base::BindOnce(&PluginPrivateDataByOriginChecker::OnFileSystemOpened,
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
@ -310,8 +310,8 @@ void PepperFileSystemBrowserHost::OpenPluginPrivateFileSystem(
|
||||
}
|
||||
|
||||
file_system_context->OpenPluginPrivateFileSystem(
|
||||
origin, storage::kFileSystemTypePluginPrivate, fsid, plugin_id,
|
||||
storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
||||
url::Origin::Create(origin), storage::kFileSystemTypePluginPrivate, fsid,
|
||||
plugin_id, storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
||||
base::BindOnce(
|
||||
&PepperFileSystemBrowserHost::OpenPluginPrivateFileSystemComplete,
|
||||
weak_factory_.GetWeakPtr(), reply_context, fsid));
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "storage/browser/file_system/file_system_operation_context.h"
|
||||
#include "storage/browser/file_system/isolated_context.h"
|
||||
#include "storage/common/file_system/file_system_util.h"
|
||||
#include "url/origin.h"
|
||||
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||
|
||||
using net::CanonicalCookie;
|
||||
@ -472,8 +473,8 @@ class RemovePluginPrivateDataTester {
|
||||
ppapi::kPluginPrivateRootName, base::FilePath());
|
||||
EXPECT_TRUE(storage::ValidateIsolatedFileSystemId(fsid));
|
||||
filesystem_context_->OpenPluginPrivateFileSystem(
|
||||
origin, storage::kFileSystemTypePluginPrivate, fsid, plugin_name,
|
||||
storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
||||
url::Origin::Create(origin), storage::kFileSystemTypePluginPrivate,
|
||||
fsid, plugin_name, storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
||||
base::BindOnce(&RemovePluginPrivateDataTester::OnFileSystemOpened,
|
||||
base::Unretained(this), &await_completion));
|
||||
await_completion.BlockUntilNotified();
|
||||
|
@ -494,7 +494,7 @@ bool FileSystemContext::CanServeURLRequest(const FileSystemURL& url) const {
|
||||
}
|
||||
|
||||
void FileSystemContext::OpenPluginPrivateFileSystem(
|
||||
const GURL& origin_url,
|
||||
const url::Origin& origin,
|
||||
FileSystemType type,
|
||||
const std::string& filesystem_id,
|
||||
const std::string& plugin_id,
|
||||
@ -502,8 +502,7 @@ void FileSystemContext::OpenPluginPrivateFileSystem(
|
||||
StatusCallback callback) {
|
||||
DCHECK(plugin_private_backend_);
|
||||
plugin_private_backend_->OpenPrivateFileSystem(
|
||||
url::Origin::Create(origin_url), type, filesystem_id, plugin_id, mode,
|
||||
std::move(callback));
|
||||
origin, type, filesystem_id, plugin_id, mode, std::move(callback));
|
||||
}
|
||||
|
||||
FileSystemContext::~FileSystemContext() {
|
||||
|
@ -297,7 +297,7 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) FileSystemContext
|
||||
|
||||
// This must be used to open 'plugin private' filesystem.
|
||||
// See "plugin_private_file_system_backend.h" for more details.
|
||||
void OpenPluginPrivateFileSystem(const GURL& origin_url,
|
||||
void OpenPluginPrivateFileSystem(const url::Origin& origin,
|
||||
FileSystemType type,
|
||||
const std::string& filesystem_id,
|
||||
const std::string& plugin_id,
|
||||
|
Reference in New Issue
Block a user