| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 cache_storage_info.last_modified))); | 288 cache_storage_info.last_modified))); |
| 289 break; | 289 break; |
| 290 } | 290 } |
| 291 case CookieTreeNode::DetailedInfo::TYPE_FLASH_LSO: { | 291 case CookieTreeNode::DetailedInfo::TYPE_FLASH_LSO: { |
| 292 dict->SetString(kKeyType, "flash_lso"); | 292 dict->SetString(kKeyType, "flash_lso"); |
| 293 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_ICON"); | 293 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_ICON"); |
| 294 | 294 |
| 295 dict->SetString(kKeyDomain, node.GetDetailedInfo().flash_lso_domain); | 295 dict->SetString(kKeyDomain, node.GetDetailedInfo().flash_lso_domain); |
| 296 break; | 296 break; |
| 297 } | 297 } |
| 298 case CookieTreeNode::DetailedInfo::TYPE_MEDIA_LICENSE: { |
| 299 dict->SetString(kKeyType, "media_license"); |
| 300 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); |
| 301 |
| 302 const BrowsingDataMediaLicenseHelper::MediaLicenseInfo& |
| 303 media_license_info = *node.GetDetailedInfo().media_license_info; |
| 304 dict->SetString(kKeyOrigin, media_license_info.origin.spec()); |
| 305 dict->SetString(kKeySize, ui::FormatBytes(media_license_info.size)); |
| 306 dict->SetString(kKeyModified, |
| 307 base::UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( |
| 308 media_license_info.last_modified_time))); |
| 309 break; |
| 310 } |
| 298 default: | 311 default: |
| 299 #if defined(OS_MACOSX) | 312 #if defined(OS_MACOSX) |
| 300 dict->SetString(kKeyIcon, "chrome://theme/IDR_BOOKMARK_BAR_FOLDER"); | 313 dict->SetString(kKeyIcon, "chrome://theme/IDR_BOOKMARK_BAR_FOLDER"); |
| 301 #endif | 314 #endif |
| 302 break; | 315 break; |
| 303 } | 316 } |
| 304 | 317 |
| 305 #if defined(ENABLE_EXTENSIONS) | 318 #if defined(ENABLE_EXTENSIONS) |
| 306 const extensions::ExtensionSet* protecting_apps = | 319 const extensions::ExtensionSet* protecting_apps = |
| 307 node.GetModel()->ExtensionsProtectingNode(node); | 320 node.GetModel()->ExtensionsProtectingNode(node); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 child = id_map_.Lookup(node_id); | 364 child = id_map_.Lookup(node_id); |
| 352 child_index = parent->GetIndexOf(child); | 365 child_index = parent->GetIndexOf(child); |
| 353 if (child_index == -1) | 366 if (child_index == -1) |
| 354 break; | 367 break; |
| 355 | 368 |
| 356 parent = child; | 369 parent = child; |
| 357 } | 370 } |
| 358 | 371 |
| 359 return child_index >= 0 ? child : NULL; | 372 return child_index >= 0 ? child : NULL; |
| 360 } | 373 } |
| OLD | NEW |