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

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: big delta 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate( 246 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate(
247 WebContents* web_contents) { 247 WebContents* web_contents) {
248 return CreateShellWebContentsViewDelegate(web_contents); 248 return CreateShellWebContentsViewDelegate(web_contents);
249 } 249 }
250 250
251 QuotaPermissionContext* 251 QuotaPermissionContext*
252 ShellContentBrowserClient::CreateQuotaPermissionContext() { 252 ShellContentBrowserClient::CreateQuotaPermissionContext() {
253 return new ShellQuotaPermissionContext(); 253 return new ShellQuotaPermissionContext();
254 } 254 }
255 255
256 void ShellContentBrowserClient::GetTemporaryStorageConfiguration(
257 BrowserContext* context,
258 const base::FilePath& partition_path, bool is_incognito,
259 const storage::TemporaryStorageConfigurationCallback& callback) {
260 // We use simple hard coded values for content_shell.
261 const int kMB = 1024 * 1024;
262 storage::TemporaryStorageConfiguration config;
jsbell 2016/10/17 23:56:54 Lots of repetitions of these common values across
michaeln 2016/10/26 21:47:53 good idea, i haven't done this yet, i'll look at t
263 config.per_host_quota = 10 * kMB;
264 config.pool_size = 50 * kMB;
265 config.must_remain_available = 10 * kMB;
266 config.refresh_interval = base::TimeDelta::Max();
267 callback.Run(config);
268 }
269
256 void ShellContentBrowserClient::SelectClientCertificate( 270 void ShellContentBrowserClient::SelectClientCertificate(
257 WebContents* web_contents, 271 WebContents* web_contents,
258 net::SSLCertRequestInfo* cert_request_info, 272 net::SSLCertRequestInfo* cert_request_info,
259 std::unique_ptr<ClientCertificateDelegate> delegate) { 273 std::unique_ptr<ClientCertificateDelegate> delegate) {
260 if (!select_client_certificate_callback_.is_null()) 274 if (!select_client_certificate_callback_.is_null())
261 select_client_certificate_callback_.Run(); 275 select_client_certificate_callback_.Run();
262 } 276 }
263 277
264 SpeechRecognitionManagerDelegate* 278 SpeechRecognitionManagerDelegate*
265 ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { 279 ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 ShellBrowserContext* ShellContentBrowserClient::browser_context() { 363 ShellBrowserContext* ShellContentBrowserClient::browser_context() {
350 return shell_browser_main_parts_->browser_context(); 364 return shell_browser_main_parts_->browser_context();
351 } 365 }
352 366
353 ShellBrowserContext* 367 ShellBrowserContext*
354 ShellContentBrowserClient::off_the_record_browser_context() { 368 ShellContentBrowserClient::off_the_record_browser_context() {
355 return shell_browser_main_parts_->off_the_record_browser_context(); 369 return shell_browser_main_parts_->off_the_record_browser_context();
356 } 370 }
357 371
358 } // namespace content 372 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698