| OLD | NEW |
| (Empty) | |
| 1 // Copyright 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_MOCK_BROWSING_DATA_MEDIA_LICENSE_HELPER_H_ |
| 6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_MEDIA_LICENSE_HELPER_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 #include <list> |
| 10 |
| 11 #include "base/callback.h" |
| 12 #include "base/macros.h" |
| 13 #include "base/time/time.h" |
| 14 #include "chrome/browser/browsing_data/browsing_data_media_license_helper.h" |
| 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "url/gurl.h" |
| 17 |
| 18 class MockBrowsingDataMediaLicenseHelper |
| 19 : public BrowsingDataMediaLicenseHelper { |
| 20 public: |
| 21 explicit MockBrowsingDataMediaLicenseHelper(Profile* profile); |
| 22 |
| 23 // BrowsingDataMediaLicenseHelper implementation: |
| 24 void StartFetching(const FetchCallback& callback) override; |
| 25 void DeleteMediaLicenseOrigin(const GURL& origin) override; |
| 26 |
| 27 // Add some MediaLicenseInfo samples. |
| 28 void AddMediaLicenseSamples(); |
| 29 |
| 30 // Notifies the callback. |
| 31 void Notify(); |
| 32 |
| 33 // Returns true if the origin list is empty. |
| 34 bool AllDeleted(); |
| 35 |
| 36 protected: |
| 37 ~MockBrowsingDataMediaLicenseHelper() override; |
| 38 |
| 39 private: |
| 40 FetchCallback callback_; |
| 41 std::list<MediaLicenseInfo> media_licenses_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataMediaLicenseHelper); |
| 44 }; |
| 45 |
| 46 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_MEDIA_LICENSE_HELPER_
H_ |
| OLD | NEW |