OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 NET_URL_REQUEST_VIEW_CACHE_HELPER_H_ | 5 #ifndef NET_URL_REQUEST_VIEW_CACHE_HELPER_H_ |
6 #define NET_URL_REQUEST_VIEW_CACHE_HELPER_H_ | 6 #define NET_URL_REQUEST_VIEW_CACHE_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "net/base/completion_callback.h" | 11 #include "net/base/completion_callback.h" |
12 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
| 13 #include "net/base/net_api.h" |
13 | 14 |
14 namespace disk_cache { | 15 namespace disk_cache { |
15 class Backend; | 16 class Backend; |
16 class Entry; | 17 class Entry; |
17 } // namespace disk_cache | 18 } // namespace disk_cache |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 | 21 |
21 class URLRequestContext; | 22 class URLRequestContext; |
22 | 23 |
23 class ViewCacheHelper { | 24 class NET_API ViewCacheHelper { |
24 public: | 25 public: |
25 ViewCacheHelper(); | 26 ViewCacheHelper(); |
26 ~ViewCacheHelper(); | 27 ~ViewCacheHelper(); |
27 | 28 |
28 // Formats the cache information for |key| as HTML. Returns a net error code. | 29 // Formats the cache information for |key| as HTML. Returns a net error code. |
29 // If this method returns ERR_IO_PENDING, |callback| will be notified when the | 30 // If this method returns ERR_IO_PENDING, |callback| will be notified when the |
30 // operation completes. |out| must remain valid until this operation completes | 31 // operation completes. |out| must remain valid until this operation completes |
31 // or the object is destroyed. | 32 // or the object is destroyed. |
32 int GetEntryInfoHTML(const std::string& key, | 33 int GetEntryInfoHTML(const std::string& key, |
33 URLRequestContext* context, | 34 URLRequestContext* context, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 111 |
111 CompletionCallbackImpl<ViewCacheHelper> cache_callback_; | 112 CompletionCallbackImpl<ViewCacheHelper> cache_callback_; |
112 scoped_refptr<CancelableCompletionCallback<ViewCacheHelper> > entry_callback_; | 113 scoped_refptr<CancelableCompletionCallback<ViewCacheHelper> > entry_callback_; |
113 | 114 |
114 DISALLOW_COPY_AND_ASSIGN(ViewCacheHelper); | 115 DISALLOW_COPY_AND_ASSIGN(ViewCacheHelper); |
115 }; | 116 }; |
116 | 117 |
117 } // namespace net. | 118 } // namespace net. |
118 | 119 |
119 #endif // NET_URL_REQUEST_VIEW_CACHE_HELPER_H_ | 120 #endif // NET_URL_REQUEST_VIEW_CACHE_HELPER_H_ |
OLD | NEW |