GetCachePath replaced with GetGeneratedCodeCacheSettings

https://chromium-review.googlesource.com/c/1301973

https://chromium-review.googlesource.com/c/chromium/src/+/1213093
This commit is contained in:
Jeremy Apthorp 2019-01-09 12:16:33 -08:00
parent ef80cc3d56
commit 96f9611cf4
4 changed files with 13 additions and 6 deletions

View file

@ -525,6 +525,17 @@ AtomBrowserClient::CreateQuotaPermissionContext() {
return new AtomQuotaPermissionContext;
}
content::GeneratedCodeCacheSettings
AtomBrowserClient::GetGeneratedCodeCacheSettings(
content::BrowserContext* context) {
// TODO(deepak1556): Use platform cache directory.
base::FilePath cache_path = context->GetPath();
// If we pass 0 for size, disk_cache will pick a default size using the
// heuristics based on available disk size. These are implemented in
// disk_cache::PreferredCacheSize in net/disk_cache/cache_util.cc.
return content::GeneratedCodeCacheSettings(true, 0, cache_path);
}
void AtomBrowserClient::AllowCertificateError(
content::WebContents* web_contents,
int cert_error,

View file

@ -91,6 +91,8 @@ class AtomBrowserClient : public content::ContentBrowserClient,
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
std::string GetGeolocationApiKey() override;
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings(
content::BrowserContext* context) override;
void AllowCertificateError(
content::WebContents* web_contents,
int cert_error,

View file

@ -191,11 +191,6 @@ base::FilePath AtomBrowserContext::GetPath() const {
return path_;
}
base::FilePath AtomBrowserContext::GetCachePath() const {
// TODO(deepak1556): Use platform cache directory.
return path_;
}
bool AtomBrowserContext::IsOffTheRecord() const {
return in_memory_;
}

View file

@ -60,7 +60,6 @@ class AtomBrowserContext
// content::BrowserContext:
base::FilePath GetPath() const override;
base::FilePath GetCachePath() const override;
bool IsOffTheRecord() const override;
content::ResourceContext* GetResourceContext() override;
std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(