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

Unified Diff: chrome/browser/browsing_data/mock_browsing_data_media_license_helper.h

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/mock_browsing_data_media_license_helper.h
diff --git a/chrome/browser/browsing_data/mock_browsing_data_media_license_helper.h b/chrome/browser/browsing_data/mock_browsing_data_media_license_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..206864cd8b6bf4466455ec62f627e18a7b160707
--- /dev/null
+++ b/chrome/browser/browsing_data/mock_browsing_data_media_license_helper.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_MEDIA_LICENSE_HELPER_H_
+#define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_MEDIA_LICENSE_HELPER_H_
+
+#include <stdint.h>
+#include <list>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "base/time/time.h"
+#include "chrome/browser/browsing_data/browsing_data_media_license_helper.h"
+#include "chrome/browser/profiles/profile.h"
+#include "url/gurl.h"
+
+class MockBrowsingDataMediaLicenseHelper
+ : public BrowsingDataMediaLicenseHelper {
+ public:
+ explicit MockBrowsingDataMediaLicenseHelper(Profile* profile);
+
+ // BrowsingDataMediaLicenseHelper implementation:
+ void StartFetching(const FetchCallback& callback) override;
+ void DeleteMediaLicenseOrigin(const GURL& origin) override;
+
+ // Add some MediaLicenseInfo samples.
+ void AddMediaLicenseSamples();
+
+ // Notifies the callback.
+ void Notify();
+
+ // Returns true if the origin list is empty.
+ bool AllDeleted();
+
+ protected:
+ ~MockBrowsingDataMediaLicenseHelper() override;
+
+ private:
+ FetchCallback callback_;
+ std::list<MediaLicenseInfo> media_licenses_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataMediaLicenseHelper);
+};
+
+#endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_MEDIA_LICENSE_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698