| 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 "chrome/browser/ui/webui/cookies_tree_model_util.h" | 5 #include "chrome/browser/ui/webui/cookies_tree_model_util.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/i18n/time_formatting.h" | 9 #include "base/i18n/time_formatting.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 dict->SetString(kKeyModified, base::UTF16ToUTF8( | 161 dict->SetString(kKeyModified, base::UTF16ToUTF8( |
| 162 base::TimeFormatFriendlyDateAndTime( | 162 base::TimeFormatFriendlyDateAndTime( |
| 163 local_storage_info.last_modified))); | 163 local_storage_info.last_modified))); |
| 164 | 164 |
| 165 break; | 165 break; |
| 166 } | 166 } |
| 167 case CookieTreeNode::DetailedInfo::TYPE_APPCACHE: { | 167 case CookieTreeNode::DetailedInfo::TYPE_APPCACHE: { |
| 168 dict->SetString(kKeyType, "app_cache"); | 168 dict->SetString(kKeyType, "app_cache"); |
| 169 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); | 169 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); |
| 170 | 170 |
| 171 const appcache::AppCacheInfo& appcache_info = | 171 const content::AppCacheInfo& appcache_info = |
| 172 *node.GetDetailedInfo().appcache_info; | 172 *node.GetDetailedInfo().appcache_info; |
| 173 | 173 |
| 174 dict->SetString(kKeyManifest, appcache_info.manifest_url.spec()); | 174 dict->SetString(kKeyManifest, appcache_info.manifest_url.spec()); |
| 175 dict->SetString(kKeySize, ui::FormatBytes(appcache_info.size)); | 175 dict->SetString(kKeySize, ui::FormatBytes(appcache_info.size)); |
| 176 dict->SetString(kKeyCreated, base::UTF16ToUTF8( | 176 dict->SetString(kKeyCreated, base::UTF16ToUTF8( |
| 177 base::TimeFormatFriendlyDateAndTime(appcache_info.creation_time))); | 177 base::TimeFormatFriendlyDateAndTime(appcache_info.creation_time))); |
| 178 dict->SetString(kKeyAccessed, base::UTF16ToUTF8( | 178 dict->SetString(kKeyAccessed, base::UTF16ToUTF8( |
| 179 base::TimeFormatFriendlyDateAndTime(appcache_info.last_access_time))); | 179 base::TimeFormatFriendlyDateAndTime(appcache_info.last_access_time))); |
| 180 | 180 |
| 181 break; | 181 break; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 child = id_map_.Lookup(node_id); | 317 child = id_map_.Lookup(node_id); |
| 318 child_index = parent->GetIndexOf(child); | 318 child_index = parent->GetIndexOf(child); |
| 319 if (child_index == -1) | 319 if (child_index == -1) |
| 320 break; | 320 break; |
| 321 | 321 |
| 322 parent = child; | 322 parent = child; |
| 323 } | 323 } |
| 324 | 324 |
| 325 return child_index >= 0 ? child : NULL; | 325 return child_index >= 0 ? child : NULL; |
| 326 } | 326 } |
| OLD | NEW |