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

Side by Side Diff: content/browser/storage_partition_impl.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: poolSize Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/storage_partition_impl.h" 5 #include "content/browser/storage_partition_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/sequenced_task_runner.h" 14 #include "base/sequenced_task_runner.h"
15 #include "base/single_thread_task_runner.h" 15 #include "base/single_thread_task_runner.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "content/browser/browser_main_loop.h" 17 #include "content/browser/browser_main_loop.h"
18 #include "content/browser/fileapi/browser_file_system_helper.h" 18 #include "content/browser/fileapi/browser_file_system_helper.h"
19 #include "content/browser/gpu/shader_disk_cache.h" 19 #include "content/browser/gpu/shader_disk_cache.h"
20 #include "content/browser/host_zoom_map_impl.h" 20 #include "content/browser/host_zoom_map_impl.h"
21 #include "content/browser/notifications/platform_notification_context_impl.h" 21 #include "content/browser/notifications/platform_notification_context_impl.h"
22 #include "content/common/dom_storage/dom_storage_types.h" 22 #include "content/common/dom_storage/dom_storage_types.h"
23 #include "content/public/browser/browser_context.h" 23 #include "content/public/browser/browser_context.h"
24 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 #include "content/public/browser/content_browser_client.h"
25 #include "content/public/browser/dom_storage_context.h" 26 #include "content/public/browser/dom_storage_context.h"
26 #include "content/public/browser/indexed_db_context.h" 27 #include "content/public/browser/indexed_db_context.h"
27 #include "content/public/browser/local_storage_usage_info.h" 28 #include "content/public/browser/local_storage_usage_info.h"
28 #include "content/public/browser/session_storage_usage_info.h" 29 #include "content/public/browser/session_storage_usage_info.h"
30 #include "content/public/common/content_client.h"
29 #include "net/base/completion_callback.h" 31 #include "net/base/completion_callback.h"
30 #include "net/base/net_errors.h" 32 #include "net/base/net_errors.h"
31 #include "net/cookies/canonical_cookie.h" 33 #include "net/cookies/canonical_cookie.h"
32 #include "net/cookies/cookie_monster.h" 34 #include "net/cookies/cookie_monster.h"
33 #include "net/url_request/url_request_context.h" 35 #include "net/url_request/url_request_context.h"
34 #include "net/url_request/url_request_context_getter.h" 36 #include "net/url_request/url_request_context_getter.h"
35 #include "storage/browser/database/database_tracker.h" 37 #include "storage/browser/database/database_tracker.h"
36 #include "storage/browser/quota/quota_manager.h" 38 #include "storage/browser/quota/quota_manager.h"
37 39
38 #if defined(ENABLE_PLUGINS) 40 #if defined(ENABLE_PLUGINS)
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 438
437 // All of the clients have to be created and registered with the 439 // All of the clients have to be created and registered with the
438 // QuotaManager prior to the QuotaManger being used. We do them 440 // QuotaManager prior to the QuotaManger being used. We do them
439 // all together here prior to handing out a reference to anything 441 // all together here prior to handing out a reference to anything
440 // that utilizes the QuotaManager. 442 // that utilizes the QuotaManager.
441 scoped_refptr<storage::QuotaManager> quota_manager = 443 scoped_refptr<storage::QuotaManager> quota_manager =
442 new storage::QuotaManager( 444 new storage::QuotaManager(
443 in_memory, partition_path, 445 in_memory, partition_path,
444 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(), 446 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(),
445 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), 447 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(),
446 context->GetSpecialStoragePolicy()); 448 context->GetSpecialStoragePolicy(),
449 GetContentClient()->browser()->
450 GetTemporaryStorageConfigurationFunction(context));
447 451
448 // Each consumer is responsible for registering its QuotaClient during 452 // Each consumer is responsible for registering its QuotaClient during
449 // its construction. 453 // its construction.
450 scoped_refptr<storage::FileSystemContext> filesystem_context = 454 scoped_refptr<storage::FileSystemContext> filesystem_context =
451 CreateFileSystemContext( 455 CreateFileSystemContext(
452 context, partition_path, in_memory, quota_manager->proxy()); 456 context, partition_path, in_memory, quota_manager->proxy());
453 457
454 scoped_refptr<storage::DatabaseTracker> database_tracker = 458 scoped_refptr<storage::DatabaseTracker> database_tracker =
455 new storage::DatabaseTracker( 459 new storage::DatabaseTracker(
456 partition_path, in_memory, context->GetSpecialStoragePolicy(), 460 partition_path, in_memory, context->GetSpecialStoragePolicy(),
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 net::URLRequestContextGetter* url_request_context) { 917 net::URLRequestContextGetter* url_request_context) {
914 url_request_context_ = url_request_context; 918 url_request_context_ = url_request_context;
915 } 919 }
916 920
917 void StoragePartitionImpl::SetMediaURLRequestContext( 921 void StoragePartitionImpl::SetMediaURLRequestContext(
918 net::URLRequestContextGetter* media_url_request_context) { 922 net::URLRequestContextGetter* media_url_request_context) {
919 media_url_request_context_ = media_url_request_context; 923 media_url_request_context_ = media_url_request_context;
920 } 924 }
921 925
922 } // namespace content 926 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698