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

Unified Diff: content/browser/quota/mock_quota_manager_proxy.h

Issue 2368913003: Populate storage_unittests target. (Closed)
Patch Set: Removed unnecessary include from storage/browser/blob/blob_storage_context_unittest.cc. Created 4 years, 3 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
« no previous file with comments | « content/browser/quota/mock_quota_manager.cc ('k') | content/browser/quota/mock_quota_manager_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/quota/mock_quota_manager_proxy.h
diff --git a/content/browser/quota/mock_quota_manager_proxy.h b/content/browser/quota/mock_quota_manager_proxy.h
deleted file mode 100644
index e550a9d9de39f1f33fb20a16c3bea3d6b12e4dd8..0000000000000000000000000000000000000000
--- a/content/browser/quota/mock_quota_manager_proxy.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2014 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 CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_
-#define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_
-
-#include <stdint.h>
-
-#include "base/macros.h"
-#include "content/browser/quota/mock_quota_manager.h"
-#include "storage/browser/quota/quota_client.h"
-#include "storage/browser/quota/quota_manager_proxy.h"
-#include "storage/common/quota/quota_types.h"
-#include "url/gurl.h"
-
-using storage::QuotaManagerProxy;
-
-namespace content {
-
-class MockQuotaManager;
-
-class MockQuotaManagerProxy : public QuotaManagerProxy {
- public:
- // It is ok to give NULL to |quota_manager|.
- MockQuotaManagerProxy(MockQuotaManager* quota_manager,
- base::SingleThreadTaskRunner* task_runner);
-
- void RegisterClient(QuotaClient* client) override;
-
- void SimulateQuotaManagerDestroyed();
-
- // We don't mock them.
- void NotifyOriginInUse(const GURL& origin) override {}
- void NotifyOriginNoLongerInUse(const GURL& origin) override {}
- void SetUsageCacheEnabled(QuotaClient::ID client_id,
- const GURL& origin,
- StorageType type,
- bool enabled) override {}
- void GetUsageAndQuota(
- base::SequencedTaskRunner* original_task_runner,
- const GURL& origin,
- StorageType type,
- const QuotaManager::GetUsageAndQuotaCallback& callback) override;
-
- // Validates the |client_id| and updates the internal access count
- // which can be accessed via notify_storage_accessed_count().
- // The also records the |origin| and |type| in last_notified_origin_ and
- // last_notified_type_.
- void NotifyStorageAccessed(QuotaClient::ID client_id,
- const GURL& origin,
- StorageType type) override;
-
- // Records the |origin|, |type| and |delta| as last_notified_origin_,
- // last_notified_type_ and last_notified_delta_ respecitvely.
- // If non-null MockQuotaManager is given to the constructor this also
- // updates the manager's internal usage information.
- void NotifyStorageModified(QuotaClient::ID client_id,
- const GURL& origin,
- StorageType type,
- int64_t delta) override;
-
- int notify_storage_accessed_count() const { return storage_accessed_count_; }
- int notify_storage_modified_count() const { return storage_modified_count_; }
- GURL last_notified_origin() const { return last_notified_origin_; }
- StorageType last_notified_type() const { return last_notified_type_; }
- int64_t last_notified_delta() const { return last_notified_delta_; }
-
- protected:
- ~MockQuotaManagerProxy() override;
-
- private:
- MockQuotaManager* mock_manager() const {
- return static_cast<MockQuotaManager*>(quota_manager());
- }
-
- int storage_accessed_count_;
- int storage_modified_count_;
- GURL last_notified_origin_;
- StorageType last_notified_type_;
- int64_t last_notified_delta_;
-
- QuotaClient* registered_client_;
-
- DISALLOW_COPY_AND_ASSIGN(MockQuotaManagerProxy);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_
« no previous file with comments | « content/browser/quota/mock_quota_manager.cc ('k') | content/browser/quota/mock_quota_manager_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698