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

Unified Diff: content/public/test/mock_blob_url_request_context.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/public/test/async_file_test_helper.cc ('k') | content/public/test/mock_blob_url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_blob_url_request_context.h
diff --git a/content/public/test/mock_blob_url_request_context.h b/content/public/test/mock_blob_url_request_context.h
deleted file mode 100644
index fdf46fa57632bdeea53511d8d8f8886ed872f892..0000000000000000000000000000000000000000
--- a/content/public/test/mock_blob_url_request_context.h
+++ /dev/null
@@ -1,61 +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_PUBLIC_TEST_MOCK_BLOB_URL_REQUEST_CONTEXT_H_
-#define CONTENT_PUBLIC_TEST_MOCK_BLOB_URL_REQUEST_CONTEXT_H_
-
-#include "base/macros.h"
-#include "net/url_request/url_request_context.h"
-#include "net/url_request/url_request_job.h"
-#include "net/url_request/url_request_job_factory_impl.h"
-
-namespace storage {
-class FileSystemContext;
-}
-
-namespace storage {
-class BlobDataHandle;
-class BlobStorageContext;
-}
-
-namespace content {
-
-class MockBlobURLRequestContext : public net::URLRequestContext {
- public:
- MockBlobURLRequestContext(storage::FileSystemContext* file_system_context);
- ~MockBlobURLRequestContext() override;
-
- storage::BlobStorageContext* blob_storage_context() const {
- return blob_storage_context_.get();
- }
-
- private:
- net::URLRequestJobFactoryImpl job_factory_;
- std::unique_ptr<storage::BlobStorageContext> blob_storage_context_;
-
- DISALLOW_COPY_AND_ASSIGN(MockBlobURLRequestContext);
-};
-
-class ScopedTextBlob {
- public:
- // Registers a blob with the given |id| that contains |data|.
- ScopedTextBlob(const MockBlobURLRequestContext& request_context,
- const std::string& blob_id,
- const std::string& data);
- ~ScopedTextBlob();
-
- // Returns a BlobDataHandle referring to the scoped blob.
- std::unique_ptr<storage::BlobDataHandle> GetBlobDataHandle();
-
- private:
- const std::string blob_id_;
- storage::BlobStorageContext* context_;
- std::unique_ptr<storage::BlobDataHandle> handle_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedTextBlob);
-};
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_TEST_MOCK_BLOB_URL_REQUEST_CONTEXT_H_
« no previous file with comments | « content/public/test/async_file_test_helper.cc ('k') | content/public/test/mock_blob_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698