summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 00:37:55 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 00:37:55 +0000
commitf13b26860ded8ae0cce7cdd9ff474f28ae8dd3da (patch)
tree69d292b6e8c5ec92c448940f98b1e8650085cb65 /content
parent0e77178ac3e91318a3b26d25e003d8dff6977a58 (diff)
downloadchromium_src-f13b26860ded8ae0cce7cdd9ff474f28ae8dd3da.zip
chromium_src-f13b26860ded8ae0cce7cdd9ff474f28ae8dd3da.tar.gz
chromium_src-f13b26860ded8ae0cce7cdd9ff474f28ae8dd3da.tar.bz2
Access the QuotaManager via a StoragePartition to support the isolated app feature.
BUG=85121 Review URL: https://chromiumcodereview.appspot.com/10834264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/browser_context.cc7
-rw-r--r--content/browser/fileapi/file_system_browsertest.cc5
-rw-r--r--content/browser/in_process_webkit/indexed_db_browsertest.cc5
-rw-r--r--content/browser/storage_partition_impl_map.cc4
-rw-r--r--content/public/browser/browser_context.h2
5 files changed, 10 insertions, 13 deletions
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 4916ea0..4d1ef83 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -99,13 +99,6 @@ DownloadManager* BrowserContext::GetDownloadManager(
context, kDownloadManagerKeyName);
}
-quota::QuotaManager* BrowserContext::GetQuotaManager(
- BrowserContext* browser_context) {
- // TODO(ajwong): Change this API to require a SiteInstance instead of
- // using GetDefaultStoragePartition().
- return GetDefaultStoragePartition(browser_context)->GetQuotaManager();
-}
-
IndexedDBContext* BrowserContext::GetIndexedDBContext(
BrowserContext* browser_context) {
// TODO(ajwong): Change this API to require a SiteInstance instead of
diff --git a/content/browser/fileapi/file_system_browsertest.cc b/content/browser/fileapi/file_system_browsertest.cc
index 6e38deb..68b7f55 100644
--- a/content/browser/fileapi/file_system_browsertest.cc
+++ b/content/browser/fileapi/file_system_browsertest.cc
@@ -10,6 +10,7 @@
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/shell/shell.h"
@@ -55,8 +56,8 @@ class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest {
kInitialQuotaKilobytes * 1024 * QuotaManager::kPerHostTemporaryPortion;
SetTempQuota(
kTemporaryStorageQuotaMaxSize,
- BrowserContext::GetQuotaManager(
- shell()->web_contents()->GetBrowserContext()));
+ BrowserContext::GetDefaultStoragePartition(
+ shell()->web_contents()->GetBrowserContext())->GetQuotaManager());
}
static void SetTempQuota(int64 bytes, scoped_refptr<QuotaManager> qm) {
diff --git a/content/browser/in_process_webkit/indexed_db_browsertest.cc b/content/browser/in_process_webkit/indexed_db_browsertest.cc
index c1b0d3d..6458fee 100644
--- a/content/browser/in_process_webkit/indexed_db_browsertest.cc
+++ b/content/browser/in_process_webkit/indexed_db_browsertest.cc
@@ -17,6 +17,7 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
@@ -156,8 +157,8 @@ class IndexedDBBrowserTestWithLowQuota : public IndexedDBBrowserTest {
* 1024 * QuotaManager::kPerHostTemporaryPortion;
SetTempQuota(
kTemporaryStorageQuotaMaxSize,
- BrowserContext::GetQuotaManager(
- shell()->web_contents()->GetBrowserContext()));
+ BrowserContext::GetDefaultStoragePartition(
+ shell()->web_contents()->GetBrowserContext())->GetQuotaManager());
}
static void SetTempQuota(int64 bytes, scoped_refptr<QuotaManager> qm) {
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index fd62c98..9ea71830 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -86,6 +86,10 @@ void StoragePartitionImplMap::PostCreateInitialization(
partition->GetAppCacheService(),
browser_context_->IsOffTheRecord() ? FilePath() :
partition_path.Append(kAppCacheDirname),
+ // TODO(michaeln): This is not right, appcache will be
+ // using the cookies and cache of a the default
+ // partition when populating the cache.
+ // http://crbug.com/85121
browser_context_->GetResourceContext(),
make_scoped_refptr(
browser_context_->GetSpecialStoragePolicy())));
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index 53daea5..d87881b 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -23,7 +23,6 @@ class URLRequestContextGetter;
}
namespace quota {
-class QuotaManager;
class SpecialStoragePolicy;
}
@@ -56,7 +55,6 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
StoragePartitionCallback;
static DownloadManager* GetDownloadManager(BrowserContext* browser_context);
- static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context);
static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context);
static webkit_database::DatabaseTracker* GetDatabaseTracker(
BrowserContext* browser_context);