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

Unified Diff: chrome/browser/browsing_data/local_data_container.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/local_data_container.cc
diff --git a/chrome/browser/browsing_data/local_data_container.cc b/chrome/browser/browsing_data/local_data_container.cc
index 395c32980920cebe6820620cfe19aa9d06846837..00a4fdc7df6c1975846eb29876eb63fcacf208a2 100644
--- a/chrome/browser/browsing_data/local_data_container.cc
+++ b/chrome/browser/browsing_data/local_data_container.cc
@@ -26,7 +26,8 @@ LocalDataContainer::LocalDataContainer(
scoped_refptr<BrowsingDataChannelIDHelper> channel_id_helper,
scoped_refptr<BrowsingDataServiceWorkerHelper> service_worker_helper,
scoped_refptr<BrowsingDataCacheStorageHelper> cache_storage_helper,
- scoped_refptr<BrowsingDataFlashLSOHelper> flash_lso_helper)
+ scoped_refptr<BrowsingDataFlashLSOHelper> flash_lso_helper,
+ scoped_refptr<BrowsingDataMediaLicenseHelper> media_license_helper)
: appcache_helper_(std::move(appcache_helper)),
cookie_helper_(std::move(cookie_helper)),
database_helper_(std::move(database_helper)),
@@ -39,6 +40,7 @@ LocalDataContainer::LocalDataContainer(
service_worker_helper_(std::move(service_worker_helper)),
cache_storage_helper_(std::move(cache_storage_helper)),
flash_lso_helper_(std::move(flash_lso_helper)),
+ media_license_helper_(std::move(media_license_helper)),
weak_ptr_factory_(this) {}
LocalDataContainer::~LocalDataContainer() {}
@@ -132,6 +134,13 @@ void LocalDataContainer::Init(CookiesTreeModel* model) {
weak_ptr_factory_.GetWeakPtr()));
}
+ if (media_license_helper_.get()) {
+ batches_started_++;
+ media_license_helper_->StartFetching(
+ base::Bind(&LocalDataContainer::OnMediaLicenseInfoLoaded,
+ weak_ptr_factory_.GetWeakPtr()));
+ }
+
model_->SetBatchExpectation(batches_started_, true);
}
@@ -234,3 +243,10 @@ void LocalDataContainer::OnFlashLSOInfoLoaded(
DCHECK(model_);
model_->PopulateFlashLSOInfo(this);
}
+
+void LocalDataContainer::OnMediaLicenseInfoLoaded(
+ const MediaLicenseInfoList& media_license_info) {
+ media_license_info_list_ = media_license_info;
+ DCHECK(model_);
+ model_->PopulateMediaLicenseInfo(this);
+}

Powered by Google App Engine
This is Rietveld 408576698