summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_special_storage_policy.cc4
-rw-r--r--chrome/browser/extensions/extension_special_storage_policy.h5
-rw-r--r--chrome/chrome_browser.gypi1
-rw-r--r--tools/heapcheck/suppressions.txt17
-rw-r--r--tools/valgrind/memcheck/suppressions.txt8
-rw-r--r--webkit/quota/special_storage_policy.cc13
-rw-r--r--webkit/quota/special_storage_policy.h6
-rw-r--r--webkit/quota/webkit_quota.gypi27
-rw-r--r--webkit/support/webkit_support.gyp1
9 files changed, 52 insertions, 30 deletions
diff --git a/chrome/browser/extensions/extension_special_storage_policy.cc b/chrome/browser/extensions/extension_special_storage_policy.cc
index 0a405c7..a67617d 100644
--- a/chrome/browser/extensions/extension_special_storage_policy.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy.cc
@@ -10,6 +10,8 @@
ExtensionSpecialStoragePolicy::ExtensionSpecialStoragePolicy() {}
+ExtensionSpecialStoragePolicy::~ExtensionSpecialStoragePolicy() {}
+
bool ExtensionSpecialStoragePolicy::IsStorageProtected(const GURL& origin) {
if (origin.SchemeIs(chrome::kExtensionScheme))
return true;
@@ -56,8 +58,6 @@ void ExtensionSpecialStoragePolicy::RevokeRightsForAllExtensions() {
unlimited_extensions_.Clear();
}
-ExtensionSpecialStoragePolicy::~ExtensionSpecialStoragePolicy() {}
-
//-----------------------------------------------------------------------------
// SpecialCollection helper class
//-----------------------------------------------------------------------------
diff --git a/chrome/browser/extensions/extension_special_storage_policy.h b/chrome/browser/extensions/extension_special_storage_policy.h
index 34c4267..ead9b60 100644
--- a/chrome/browser/extensions/extension_special_storage_policy.h
+++ b/chrome/browser/extensions/extension_special_storage_policy.h
@@ -33,9 +33,6 @@ class ExtensionSpecialStoragePolicy : public quota::SpecialStoragePolicy {
void RevokeRightsForAllExtensions();
private:
- friend class base::RefCountedThreadSafe<SpecialStoragePolicy>;
- virtual ~ExtensionSpecialStoragePolicy();
-
class SpecialCollection {
public:
SpecialCollection();
@@ -53,6 +50,8 @@ class ExtensionSpecialStoragePolicy : public quota::SpecialStoragePolicy {
CachedResults cached_resuts_;
};
+ virtual ~ExtensionSpecialStoragePolicy();
+
base::Lock lock_; // Synchronize all access to the collections.
SpecialCollection protected_apps_;
SpecialCollection unlimited_extensions_;
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index a8888df..489384a 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -47,6 +47,7 @@
'../webkit/support/webkit_support.gyp:database',
'../webkit/support/webkit_support.gyp:fileapi',
'../webkit/support/webkit_support.gyp:glue',
+ '../webkit/support/webkit_support.gyp:quota',
'../webkit/support/webkit_support.gyp:webkit_resources',
],
'include_dirs': [
diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt
index 9b92d39..9f5866c 100644
--- a/tools/heapcheck/suppressions.txt
+++ b/tools/heapcheck/suppressions.txt
@@ -1244,23 +1244,6 @@
fun:ExtensionUpdaterTest*
}
{
- bug_73268a
- Heapcheck:Leak
- ...
- fun:ExtensionSpecialStoragePolicy::SpecialCollection::Contains
- fun:ExtensionSpecialStoragePolicy::IsStorage*
- fun:ExtensionSpecialStoragePolicyTest_*_Test::TestBody
-}
-{
- bug_73268b
- Heapcheck:Leak
- ...
- fun:bool ::InitCanonical
- fun:GURL
- ...
- fun:ExtensionSpecialStoragePolicyTest_*
-}
-{
bug_73358
Heapcheck:Leak
fun:TestingProfile::GetRequestContextForExtensions
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index bd552fe..5d011c8 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -3764,14 +3764,6 @@
fun:_ZN5media12PipelineImpl14InitializeTaskEv
}
{
- bug_73268
- Memcheck:Leak
- ...
- fun:_ZN29ExtensionSpecialStoragePolicy17SpecialCollection8ContainsERK4GURL
- fun:_ZN29ExtensionSpecialStoragePolicy18IsStorage*ERK4GURL
- fun:_ZN*ExtensionSpecialStoragePolicyTest_*_Test8TestBodyEv
-}
-{
bug_73299_a
Memcheck:Leak
fun:_Znw*
diff --git a/webkit/quota/special_storage_policy.cc b/webkit/quota/special_storage_policy.cc
new file mode 100644
index 0000000..c428346
--- /dev/null
+++ b/webkit/quota/special_storage_policy.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/quota/special_storage_policy.h"
+
+namespace quota {
+
+SpecialStoragePolicy::SpecialStoragePolicy() {}
+
+SpecialStoragePolicy::~SpecialStoragePolicy() {}
+
+} // namespace quota
diff --git a/webkit/quota/special_storage_policy.h b/webkit/quota/special_storage_policy.h
index 1f17dac..90526f0 100644
--- a/webkit/quota/special_storage_policy.h
+++ b/webkit/quota/special_storage_policy.h
@@ -19,11 +19,17 @@ namespace quota {
class SpecialStoragePolicy
: public base::RefCountedThreadSafe<SpecialStoragePolicy> {
public:
+ SpecialStoragePolicy();
+
// Protected storage is not subject to removal by the browsing data remover.
virtual bool IsStorageProtected(const GURL& origin) = 0;
// Unlimited storage is not subject to 'quotas'.
virtual bool IsStorageUnlimited(const GURL& origin) = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<SpecialStoragePolicy>;
+ virtual ~SpecialStoragePolicy();
};
} // namespace quota
diff --git a/webkit/quota/webkit_quota.gypi b/webkit/quota/webkit_quota.gypi
new file mode 100644
index 0000000..b738d43
--- /dev/null
+++ b/webkit/quota/webkit_quota.gypi
@@ -0,0 +1,27 @@
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'quota',
+ 'type': '<(library)',
+ 'msvs_guid': '36A9AAD2-10DD-42CF-BF51-3CC79D26FCB4',
+ 'dependencies': [
+ '<(DEPTH)/base/base.gyp:base',
+ ],
+ 'sources': [
+ 'special_storage_policy.cc',
+ 'special_storage_policy.h',
+ ],
+ 'conditions': [
+ ['inside_chromium_build==0', {
+ 'dependencies': [
+ '<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers',
+ ],
+ }],
+ ],
+ },
+ ],
+}
diff --git a/webkit/support/webkit_support.gyp b/webkit/support/webkit_support.gyp
index fe8a3e5..d6a11b0 100644
--- a/webkit/support/webkit_support.gyp
+++ b/webkit/support/webkit_support.gyp
@@ -10,6 +10,7 @@
'../database/webkit_database.gypi',
'../glue/webkit_glue.gypi',
'../gpu/webkit_gpu.gypi',
+ '../quota/webkit_quota.gypi',
'webkit_support.gypi',
],
}