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

Side by Side Diff: webkit/quota/quota_manager.h

Issue 7839029: QuotaManager::DeleteOriginData now allows deletion of specific QuotaClients (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Kinuko's feedback (modulo kMockStart) Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « webkit/quota/quota_client.h ('k') | webkit/quota/quota_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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 #ifndef WEBKIT_QUOTA_QUOTA_MANAGER_H_ 5 #ifndef WEBKIT_QUOTA_QUOTA_MANAGER_H_
6 #define WEBKIT_QUOTA_QUOTA_MANAGER_H_ 6 #define WEBKIT_QUOTA_QUOTA_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <list> 10 #include <list>
11 #include <map> 11 #include <map>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Used to avoid evicting origins with open pages. 142 // Used to avoid evicting origins with open pages.
143 // A call to NotifyOriginInUse must be balanced by a later call 143 // A call to NotifyOriginInUse must be balanced by a later call
144 // to NotifyOriginNoLongerInUse. 144 // to NotifyOriginNoLongerInUse.
145 void NotifyOriginInUse(const GURL& origin); 145 void NotifyOriginInUse(const GURL& origin);
146 void NotifyOriginNoLongerInUse(const GURL& origin); 146 void NotifyOriginNoLongerInUse(const GURL& origin);
147 bool IsOriginInUse(const GURL& origin) const { 147 bool IsOriginInUse(const GURL& origin) const {
148 return origins_in_use_.find(origin) != origins_in_use_.end(); 148 return origins_in_use_.find(origin) != origins_in_use_.end();
149 } 149 }
150 150
151 // Called by UI. 151 // DeleteOriginData and DeleteHostData (surprisingly enough) delete data of a
152 // particular StorageType associated with either a specific origin or set of
153 // origins. Each method additionally requires a |quota_client_mask| which
154 // specifies the types of QuotaClients to delete from the origin. This is
155 // specified by the caller as a bitmask built from QuotaClient::IDs. Setting
156 // the mask to QuotaClient::kAllClientsMask will remove all clients from the
157 // origin, regardless of type.
158 //
159 // Both methods must be called on the UI thread.
152 virtual void DeleteOriginData(const GURL& origin, 160 virtual void DeleteOriginData(const GURL& origin,
153 StorageType type, 161 StorageType type,
162 int quota_client_mask,
154 const StatusCallback& callback); 163 const StatusCallback& callback);
155 void DeleteHostData(const std::string& host, 164 void DeleteHostData(const std::string& host,
156 StorageType type, 165 StorageType type,
166 int quota_client_mask,
157 const StatusCallback& callback); 167 const StatusCallback& callback);
158 168
159 // Called by UI and internal modules. 169 // Called by UI and internal modules.
160 void GetAvailableSpace(const AvailableSpaceCallback& callback); 170 void GetAvailableSpace(const AvailableSpaceCallback& callback);
161 void GetTemporaryGlobalQuota(const QuotaCallback& callback); 171 void GetTemporaryGlobalQuota(const QuotaCallback& callback);
162 172
163 // Ok to call with NULL callback. 173 // Ok to call with NULL callback.
164 void SetTemporaryGlobalOverrideQuota(int64 new_quota, 174 void SetTemporaryGlobalOverrideQuota(int64 new_quota,
165 const QuotaCallback& callback); 175 const QuotaCallback& callback);
166 176
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 422
413 QuotaManager* manager_; // only accessed on the io thread 423 QuotaManager* manager_; // only accessed on the io thread
414 scoped_refptr<base::MessageLoopProxy> io_thread_; 424 scoped_refptr<base::MessageLoopProxy> io_thread_;
415 425
416 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); 426 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy);
417 }; 427 };
418 428
419 } // namespace quota 429 } // namespace quota
420 430
421 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ 431 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_
OLDNEW
« no previous file with comments | « webkit/quota/quota_client.h ('k') | webkit/quota/quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698