| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 break; | 178 break; |
| 179 } | 179 } |
| 180 case CookieTreeNode::DetailedInfo::TYPE_INDEXED_DB: { | 180 case CookieTreeNode::DetailedInfo::TYPE_INDEXED_DB: { |
| 181 dict->SetString(kKeyType, "indexed_db"); | 181 dict->SetString(kKeyType, "indexed_db"); |
| 182 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); | 182 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); |
| 183 | 183 |
| 184 const content::IndexedDBInfo& indexed_db_info = | 184 const content::IndexedDBInfo& indexed_db_info = |
| 185 *node.GetDetailedInfo().indexed_db_info; | 185 *node.GetDetailedInfo().indexed_db_info; |
| 186 | 186 |
| 187 dict->SetString(kKeyOrigin, indexed_db_info.origin.spec()); | 187 dict->SetString(kKeyOrigin, indexed_db_info.origin_.spec()); |
| 188 dict->SetString(kKeySize, ui::FormatBytes(indexed_db_info.size)); | 188 dict->SetString(kKeySize, ui::FormatBytes(indexed_db_info.size_)); |
| 189 dict->SetString(kKeyModified, UTF16ToUTF8( | 189 dict->SetString(kKeyModified, UTF16ToUTF8( |
| 190 base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified))); | 190 base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified_))); |
| 191 | 191 |
| 192 break; | 192 break; |
| 193 } | 193 } |
| 194 case CookieTreeNode::DetailedInfo::TYPE_FILE_SYSTEM: { | 194 case CookieTreeNode::DetailedInfo::TYPE_FILE_SYSTEM: { |
| 195 dict->SetString(kKeyType, "file_system"); | 195 dict->SetString(kKeyType, "file_system"); |
| 196 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); | 196 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); |
| 197 | 197 |
| 198 const BrowsingDataFileSystemHelper::FileSystemInfo& file_system_info = | 198 const BrowsingDataFileSystemHelper::FileSystemInfo& file_system_info = |
| 199 *node.GetDetailedInfo().file_system_info; | 199 *node.GetDetailedInfo().file_system_info; |
| 200 | 200 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 child = id_map_.Lookup(node_id); | 312 child = id_map_.Lookup(node_id); |
| 313 child_index = parent->GetIndexOf(child); | 313 child_index = parent->GetIndexOf(child); |
| 314 if (child_index == -1) | 314 if (child_index == -1) |
| 315 break; | 315 break; |
| 316 | 316 |
| 317 parent = child; | 317 parent = child; |
| 318 } | 318 } |
| 319 | 319 |
| 320 return child_index >= 0 ? child : NULL; | 320 return child_index >= 0 ? child : NULL; |
| 321 } | 321 } |
| OLD | NEW |