Commit 8c1ea7c7 authored by Andrey Kosyakov's avatar Andrey Kosyakov Committed by Commit Bot

DevTools: do not enable temp file system in incognito

This effectively reverts https://codereview.chromium.org/2556803003/
as we're now using a different approach since
https://chromium-review.googlesource.com/569119
The original fix did not work anyway, see
https://bugs.chromium.org/p/chromium/issues/detail?id=490148#c17 for details.

Bug: 490148, 553246
Change-Id: Id8c395eeaf3ed1c9e8404f11705ab147869a4ff1
Reviewed-on: https://chromium-review.googlesource.com/570197Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486930}
parent a15cf3ca
......@@ -15,8 +15,6 @@
#include "chrome/common/url_constants.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_frontend_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
......@@ -27,7 +25,6 @@
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_context_getter.h"
#include "storage/browser/fileapi/file_system_context.h"
#include "third_party/WebKit/public/public_features.h"
using content::BrowserThread;
......@@ -351,13 +348,6 @@ DevToolsUI::DevToolsUI(content::WebUI* web_ui)
content::URLDataSource::Add(
profile,
new DevToolsDataSource(profile->GetRequestContext()));
if (!profile->IsOffTheRecord())
return;
GURL url = web_ui->GetWebContents()->GetVisibleURL();
GURL site = content::SiteInstance::GetSiteForURL(profile, url);
content::BrowserContext::GetStoragePartitionForSite(profile, site)->
GetFileSystemContext()->EnableTemporaryFileSystemInIncognito();
}
DevToolsUI::~DevToolsUI() {
......
......@@ -478,9 +478,11 @@ FileSystemURL FileSystemContext::CreateCrackedFileSystemURL(
return CrackFileSystemURL(FileSystemURL(origin, type, path));
}
#if defined(OS_CHROMEOS)
void FileSystemContext::EnableTemporaryFileSystemInIncognito() {
sandbox_backend_->set_enable_temporary_file_system_in_incognito(true);
}
#endif
bool FileSystemContext::CanServeURLRequest(const FileSystemURL& url) const {
// We never support accessing files in isolated filesystems via an URL.
......
......@@ -17,6 +17,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner_helpers.h"
#include "build/build_config.h"
#include "storage/browser/fileapi/file_system_url.h"
#include "storage/browser/fileapi/open_file_system_mode.h"
#include "storage/browser/fileapi/plugin_private_file_system_backend.h"
......@@ -281,7 +282,10 @@ class STORAGE_EXPORT FileSystemContext
FileSystemType type,
const base::FilePath& path) const;
#if defined(OS_CHROMEOS)
// Used only on ChromeOS for now.
void EnableTemporaryFileSystemInIncognito();
#endif
SandboxFileSystemBackendDelegate* sandbox_delegate() {
return sandbox_delegate_.get();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment