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

Side by Side Diff: webkit/browser/quota/storage_observer.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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/browser/quota/storage_observer.h ('k') | webkit/browser/quota/usage_tracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/browser/quota/storage_observer.h"
6
7 namespace quota {
8
9 // StorageObserver::Filter
10
11 StorageObserver::Filter::Filter()
12 : storage_type(kStorageTypeUnknown) {
13 }
14
15 StorageObserver::Filter::Filter(StorageType storage_type, const GURL& origin)
16 : storage_type(storage_type), origin(origin) {
17 }
18
19 bool StorageObserver::Filter::operator==(const Filter& other) const {
20 return storage_type == other.storage_type &&
21 origin == other.origin;
22 }
23
24 // StorageObserver::MonitorParams
25
26 StorageObserver::MonitorParams::MonitorParams()
27 : dispatch_initial_state(false) {
28 }
29
30 StorageObserver::MonitorParams::MonitorParams(
31 StorageType storage_type,
32 const GURL& origin,
33 const base::TimeDelta& rate,
34 bool get_initial_state)
35 : filter(storage_type, origin),
36 rate(rate),
37 dispatch_initial_state(get_initial_state) {
38 }
39
40 StorageObserver::MonitorParams::MonitorParams(
41 const Filter& filter,
42 const base::TimeDelta& rate,
43 bool get_initial_state)
44 : filter(filter),
45 rate(rate),
46 dispatch_initial_state(get_initial_state) {
47 }
48
49 // StorageObserver::Event
50
51 StorageObserver::Event::Event()
52 : usage(0), quota(0) {
53 }
54
55 StorageObserver::Event::Event(const Filter& filter, int64 usage, int64 quota)
56 : filter(filter), usage(usage), quota(quota) {
57 }
58
59 bool StorageObserver::Event::operator==(const Event& other) const {
60 return filter == other.filter &&
61 usage == other.usage &&
62 quota == other.quota;
63 }
64
65 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/browser/quota/storage_observer.h ('k') | webkit/browser/quota/usage_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698