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

Side by Side Diff: chrome/browser/ui/webui/cookies_tree_model_util.cc

Issue 2359393002: Adds media license nodes to cookie tree model and cookies view. (Closed)
Patch Set: rebase Created 4 years, 2 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
OLDNEW
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 cache_storage_info.last_modified))); 292 cache_storage_info.last_modified)));
293 break; 293 break;
294 } 294 }
295 case CookieTreeNode::DetailedInfo::TYPE_FLASH_LSO: { 295 case CookieTreeNode::DetailedInfo::TYPE_FLASH_LSO: {
296 dict->SetString(kKeyType, "flash_lso"); 296 dict->SetString(kKeyType, "flash_lso");
297 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_ICON"); 297 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_ICON");
298 298
299 dict->SetString(kKeyDomain, node.GetDetailedInfo().flash_lso_domain); 299 dict->SetString(kKeyDomain, node.GetDetailedInfo().flash_lso_domain);
300 break; 300 break;
301 } 301 }
302 case CookieTreeNode::DetailedInfo::TYPE_MEDIA_LICENSE: {
303 dict->SetString(kKeyType, "media_license");
304 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON");
305
306 const BrowsingDataMediaLicenseHelper::MediaLicenseInfo&
307 media_license_info = *node.GetDetailedInfo().media_license_info;
308 dict->SetString(kKeyOrigin, media_license_info.origin.spec());
309 dict->SetString(kKeySize, ui::FormatBytes(media_license_info.size));
310 dict->SetString(kKeyModified,
311 base::UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime(
312 media_license_info.last_modified_time)));
313 break;
314 }
302 default: 315 default:
303 #if defined(OS_MACOSX) 316 #if defined(OS_MACOSX)
304 dict->SetString(kKeyIcon, "chrome://theme/IDR_BOOKMARK_BAR_FOLDER"); 317 dict->SetString(kKeyIcon, "chrome://theme/IDR_BOOKMARK_BAR_FOLDER");
305 #endif 318 #endif
306 break; 319 break;
307 } 320 }
308 321
309 #if defined(ENABLE_EXTENSIONS) 322 #if defined(ENABLE_EXTENSIONS)
310 const extensions::ExtensionSet* protecting_apps = 323 const extensions::ExtensionSet* protecting_apps =
311 node.GetModel()->ExtensionsProtectingNode(node); 324 node.GetModel()->ExtensionsProtectingNode(node);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 child = id_map_.Lookup(node_id); 369 child = id_map_.Lookup(node_id);
357 child_index = parent->GetIndexOf(child); 370 child_index = parent->GetIndexOf(child);
358 if (child_index == -1) 371 if (child_index == -1)
359 break; 372 break;
360 373
361 parent = child; 374 parent = child;
362 } 375 }
363 376
364 return child_index >= 0 ? child : NULL; 377 return child_index >= 0 ? child : NULL;
365 } 378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698