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 #include "net/base/net_export.h" |
14 | 14 |
15 namespace disk_cache { | 15 namespace disk_cache { |
16 class Backend; | 16 class Backend; |
17 class Entry; | 17 class Entry; |
18 } // namespace disk_cache | 18 } // namespace disk_cache |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 | 21 |
22 class URLRequestContext; | 22 class URLRequestContext; |
23 | 23 |
24 class NET_API ViewCacheHelper { | 24 class NET_EXPORT ViewCacheHelper { |
25 public: | 25 public: |
26 ViewCacheHelper(); | 26 ViewCacheHelper(); |
27 ~ViewCacheHelper(); | 27 ~ViewCacheHelper(); |
28 | 28 |
29 // 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. |
30 // 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 |
31 // operation completes. |out| must remain valid until this operation completes | 31 // operation completes. |out| must remain valid until this operation completes |
32 // or the object is destroyed. | 32 // or the object is destroyed. |
33 int GetEntryInfoHTML(const std::string& key, | 33 int GetEntryInfoHTML(const std::string& key, |
34 const URLRequestContext* context, | 34 const URLRequestContext* context, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 CompletionCallbackImpl<ViewCacheHelper> cache_callback_; | 117 CompletionCallbackImpl<ViewCacheHelper> cache_callback_; |
118 scoped_refptr<CancelableCompletionCallback<ViewCacheHelper> > entry_callback_; | 118 scoped_refptr<CancelableCompletionCallback<ViewCacheHelper> > entry_callback_; |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(ViewCacheHelper); | 120 DISALLOW_COPY_AND_ASSIGN(ViewCacheHelper); |
121 }; | 121 }; |
122 | 122 |
123 } // namespace net. | 123 } // namespace net. |
124 | 124 |
125 #endif // NET_URL_REQUEST_VIEW_CACHE_HELPER_H_ | 125 #endif // NET_URL_REQUEST_VIEW_CACHE_HELPER_H_ |
OLD | NEW |