OLD | NEW |
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 | 5 |
6 #ifndef LIBRARIES_NACL_IO_MOUNT_HTTP_H_ | 6 #ifndef LIBRARIES_NACL_IO_MOUNT_HTTP_H_ |
7 #define LIBRARIES_NACL_IO_MOUNT_HTTP_H_ | 7 #define LIBRARIES_NACL_IO_MOUNT_HTTP_H_ |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include "nacl_io/mount.h" | 10 #include "nacl_io/mount.h" |
11 #include "nacl_io/pepper_interface.h" | 11 #include "nacl_io/pepper_interface.h" |
12 #include "nacl_io/typed_mount_factory.h" | 12 #include "nacl_io/typed_mount_factory.h" |
13 | 13 |
| 14 class MountHttpMock; |
| 15 |
| 16 namespace nacl_io { |
| 17 |
14 class MountNode; | 18 class MountNode; |
15 class MountHttpMock; | |
16 | 19 |
17 std::string NormalizeHeaderKey(const std::string& s); | 20 std::string NormalizeHeaderKey(const std::string& s); |
18 | 21 |
19 class MountHttp : public Mount { | 22 class MountHttp : public Mount { |
20 public: | 23 public: |
21 typedef std::map<std::string, ScopedMountNode> NodeMap_t; | 24 typedef std::map<std::string, ScopedMountNode> NodeMap_t; |
22 | 25 |
23 virtual Error Access(const Path& path, int a_mode); | 26 virtual Error Access(const Path& path, int a_mode); |
24 virtual Error Open(const Path& path, int mode, ScopedMountNode* out_node); | 27 virtual Error Open(const Path& path, int mode, ScopedMountNode* out_node); |
25 virtual Error Unlink(const Path& path); | 28 virtual Error Unlink(const Path& path); |
(...skipping 22 matching lines...) Expand all Loading... |
48 std::string url_root_; | 51 std::string url_root_; |
49 StringMap_t headers_; | 52 StringMap_t headers_; |
50 NodeMap_t node_cache_; | 53 NodeMap_t node_cache_; |
51 bool allow_cors_; | 54 bool allow_cors_; |
52 bool allow_credentials_; | 55 bool allow_credentials_; |
53 bool cache_stat_; | 56 bool cache_stat_; |
54 bool cache_content_; | 57 bool cache_content_; |
55 | 58 |
56 friend class TypedMountFactory<MountHttp>; | 59 friend class TypedMountFactory<MountHttp>; |
57 friend class MountNodeHttp; | 60 friend class MountNodeHttp; |
58 friend class MountHttpMock; | 61 friend class ::MountHttpMock; |
59 }; | 62 }; |
60 | 63 |
| 64 } // namespace nacl_io |
| 65 |
61 #endif // LIBRARIES_NACL_IO_MOUNT_HTTP_H_ | 66 #endif // LIBRARIES_NACL_IO_MOUNT_HTTP_H_ |
OLD | NEW |