forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmock_client_hints_utils.h
35 lines (26 loc) · 1.06 KB
/
mock_client_hints_utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2019 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 CONTENT_TEST_MOCK_CLIENT_HINTS_UTILS_H_
#define CONTENT_TEST_MOCK_CLIENT_HINTS_UTILS_H_
#include "content/public/common/origin_util.h"
#include "third_party/blink/public/platform/web_client_hints_type.h"
#include "third_party/blink/public/platform/web_url.h"
namespace content {
struct ClientHintsPersistencyData {
blink::WebEnabledClientHints client_hints;
base::Time expiration;
};
using ClientHintsContainer =
std::map<const url::Origin, ClientHintsPersistencyData>;
bool PersistClientHintsHelper(
const GURL& url,
const blink::WebEnabledClientHints& enabled_client_hints,
base::TimeDelta expiration_duration,
ClientHintsContainer* container);
void GetAllowedClientHintsFromSourceHelper(
const GURL& url,
const ClientHintsContainer& container,
blink::WebEnabledClientHints* client_hints);
} // namespace content
#endif // CONTENT_SHELL_TEST_CLIENT_HINTS_UTILS_H_