Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: content/shell/browser/shell_content_browser_client.cc

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate( 269 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate(
270 WebContents* web_contents) { 270 WebContents* web_contents) {
271 return CreateShellWebContentsViewDelegate(web_contents); 271 return CreateShellWebContentsViewDelegate(web_contents);
272 } 272 }
273 273
274 QuotaPermissionContext* 274 QuotaPermissionContext*
275 ShellContentBrowserClient::CreateQuotaPermissionContext() { 275 ShellContentBrowserClient::CreateQuotaPermissionContext() {
276 return new ShellQuotaPermissionContext(); 276 return new ShellQuotaPermissionContext();
277 } 277 }
278 278
279 void ShellContentBrowserClient::GetTemporaryStorageConfiguration(
280 BrowserContext* context,
281 const base::FilePath& partition_path, bool is_incognito,
282 const storage::TemporaryStorageConfigurationCallback& callback) {
283 // We use simple hard coded values for content_shell.
284 const int kMB = 1024 * 1024;
285 storage::TemporaryStorageConfiguration config;
286 config.per_host_quota = 10 * kMB;
287 config.pool_size = 50 * kMB;
288 config.must_remain_available = 10 * kMB;
289 config.refresh_interval = base::TimeDelta::Max();
290 callback.Run(config);
291 }
292
279 void ShellContentBrowserClient::SelectClientCertificate( 293 void ShellContentBrowserClient::SelectClientCertificate(
280 WebContents* web_contents, 294 WebContents* web_contents,
281 net::SSLCertRequestInfo* cert_request_info, 295 net::SSLCertRequestInfo* cert_request_info,
282 std::unique_ptr<ClientCertificateDelegate> delegate) { 296 std::unique_ptr<ClientCertificateDelegate> delegate) {
283 if (!select_client_certificate_callback_.is_null()) 297 if (!select_client_certificate_callback_.is_null())
284 select_client_certificate_callback_.Run(); 298 select_client_certificate_callback_.Run();
285 } 299 }
286 300
287 SpeechRecognitionManagerDelegate* 301 SpeechRecognitionManagerDelegate*
288 ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { 302 ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 ShellBrowserContext* ShellContentBrowserClient::browser_context() { 386 ShellBrowserContext* ShellContentBrowserClient::browser_context() {
373 return shell_browser_main_parts_->browser_context(); 387 return shell_browser_main_parts_->browser_context();
374 } 388 }
375 389
376 ShellBrowserContext* 390 ShellBrowserContext*
377 ShellContentBrowserClient::off_the_record_browser_context() { 391 ShellContentBrowserClient::off_the_record_browser_context() {
378 return shell_browser_main_parts_->off_the_record_browser_context(); 392 return shell_browser_main_parts_->off_the_record_browser_context();
379 } 393 }
380 394
381 } // namespace content 395 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698