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

Side by Side Diff: content/public/test/mock_blob_url_request_context.h

Issue 146963006: Move blob/mock_blob_url_request_context to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix one more using clause Created 6 years, 10 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 | « content/content_tests.gypi ('k') | content/public/test/mock_blob_url_request_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BLOB_MOCK_BLOB_URL_REQUEST_CONTEXT_H_ 5 #ifndef CONTENT_MOCK_BLOB_URL_REQUEST_CONTEXT_H_
jam 2014/01/28 16:06:12 nit: CONTENT_PUBLIC_TEST_MOCK_BLOB_URL_REQUEST_CON
6 #define WEBKIT_BLOB_MOCK_BLOB_URL_REQUEST_CONTEXT_H_ 6 #define CONTENT_MOCK_BLOB_URL_REQUEST_CONTEXT_H_
7 7
8 #include "net/url_request/url_request_context.h" 8 #include "net/url_request/url_request_context.h"
9 #include "net/url_request/url_request_job.h" 9 #include "net/url_request/url_request_job.h"
10 #include "net/url_request/url_request_job_factory_impl.h" 10 #include "net/url_request/url_request_job_factory_impl.h"
11 11
12 namespace fileapi { 12 namespace fileapi {
13 class FileSystemContext; 13 class FileSystemContext;
14 } 14 }
15 15
16 namespace webkit_blob { 16 namespace webkit_blob {
17
18 class BlobDataHandle; 17 class BlobDataHandle;
19 class BlobStorageContext; 18 class BlobStorageContext;
19 }
20
21 namespace content {
20 22
21 class MockBlobURLRequestContext : public net::URLRequestContext { 23 class MockBlobURLRequestContext : public net::URLRequestContext {
22 public: 24 public:
23 MockBlobURLRequestContext(fileapi::FileSystemContext* file_system_context); 25 MockBlobURLRequestContext(fileapi::FileSystemContext* file_system_context);
24 virtual ~MockBlobURLRequestContext(); 26 virtual ~MockBlobURLRequestContext();
25 27
26 BlobStorageContext* blob_storage_context() const { 28 webkit_blob::BlobStorageContext* blob_storage_context() const {
27 return blob_storage_context_.get(); 29 return blob_storage_context_.get();
28 } 30 }
29 31
30 private: 32 private:
31 net::URLRequestJobFactoryImpl job_factory_; 33 net::URLRequestJobFactoryImpl job_factory_;
32 scoped_ptr<BlobStorageContext> blob_storage_context_; 34 scoped_ptr<webkit_blob::BlobStorageContext> blob_storage_context_;
33 35
34 DISALLOW_COPY_AND_ASSIGN(MockBlobURLRequestContext); 36 DISALLOW_COPY_AND_ASSIGN(MockBlobURLRequestContext);
35 }; 37 };
36 38
37 class ScopedTextBlob { 39 class ScopedTextBlob {
38 public: 40 public:
39 // Registers a blob with the given |id| that contains |data|. 41 // Registers a blob with the given |id| that contains |data|.
40 ScopedTextBlob(const MockBlobURLRequestContext& request_context, 42 ScopedTextBlob(const MockBlobURLRequestContext& request_context,
41 const std::string& blob_id, 43 const std::string& blob_id,
42 const std::string& data); 44 const std::string& data);
43 ~ScopedTextBlob(); 45 ~ScopedTextBlob();
44 46
45 // Returns a BlobDataHandle referring to the scoped blob. 47 // Returns a BlobDataHandle referring to the scoped blob.
46 scoped_ptr<BlobDataHandle> GetBlobDataHandle(); 48 scoped_ptr<webkit_blob::BlobDataHandle> GetBlobDataHandle();
47 49
48 private: 50 private:
49 const std::string blob_id_; 51 const std::string blob_id_;
50 BlobStorageContext* context_; 52 webkit_blob::BlobStorageContext* context_;
51 scoped_ptr<BlobDataHandle> handle_; 53 scoped_ptr<webkit_blob::BlobDataHandle> handle_;
52 54
53 DISALLOW_COPY_AND_ASSIGN(ScopedTextBlob); 55 DISALLOW_COPY_AND_ASSIGN(ScopedTextBlob);
54 }; 56 };
55 57
56 } // namespace webkit_blob 58 } // namespace content
57 59
58 #endif // WEBKIT_BLOB_MOCK_BLOB_URL_REQUEST_CONTEXT_H_ 60 #endif // CONTENT_MOCK_BLOB_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('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