naiveproxy/services/network/public/mojom/restricted_cookie_manager.mojom
2018-08-11 05:35:24 +00:00

39 lines
1.3 KiB
Plaintext

// Copyright 2017 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.
module network.mojom;
import "services/network/public/mojom/cookie_manager.mojom";
import "mojo/public/mojom/base/time.mojom";
import "url/mojom/url.mojom";
enum CookieMatchType {
EQUALS,
STARTS_WITH,
};
struct CookieManagerGetOptions {
string name;
CookieMatchType match_type;
};
interface RestrictedCookieManager {
// Returns the cookies visible by a Web page, filtered by |options|.
//
// |url| is the URL of the page making the request. |site_for_cookies| is
// described in RFC 6265bis. Values are populated by untrusted clients.
GetAllForUrl(
url.mojom.Url url, url.mojom.Url site_for_cookies,
CookieManagerGetOptions options) => (array<CanonicalCookie> cookies);
SetCanonicalCookie(CanonicalCookie cookie,
url.mojom.Url url,
url.mojom.Url site_for_cookies) => (bool success);
// Subscribes to changes in the cookies sent with a request to an URL.
//
// The subscription is canceled by closing the pipe.
AddChangeListener(url.mojom.Url url, url.mojom.Url site_for_cookies,
CookieChangeListener listener);
};