chromium/content/browser/cookie_store/cookie_change_subscription.h

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_BROWSER_COOKIE_STORE_COOKIE_CHANGE_SUBSCRIPTION_H_
#define CONTENT_BROWSER_COOKIE_STORE_COOKIE_CHANGE_SUBSCRIPTION_H_

#include <memory>
#include <string>

#include "base/containers/linked_list.h"
#include "third_party/blink/public/mojom/cookie_store/cookie_store.mojom.h"
#include "url/gurl.h"

namespace net {
class CanonicalCookie;
enum class CookieAccessSemantics;
}  // namespace net

namespace content {

namespace proto {

class CookieChangeSubscriptionProto;

}  // namespace proto

// Represents a single subscription to the list of cookies sent to a URL.
//
// The included linked list node and service worker registration ID are used by
// CookieStoreManager. They are ignored when comparing instances.
class CookieChangeSubscription
    : public base::LinkNode<CookieChangeSubscription> {};

// Used to deduplicate equivalent subscriptons.
//
// Ignores the service worker registration ID and the linked list node.
bool operator==(const CookieChangeSubscription& lhs,
                const CookieChangeSubscription& rhs);

}  // namespace content

#endif  // CONTENT_BROWSER_COOKIE_STORE_COOKIE_CHANGE_SUBSCRIPTION_H_