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

Side by Side Diff: chrome/browser/browsing_data/media_license_counter.h

Issue 2075023002: UI Changes to support clearing EME/CDM data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_BROWSING_DATA_MEDIA_LICENSE_COUNTER_H_
xhwang 2016/06/17 06:24:30 This file should be media_license*s*_counter.h to
jrummell 2016/06/21 00:13:44 Hmmm. There is autofill_counter, cache_counter, bu
6 #define CHROME_BROWSER_BROWSING_DATA_MEDIA_LICENSE_COUNTER_H_
7
8 #include <set>
9 #include <string>
10
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/browsing_data/browsing_data_counter.h"
13 #include "url/gurl.h"
14
15 // MediaLicenseCounter is used to determine the number of origins that
16 // have plugin private filesystem data (used by EME). It does not include
17 // origins that have content licenses owned by Flash.
18 class MediaLicenseCounter : public BrowsingDataCounter {
19 public:
20 // MediaLicenseResult is the result of counting the number of origins
21 // that have plugin private filesystem data. It also contains one of the
22 // origins so that a message can displayed providing an example of the
23 // origins that hold content licenses.
24 class MediaLicenseResult : public FinishedResult {
25 public:
26 MediaLicenseResult(const MediaLicenseCounter* source,
27 std::set<GURL> origins);
xhwang 2016/06/17 06:24:30 pass origins by const-ref to avoid copy?
jrummell 2016/06/21 00:13:44 Done.
28 ~MediaLicenseResult() override;
29
30 const std::string& GetOneOrigin() const;
31
32 private:
33 std::string one_origin_;
34 };
35
36 MediaLicenseCounter();
37 ~MediaLicenseCounter() override;
38
39 // BrowsingDataCounter implementation.
40 const std::string& GetPrefName() const final;
41
42 private:
43 // BrowsingDataCounter implementation.
44 void Count() final;
45
46 // Determining the set of origins used by the plugin private filesystem is
47 // done asynchronously. This callback returns the results, which are
48 // subsequently reported.
49 void OnContentLicensesObtained(std::set<GURL> origins);
xhwang 2016/06/17 06:24:30 pass by const ref
jrummell 2016/06/21 00:13:44 Done.
50
51 const std::string pref_name_;
52 base::WeakPtrFactory<MediaLicenseCounter> weak_ptr_factory_;
53 };
54
55 #endif // CHROME_BROWSER_BROWSING_DATA_MEDIA_LICENSE_COUNTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698