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

Unified Diff: chrome/browser/browsing_data/media_licenses_counter.cc

Issue 2084903002: Moved BrowsingDataCounter and part of BrowsingDataCounterUtils to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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/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,

Powered by Google App Engine
This is Rietveld 408576698