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 #include "net/url_request/view_cache_helper.h" | 5 #include "net/url_request/view_cache_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "net/base/escape.h" | 10 #include "net/base/escape.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 GURL url = GURL(url_prefix + key); | 34 GURL url = GURL(url_prefix + key); |
35 std::string row = | 35 std::string row = |
36 "<tr><td><a href=\"" + url.spec() + "\">" + EscapeForHTML(key) + | 36 "<tr><td><a href=\"" + url.spec() + "\">" + EscapeForHTML(key) + |
37 "</a></td></tr>"; | 37 "</a></td></tr>"; |
38 return row; | 38 return row; |
39 } | 39 } |
40 | 40 |
41 } // namespace. | 41 } // namespace. |
42 | 42 |
43 ViewCacheHelper::ViewCacheHelper() | 43 ViewCacheHelper::ViewCacheHelper() |
44 : disk_cache_(NULL), | 44 : context_(NULL), |
| 45 disk_cache_(NULL), |
45 entry_(NULL), | 46 entry_(NULL), |
46 iter_(NULL), | 47 iter_(NULL), |
47 buf_len_(0), | 48 buf_len_(0), |
48 index_(0), | 49 index_(0), |
49 data_(NULL), | 50 data_(NULL), |
50 next_state_(STATE_NONE), | 51 next_state_(STATE_NONE), |
51 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 52 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { |
52 } | 53 } |
53 | 54 |
54 ViewCacheHelper::~ViewCacheHelper() { | 55 ViewCacheHelper::~ViewCacheHelper() { |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 entry_ = NULL; | 350 entry_ = NULL; |
350 } | 351 } |
351 return OK; | 352 return OK; |
352 } | 353 } |
353 | 354 |
354 void ViewCacheHelper::OnIOComplete(int result) { | 355 void ViewCacheHelper::OnIOComplete(int result) { |
355 DoLoop(result); | 356 DoLoop(result); |
356 } | 357 } |
357 | 358 |
358 } // namespace net. | 359 } // namespace net. |
OLD | NEW |