From 3ea7dc5140fe9b2e3d91f12e3a6d7f54eb4762ee Mon Sep 17 00:00:00 2001 From: "michaeln@google.com" Date: Tue, 22 Feb 2011 21:15:53 +0000 Subject: Fix a memory leak and add the webkit_quota library to the project. BUG=73268 TEST=look at the memory bots this time Review URL: http://codereview.chromium.org/6469036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75633 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/quota/special_storage_policy.cc | 13 +++++++++++++ webkit/quota/special_storage_policy.h | 6 ++++++ webkit/quota/webkit_quota.gypi | 27 +++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 webkit/quota/special_storage_policy.cc create mode 100644 webkit/quota/webkit_quota.gypi (limited to 'webkit/quota') 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 { 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; + 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', + ], + }], + ], + }, + ], +} -- cgit v1.1