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

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

Issue 8070001: Use base::Callback in Quota related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: choke lint Created 9 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_MOCK_QUOTA_MANAGER_H_ 5 #ifndef WEBKIT_QUOTA_MOCK_QUOTA_MANAGER_H_
6 #define WEBKIT_QUOTA_MOCK_QUOTA_MANAGER_H_ 6 #define WEBKIT_QUOTA_MOCK_QUOTA_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 #include <string> 10 #include <string>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Checks an origin and type against the origins that have been added via 54 // Checks an origin and type against the origins that have been added via
55 // AddOrigin and removed via DeleteOriginData. If the origin exists in the 55 // AddOrigin and removed via DeleteOriginData. If the origin exists in the
56 // canned list with the proper StorageType, returns true. 56 // canned list with the proper StorageType, returns true.
57 bool OriginHasData(const GURL& origin, StorageType type) const; 57 bool OriginHasData(const GURL& origin, StorageType type) const;
58 58
59 // Overrides QuotaManager's implementation with a canned implementation that 59 // Overrides QuotaManager's implementation with a canned implementation that
60 // allows clients to set up the origin database that should be queried. This 60 // allows clients to set up the origin database that should be queried. This
61 // method will only search through the origins added explicitly via AddOrigin. 61 // method will only search through the origins added explicitly via AddOrigin.
62 virtual void GetOriginsModifiedSince(StorageType type, 62 virtual void GetOriginsModifiedSince(StorageType type,
63 base::Time modified_since, 63 base::Time modified_since,
64 GetOriginsCallback* callback) OVERRIDE; 64 GetOriginsCallback callback) OVERRIDE;
awong 2011/09/29 18:05:15 const &.
tzik 2011/10/11 04:53:57 Done.
65 65
66 // Removes an origin from the canned list of origins, but doesn't touch 66 // Removes an origin from the canned list of origins, but doesn't touch
67 // anything on disk. 67 // anything on disk.
68 virtual void DeleteOriginData(const GURL& origin, 68 virtual void DeleteOriginData(const GURL& origin,
69 StorageType type, 69 StorageType type,
70 StatusCallback* callback) OVERRIDE; 70 StatusCallback callback) OVERRIDE;
awong 2011/09/29 18:05:15 const &.
tzik 2011/10/11 04:53:57 Done.
71
71 private: 72 private:
72 class GetModifiedSinceTask; 73 class GetModifiedSinceTask;
73 class DeleteOriginDataTask; 74 class DeleteOriginDataTask;
74 75
75 // The list of stored origins that have been added via AddOrigin. 76 // The list of stored origins that have been added via AddOrigin.
76 std::vector<OriginInfo> origins_; 77 std::vector<OriginInfo> origins_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(MockQuotaManager); 79 DISALLOW_COPY_AND_ASSIGN(MockQuotaManager);
79 }; 80 };
80 81
81 } // namespace quota 82 } // namespace quota
82 83
83 #endif // WEBKIT_QUOTA_MOCK_QUOTA_MANAGER_H_ 84 #endif // WEBKIT_QUOTA_MOCK_QUOTA_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698