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
content / public / browser / prefetch_browser_callbacks.h [blame]
// Copyright 2024 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_PUBLIC_BROWSER_PREFETCH_BROWSER_CALLBACKS_H_
#define CONTENT_PUBLIC_BROWSER_PREFETCH_BROWSER_CALLBACKS_H_
#include "base/functional/callback.h"
#include "base/functional/callback_forward.h"
namespace content {
enum class PrefetchStartResultCode {
// Prefetch was started successfully (i.e. the URL loader was created &
// started).
kSuccess = 0,
// Prefetch failed to start.
kFailed = 1,
};
// Used to report when a prefetch request has either started (i.e. the URL
// loader has been created & started) or failed to start. This interface is
// experimental and is subject to change, therefore it is not recommended to use
// this outside of WebView app initiated prefetching.
using PrefetchStartCallback =
base::OnceCallback<void(const PrefetchStartResultCode)>;
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_PREFETCH_BROWSER_CALLBACKS_H_