Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/appcache/view_appcache_internals_job.h" | 5 #include "webkit/appcache/view_appcache_internals_job.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 } | 106 } |
| 107 out->append("<br/>"); | 107 out->append("<br/>"); |
| 108 DrawCommandButton(kRemoveAppCache, info->manifest_url.spec(), out); | 108 DrawCommandButton(kRemoveAppCache, info->manifest_url.spec(), out); |
| 109 out->append("<ul>"); | 109 out->append("<ul>"); |
| 110 | 110 |
| 111 AddLiTag(kSize, | 111 AddLiTag(kSize, |
| 112 UTF16ToUTF8(FormatBytes( | 112 UTF16ToUTF8(FormatBytes( |
| 113 info->size, GetByteDisplayUnits(info->size), true)), | 113 info->size, GetByteDisplayUnits(info->size), true)), |
| 114 out); | 114 out); |
| 115 AddLiTag(kCreationTime, | 115 AddLiTag(kCreationTime, |
| 116 WideToUTF8(TimeFormatFriendlyDateAndTime( | 116 UTF16ToUTF8(TimeFormatFriendlyDateAndTime( |
| 117 info->creation_time)), | 117 info->creation_time)), |
|
Evan Martin
2010/12/21 23:32:56
so close to fitting on one line!
| |
| 118 out); | 118 out); |
| 119 AddLiTag(kLastAccessTime, | 119 AddLiTag(kLastAccessTime, |
| 120 WideToUTF8( | 120 UTF16ToUTF8( |
| 121 TimeFormatFriendlyDateAndTime(info->last_access_time)), | 121 TimeFormatFriendlyDateAndTime(info->last_access_time)), |
| 122 out); | 122 out); |
| 123 AddLiTag(kLastUpdateTime, | 123 AddLiTag(kLastUpdateTime, |
| 124 WideToUTF8(TimeFormatFriendlyDateAndTime(info->last_update_time)), | 124 UTF16ToUTF8(TimeFormatFriendlyDateAndTime(info->last_update_time)), |
| 125 out); | 125 out); |
| 126 | 126 |
| 127 out->append("</ul></p></br>"); | 127 out->append("</ul></p></br>"); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 std::string GetAppCacheManifestToRemove(const std::string& query) { | 131 std::string GetAppCacheManifestToRemove(const std::string& query) { |
| 132 if (!StartsWithASCII(query, "remove=", true)) { | 132 if (!StartsWithASCII(query, "remove=", true)) { |
| 133 // Not a recognized format. | 133 // Not a recognized format. |
| 134 return std::string(); | 134 return std::string(); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 data->append(kErrorMessage); | 251 data->append(kErrorMessage); |
| 252 else if (info_collection_->infos_by_origin.empty()) | 252 else if (info_collection_->infos_by_origin.empty()) |
| 253 data->append(kEmptyAppCachesMessage); | 253 data->append(kEmptyAppCachesMessage); |
| 254 else | 254 else |
| 255 GenerateHTMLAppCacheInfo(data); | 255 GenerateHTMLAppCacheInfo(data); |
| 256 EndHTML(data); | 256 EndHTML(data); |
| 257 return true; | 257 return true; |
| 258 } | 258 } |
| 259 | 259 |
| 260 } // namespace appcache | 260 } // namespace appcache |
| OLD | NEW |