Index: chrome/browser/browsing_data/media_licenses_counter.cc |
diff --git a/chrome/browser/browsing_data/media_licenses_counter.cc b/chrome/browser/browsing_data/media_licenses_counter.cc |
index 3aa47d6dc38ba466107004a42abb022f766546fe..e5d19c845aad3912bd8e5148465435a6eb5f393e 100644 |
--- a/chrome/browser/browsing_data/media_licenses_counter.cc |
+++ b/chrome/browser/browsing_data/media_licenses_counter.cc |
@@ -9,6 +9,7 @@ |
#include "base/memory/ptr_util.h" |
#include "base/memory/ref_counted.h" |
#include "base/task_runner_util.h" |
+#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/pref_names.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/storage_partition.h" |
@@ -50,20 +51,18 @@ const std::string& MediaLicensesCounter::MediaLicenseResult::GetOneOrigin() |
return one_origin_; |
} |
-MediaLicensesCounter::MediaLicensesCounter() |
- : pref_name_(prefs::kDeleteMediaLicenses), weak_ptr_factory_(this) {} |
+MediaLicensesCounter::MediaLicensesCounter(Profile* profile) |
+ : BrowsingDataCounter(prefs::kDeleteMediaLicenses), |
+ profile_(profile), |
+ weak_ptr_factory_(this) {} |
MediaLicensesCounter::~MediaLicensesCounter() {} |
-const std::string& MediaLicensesCounter::GetPrefName() const { |
- return pref_name_; |
-} |
- |
void MediaLicensesCounter::Count() { |
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
scoped_refptr<storage::FileSystemContext> filesystem_context = |
make_scoped_refptr( |
- content::BrowserContext::GetDefaultStoragePartition(GetProfile()) |
+ content::BrowserContext::GetDefaultStoragePartition(profile_) |
->GetFileSystemContext()); |
base::PostTaskAndReplyWithResult( |
filesystem_context->default_file_task_runner(), FROM_HERE, |