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

Unified Diff: webkit/quota/mock_quota_manager.h

Issue 7129018: Time-based removal of temporary file systems via BrowsingDataRemover (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const_iterator. Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: webkit/quota/mock_quota_manager.h
diff --git a/webkit/quota/mock_quota_manager.h b/webkit/quota/mock_quota_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..dbc140545ef90e583e38daaa8396ad29fbce5951
--- /dev/null
+++ b/webkit/quota/mock_quota_manager.h
@@ -0,0 +1,67 @@
+// 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.
+
+#ifndef WEBKIT_QUOTA_MOCK_QUOTA_MANAGER_H_
+#define WEBKIT_QUOTA_MOCK_QUOTA_MANAGER_H_
+#pragma once
+
+#include <vector>
+#include <string>
jochen (gone - plz use gerrit) 2011/07/26 08:55:33 empty line between sys and chrome includes
Mike West 2011/07/26 12:08:32 Done.
+#include "base/memory/scoped_ptr.h"
+#include "googleurl/src/gurl.h"
+#include "webkit/quota/quota_client.h"
+#include "webkit/quota/quota_task.h"
+#include "webkit/quota/quota_types.h"
+#include "webkit/quota/quota_manager.h"
jochen (gone - plz use gerrit) 2011/07/26 08:55:33 alphabetical ordering
Mike West 2011/07/26 12:08:32 Done.
+
+namespace quota {
+
+
jochen (gone - plz use gerrit) 2011/07/26 08:55:33 only one empty line
Mike West 2011/07/26 12:08:32 Done.
+// Mocks the pieces of QuotaManager's interface that are used for time-based
+// deletion of a profile's browsing data.
+class MockQuotaManager : public QuotaManager {
+ public:
+ // Contains the essential bits of information about an origin that the
+ // MockQuotaManager needs to understand: the origin itself, the StorageType,
+ // and its modification time.
+ struct OriginInfo {
+ OriginInfo(const GURL& origin,
+ StorageType type,
+ base::Time modified);
+ ~OriginInfo();
+
+ GURL origin;
+ StorageType type;
+ base::Time modified;
+ };
+
+ MockQuotaManager(bool is_incognito,
+ const FilePath& profile_path,
+ base::MessageLoopProxy* io_thread,
+ base::MessageLoopProxy* db_thread,
+ SpecialStoragePolicy* special_storage_policy);
+
+ virtual ~MockQuotaManager();
+
+ bool AddOrigin(const GURL& origin, StorageType type, base::Time modified);
+
+ bool OriginHasData(const GURL& origin, StorageType type);
jochen (gone - plz use gerrit) 2011/07/26 08:55:33 const?
Mike West 2011/07/26 12:08:32 Done.
+
+ virtual void GetOriginsModifiedSince(StorageType type,
+ base::Time modified_since,
+ GetOriginsCallback* callback) OVERRIDE;
+
+ virtual void DeleteOriginData(const GURL& origin,
+ StorageType type,
+ StatusCallback* callback) OVERRIDE;
+ private:
+ class GetModifiedSinceTask;
+ class DeleteOriginDataTask;
+
+ std::vector<OriginInfo> origins_;
+};
jochen (gone - plz use gerrit) 2011/07/26 08:55:33 disallow copy & assign?
Mike West 2011/07/26 12:08:32 Done.
+
+} // namespace quota
jochen (gone - plz use gerrit) 2011/07/26 08:55:33 two spaces between } and //
Mike West 2011/07/26 12:08:32 Done.
+
+#endif // WEBKIT_QUOTA_MOCK_QUOTA_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698