| 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 #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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 namespace net { | 27 namespace net { |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 std::string FormatEntryInfo(disk_cache::Entry* entry, | 31 std::string FormatEntryInfo(disk_cache::Entry* entry, |
| 32 const std::string& url_prefix) { | 32 const std::string& url_prefix) { |
| 33 std::string key = entry->GetKey(); | 33 std::string key = entry->GetKey(); |
| 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.possibly_invalid_spec() + "\">" + |
| 37 "</a></td></tr>"; | 37 EscapeForHTML(key) + "</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 : context_(NULL), | 44 : context_(NULL), |
| 45 disk_cache_(NULL), | 45 disk_cache_(NULL), |
| 46 entry_(NULL), | 46 entry_(NULL), |
| 47 iter_(NULL), | 47 iter_(NULL), |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 entry_ = NULL; | 350 entry_ = NULL; |
| 351 } | 351 } |
| 352 return OK; | 352 return OK; |
| 353 } | 353 } |
| 354 | 354 |
| 355 void ViewCacheHelper::OnIOComplete(int result) { | 355 void ViewCacheHelper::OnIOComplete(int result) { |
| 356 DoLoop(result); | 356 DoLoop(result); |
| 357 } | 357 } |
| 358 | 358 |
| 359 } // namespace net. | 359 } // namespace net. |
| OLD | NEW |