Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: webkit/appcache/view_appcache_internals_job.cc

Issue 6064003: Update the time formatting APIs to use string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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(info->creation_time)),
117 info->creation_time)),
118 out); 117 out);
119 AddLiTag(kLastAccessTime, 118 AddLiTag(kLastAccessTime,
120 WideToUTF8( 119 UTF16ToUTF8(TimeFormatFriendlyDateAndTime(info->last_access_time)),
121 TimeFormatFriendlyDateAndTime(info->last_access_time)),
122 out); 120 out);
123 AddLiTag(kLastUpdateTime, 121 AddLiTag(kLastUpdateTime,
124 WideToUTF8(TimeFormatFriendlyDateAndTime(info->last_update_time)), 122 UTF16ToUTF8(TimeFormatFriendlyDateAndTime(info->last_update_time)),
125 out); 123 out);
126 124
127 out->append("</ul></p></br>"); 125 out->append("</ul></p></br>");
128 } 126 }
129 } 127 }
130 128
131 std::string GetAppCacheManifestToRemove(const std::string& query) { 129 std::string GetAppCacheManifestToRemove(const std::string& query) {
132 if (!StartsWithASCII(query, "remove=", true)) { 130 if (!StartsWithASCII(query, "remove=", true)) {
133 // Not a recognized format. 131 // Not a recognized format.
134 return std::string(); 132 return std::string();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 data->append(kErrorMessage); 249 data->append(kErrorMessage);
252 else if (info_collection_->infos_by_origin.empty()) 250 else if (info_collection_->infos_by_origin.empty())
253 data->append(kEmptyAppCachesMessage); 251 data->append(kEmptyAppCachesMessage);
254 else 252 else
255 GenerateHTMLAppCacheInfo(data); 253 GenerateHTMLAppCacheInfo(data);
256 EndHTML(data); 254 EndHTML(data);
257 return true; 255 return true;
258 } 256 }
259 257
260 } // namespace appcache 258 } // namespace appcache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698