OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 break; | 162 break; |
163 } | 163 } |
164 case CookieTreeNode::DetailedInfo::TYPE_INDEXED_DB: { | 164 case CookieTreeNode::DetailedInfo::TYPE_INDEXED_DB: { |
165 dict->SetString(kKeyType, "indexed_db"); | 165 dict->SetString(kKeyType, "indexed_db"); |
166 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); | 166 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); |
167 | 167 |
168 const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info = | 168 const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info = |
169 *node.GetDetailedInfo().indexed_db_info; | 169 *node.GetDetailedInfo().indexed_db_info; |
170 | 170 |
171 dict->SetString(kKeyOrigin, indexed_db_info.origin); | 171 dict->SetString(kKeyOrigin, indexed_db_info.origin.spec()); |
172 dict->SetString(kKeySize, ui::FormatBytes(indexed_db_info.size)); | 172 dict->SetString(kKeySize, ui::FormatBytes(indexed_db_info.size)); |
173 dict->SetString(kKeyModified, UTF16ToUTF8( | 173 dict->SetString(kKeyModified, UTF16ToUTF8( |
174 base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified))); | 174 base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified))); |
175 | 175 |
176 break; | 176 break; |
177 } | 177 } |
178 case CookieTreeNode::DetailedInfo::TYPE_FILE_SYSTEM: { | 178 case CookieTreeNode::DetailedInfo::TYPE_FILE_SYSTEM: { |
179 dict->SetString(kKeyType, "file_system"); | 179 dict->SetString(kKeyType, "file_system"); |
180 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); | 180 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); |
181 | 181 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 if (child_index == -1) | 259 if (child_index == -1) |
260 break; | 260 break; |
261 | 261 |
262 parent = child; | 262 parent = child; |
263 } | 263 } |
264 | 264 |
265 return child_index >= 0 ? child : NULL; | 265 return child_index >= 0 ? child : NULL; |
266 } | 266 } |
267 | 267 |
268 } // namespace cookies_tree_model_util | 268 } // namespace cookies_tree_model_util |
OLD | NEW |