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

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

Issue 196573024: Proposal: Provide the ability to monitor the usage of origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Support Quota Management Spec Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_QUOTA_QUOTA_MANAGER_H_ 5 #ifndef WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_H_
6 #define WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_H_ 6 #define WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/basictypes.h" 16 #include "base/basictypes.h"
17 #include "base/callback.h" 17 #include "base/callback.h"
18 #include "base/files/file_path.h" 18 #include "base/files/file_path.h"
19 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
20 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
21 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
22 #include "base/sequenced_task_runner_helpers.h" 22 #include "base/sequenced_task_runner_helpers.h"
23 #include "webkit/browser/quota/quota_callbacks.h" 23 #include "webkit/browser/quota/quota_callbacks.h"
24 #include "webkit/browser/quota/quota_client.h" 24 #include "webkit/browser/quota/quota_client.h"
25 #include "webkit/browser/quota/quota_database.h" 25 #include "webkit/browser/quota/quota_database.h"
26 #include "webkit/browser/quota/quota_task.h" 26 #include "webkit/browser/quota/quota_task.h"
27 #include "webkit/browser/quota/special_storage_policy.h" 27 #include "webkit/browser/quota/special_storage_policy.h"
28 #include "webkit/browser/quota/storage_observer.h"
28 #include "webkit/browser/webkit_storage_browser_export.h" 29 #include "webkit/browser/webkit_storage_browser_export.h"
29 30
30 namespace base { 31 namespace base {
31 class FilePath; 32 class FilePath;
32 class SequencedTaskRunner; 33 class SequencedTaskRunner;
33 class SingleThreadTaskRunner; 34 class SingleThreadTaskRunner;
34 } 35 }
35 36
36 namespace quota_internals { 37 namespace quota_internals {
37 class QuotaInternalsProxy; 38 class QuotaInternalsProxy;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return special_storage_policy_.get() && 219 return special_storage_policy_.get() &&
219 special_storage_policy_->CanQueryDiskSize(origin); 220 special_storage_policy_->CanQueryDiskSize(origin);
220 } 221 }
221 222
222 virtual void GetOriginsModifiedSince(StorageType type, 223 virtual void GetOriginsModifiedSince(StorageType type,
223 base::Time modified_since, 224 base::Time modified_since,
224 const GetOriginsCallback& callback); 225 const GetOriginsCallback& callback);
225 226
226 bool ResetUsageTracker(StorageType type); 227 bool ResetUsageTracker(StorageType type);
227 228
229 // Used to register/deregister observers that wish to monitor storage events.
230 void AddStorageObserver(const StorageObserver::MonitorParams& params,
tmdiep 2014/03/17 06:27:08 If we need the ability to update the params for an
nhiroki 2014/03/17 06:51:40 From the viewpoint of the Quota spec, I think we d
231 StorageObserver* observer);
232 void RemoveStorageObserver(StorageObserver* observer);
233
228 // Determines the portion of the temp pool that can be 234 // Determines the portion of the temp pool that can be
229 // utilized by a single host (ie. 5 for 20%). 235 // utilized by a single host (ie. 5 for 20%).
230 static const int kPerHostTemporaryPortion; 236 static const int kPerHostTemporaryPortion;
231 237
232 static const int64 kPerHostPersistentQuotaLimit; 238 static const int64 kPerHostPersistentQuotaLimit;
233 239
234 static const char kDatabaseName[]; 240 static const char kDatabaseName[];
235 241
236 static const int64 kMinimumPreserveForSystem; 242 static const int64 kMinimumPreserveForSystem;
237 243
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 438
433 struct QuotaManagerDeleter { 439 struct QuotaManagerDeleter {
434 static void Destruct(const QuotaManager* manager) { 440 static void Destruct(const QuotaManager* manager) {
435 manager->DeleteOnCorrectThread(); 441 manager->DeleteOnCorrectThread();
436 } 442 }
437 }; 443 };
438 444
439 } // namespace quota 445 } // namespace quota
440 446
441 #endif // WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_H_ 447 #endif // WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/browser/quota/storage_observer.h » ('j') | webkit/browser/quota/storage_observer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698