// 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_PUBLIC_BROWSER_BROWSER_OR_RESOURCE_CONTEXT_H_ #define CONTENT_PUBLIC_BROWSER_BROWSER_OR_RESOURCE_CONTEXT_H_ #include <cstddef> #include "base/memory/raw_ref.h" #include "content/common/content_export.h" #include "content/public/browser/browser_thread.h" #include "third_party/abseil-cpp/absl/types/variant.h" namespace content { class BrowserContext; class ResourceContext; // A class holding either BrowserContext*, a ResourceContext*, or nothing. This // class should hold a BrowserContext* when constructed on the UI thread and a // ResourceContext* when constructed on the IO thread. This object must only be // accessed on the thread it was constructed and does not allow converting // between the two pointer types. class CONTENT_EXPORT BrowserOrResourceContext final { … }; } // namespace content #endif // CONTENT_PUBLIC_BROWSER_BROWSER_OR_RESOURCE_CONTEXT_H_