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

Side by Side Diff: chrome/browser/ui/views/appcache_info_view.cc

Issue 10332211: views: Remove appcache_info_view* and generic_info_view* files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/appcache_info_view.h"
6
7 #include "base/i18n/time_formatting.h"
8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h"
10 #include "grit/generated_resources.h"
11 #include "ui/base/text/bytes_formatting.h"
12
13 namespace {
14 const int kInfoLabelIds[] = {
15 IDS_COOKIES_APPLICATION_CACHE_MANIFEST_LABEL,
16 IDS_COOKIES_SIZE_LABEL,
17 IDS_COOKIES_COOKIE_CREATED_LABEL,
18 IDS_COOKIES_LAST_ACCESSED_LABEL
19 };
20 } // namespace
21
22 AppCacheInfoView::AppCacheInfoView()
23 : GenericInfoView(ARRAYSIZE(kInfoLabelIds), kInfoLabelIds) {
24 }
25
26 void AppCacheInfoView::SetAppCacheInfo(const appcache::AppCacheInfo* info) {
27 DCHECK(info);
28 string16 manifest_url =
29 UTF8ToUTF16(info->manifest_url.spec());
30 string16 size =
31 ui::FormatBytes(info->size);
32 string16 creation_date =
33 base::TimeFormatFriendlyDateAndTime(info->creation_time);
34 string16 last_access_date =
35 base::TimeFormatFriendlyDateAndTime(info->last_access_time);
36 int row = 0;
37 SetValue(row++, manifest_url);
38 SetValue(row++, size);
39 SetValue(row++, creation_date);
40 SetValue(row++, last_access_date);
41 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/appcache_info_view.h ('k') | chrome/browser/ui/views/generic_info_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698