| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 out->append(anchored_manifest); | 102 out->append(anchored_manifest); |
| 103 if (!appcache_service.appcache_policy()->CanLoadAppCache( | 103 if (!appcache_service.appcache_policy()->CanLoadAppCache( |
| 104 info->manifest_url)) { | 104 info->manifest_url)) { |
| 105 out->append(kFormattedDisabledAppCacheMsg); | 105 out->append(kFormattedDisabledAppCacheMsg); |
| 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 WideToUTF8(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 WideToUTF8(TimeFormatFriendlyDateAndTime( |
| 117 info->creation_time)), | 117 info->creation_time)), |
| 118 out); | 118 out); |
| 119 AddLiTag(kLastAccessTime, | 119 AddLiTag(kLastAccessTime, |
| 120 WideToUTF8( | 120 WideToUTF8( |
| 121 TimeFormatFriendlyDateAndTime(info->last_access_time)), | 121 TimeFormatFriendlyDateAndTime(info->last_access_time)), |
| 122 out); | 122 out); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 data->append(kErrorMessage); | 250 data->append(kErrorMessage); |
| 251 else if (info_collection_->infos_by_origin.empty()) | 251 else if (info_collection_->infos_by_origin.empty()) |
| 252 data->append(kEmptyAppCachesMessage); | 252 data->append(kEmptyAppCachesMessage); |
| 253 else | 253 else |
| 254 GenerateHTMLAppCacheInfo(data); | 254 GenerateHTMLAppCacheInfo(data); |
| 255 EndHTML(data); | 255 EndHTML(data); |
| 256 return true; | 256 return true; |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace appcache | 259 } // namespace appcache |
| OLD | NEW |