Compare commits

..

20 Commits
5672 ... 5615

Author SHA1 Message Date
Nik Pavlov
b09c4ca5f8 mac: views: Add CefWindowDelegate::OnWindowFullscreenTransition 2023-04-20 15:09:04 -04:00
Marshall Greenblatt
06a2f796b3 Update to Chromium version 112.0.5615.165 2023-04-20 13:50:12 +00:00
Marshall Greenblatt
1ee0aee454 Update to Chromium version 112.0.5615.138 2023-04-19 15:58:37 +00:00
Marshall Greenblatt
d000e45ee4 Update to Chromium version 112.0.5615.121 2023-04-17 17:41:10 +00:00
Marshall Greenblatt
3303e87ba1 Update to Chromium version 112.0.5615.87 2023-04-13 13:38:28 +00:00
Marshall Greenblatt
09ce0e709d alloy: Fix incorrect rendering of PiP overlay on mouseover (fixes #3482)
Initialize the Chrome color mixer so that ColorProvider returns the expected
semi-transparent color for overlay background in video_overlay_window_views.cc
instead of the default opaque red color (kPlaceholderColor).
2023-04-11 14:44:56 -04:00
Marshall Greenblatt
ef29713a46 Update to Chromium version 112.0.5615.49 2023-04-06 12:18:06 -04:00
Marshall Greenblatt
aad7246e7f Update to Chromium version 112.0.5615.29 2023-03-18 15:18:18 +00:00
Marshall Greenblatt
208a5f3499 Remove rlz_tracker_4294854.patch
This change was merged to 112.0.5615.13.
2023-03-17 10:24:04 -04:00
Nik Pavlov
7e7301c7b0 views: mac: Support dynamic resize of title bar height (see #3189)
This is intended for usage with frameless windows that show the standard window
buttons, where resizing the title bar height changes the button offset. Returning a
different value from CefWindowDelegate::GetTitlebarHeight and forcing a resize of
the NSWindow's theme frame (see ViewsWindow::NudgeWindow) will update the
title bar height.

To test:
1. Run `cefclient --use-views --hide-frame --show-window-buttons --url=http://tests/window`
2. Enter a new value for title bar height and click the "Set Titlebar Height" button
2023-03-16 13:22:27 -04:00
Nik Pavlov
ee888e5b3f views: mac: Enable WindowTestRunnerViews 2023-03-16 13:22:24 -04:00
Marshall Greenblatt
25c811254c chrome: Move ThreadProfiler initialization to the UI thread (fixes #3465)
ThreadProfiler::CreateAndStartOnMainThread and SetMainThreadTaskRunnerImpl
should be called on the same thread.
2023-03-14 15:17:59 -04:00
Marshall Greenblatt
1bcb2c1cf8 Rewrite issue links to GitHub (see #3464) 2023-03-13 13:52:18 -04:00
Marshall Greenblatt
f8b9812cb4 chrome: Add ability to hide toolbar and app menu contents (see issue #3280)
This change adds new CefCommandHandler callbacks for optionally hiding
specific Chrome toolbar icons, buttons and app menu items.

To test: Run `cefclient --enable-chrome-runtime --filter-chrome-commands`.
Most icons, buttons and app/context menu items will be hidden.
2023-03-08 13:17:53 -05:00
Nik Pavlov
798bc0e9cc views: mac: Show standard window buttons with frame by default (see issue #3189)
This restores the previous default behavior for framed windows.
2023-03-08 12:01:34 -05:00
Marshall Greenblatt
12c88501fd chrome: Don't show gray background during browser load (fixes issue #3459) 2023-03-06 15:54:21 -05:00
Marshall Greenblatt
8656630d99 Update API hash for commit 1316cc17b6 2023-03-06 15:53:54 -05:00
Sergey Markelov
1316cc17b6 Fix compile error: this function declaration is not a prototype
`cef_basetime_now()` failed to compile if `-Wstrict-prototypes` is set in clang
or gcc.
2023-03-06 11:50:35 -05:00
梅迎朝
0a165d44d6 cefclient: Fix incorrect logic in PassThruResponseFilter 2023-03-06 11:50:29 -05:00
Marshall Greenblatt
6df4fcb125 Update to Chromium version 112.0.5615.9 2023-03-03 19:50:02 -05:00
508 changed files with 1781 additions and 1993 deletions

View File

@@ -1,35 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen and what happened instead.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Versions (please complete the following information):**
- OS: [e.g. Windows 10, MacOS 13.2, Ubuntu 22.10]
- CEF Version: [e.g. 111.2.2]
**Additional context**
Does the problem reproduce with the cefclient or cefsimple sample application at the same version?
Does the problem reproduce with Google Chrome at the same version?
Add any other context about the problem here.

View File

@@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -7,6 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/113.0.5672.129',
'depot_tools_checkout': '2075f733e8'
'chromium_checkout': 'refs/tags/112.0.5615.165',
'depot_tools_checkout': '424814829a'
}

View File

@@ -13,7 +13,7 @@
#
# Linux: Ninja, GCC 7.5.0+, Unix Makefiles
# MacOS: Ninja, Xcode 12.2 to 13.0
# Windows: Ninja, Visual Studio 2022
# Windows: Ninja, Visual Studio 2019+
#
# Ninja is a cross-platform open-source tool for running fast builds using
# pre-installed platform toolchains (GNU, clang, Xcode or MSVC). It can be
@@ -54,9 +54,9 @@
# recommended.
#
# - Windows requirements:
# Visual Studio 2022 building on Windows 10 or newer. Windows 10/11 64-bit is
# recommended. Newer versions will likely also work but may not have been
# tested.
# Visual Studio 2019 or newer building on Windows 10 or newer. Windows 10
# 64-bit is recommended. Newer versions will likely also work but may not have
# been tested.
#
# BUILD EXAMPLES
#
@@ -96,35 +96,35 @@
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 32-bit CEF binary distribution:
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A Win32 ..
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A Win32 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2022 command-line tools:
# Using Ninja with Visual Studio 2019 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars32.bat"
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 64-bit CEF binary distribution:
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A x64 ..
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A x64 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2022 command-line tools:
# Using Ninja with Visual Studio 2019 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Windows build using an ARM64 CEF binary distribution:
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A arm64 ..
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A arm64 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2022 command-line tools:
# Using Ninja with Visual Studio 2019 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefsimple
@@ -132,8 +132,8 @@
# Global setup.
#
# For VS2022 and Xcode 12+ support.
cmake_minimum_required(VERSION 3.21)
# For VS2019 and Xcode 12+ support.
cmake_minimum_required(VERSION 3.19)
# Only generate Debug and Release configuration types.
set(CMAKE_CONFIGURATION_TYPES Debug Release)

View File

@@ -461,7 +461,7 @@ if(OS_WINDOWS)
# only) uses fibers to switch to a 4MiB stack at runtime via
# CefRunWinMainWithPreferredStackSize().
list(APPEND CEF_EXE_LINKER_FLAGS
/STACK:0x80000
/STACK:0x8000
)
else()
# Increase the initial stack size to 8MiB from the default 1MiB.

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=94e93810316b74e54eb315d97c6fc6f1cc0c9cc5$
// $hash=e38c41a553d518abcd1b912d32281e99b93c4fd7$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
@@ -120,18 +120,6 @@ typedef struct _cef_browser_view_delegate_t {
///
cef_chrome_toolbar_type_t(CEF_CALLBACK* get_chrome_toolbar_type)(
struct _cef_browser_view_delegate_t* self);
///
/// Called when |browser_view| receives a gesture command. Return true (1) to
/// handle (or disable) a |gesture_command| or false (0) to propagate the
/// gesture to the browser for default handling. This function will only be
/// called with the Alloy runtime. To handle these commands with the Chrome
/// runtime implement cef_command_handler_t::OnChromeCommand instead.
///
int(CEF_CALLBACK* on_gesture_command)(
struct _cef_browser_view_delegate_t* self,
struct _cef_browser_view_t* browser_view,
cef_gesture_command_t gesture_command);
} cef_browser_view_delegate_t;
#ifdef __cplusplus

View File

@@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "509090f3945a0c74991845085f47240f11389523"
#define CEF_API_HASH_UNIVERSAL "7c7515822b869395898c705bcc350222c26e8734"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "1c9ed9d86408e2d84cf88d4a8c865a2872eb40bd"
#define CEF_API_HASH_PLATFORM "54e2eed5aee11d5dbd88808a54f3e93a7bc17b0c"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "8cc9baa9653847ce54b2da84431d573bc3669505"
#define CEF_API_HASH_PLATFORM "0f491b440d7e9e318146ed06cdeca86972e801c5"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "741b042aa3d663f9e4ffad0b59d1bfb4faa03e70"
#define CEF_API_HASH_PLATFORM "b5a01a70d1d15078988ca7d694c355503d5b5ad6"
#endif
#ifdef __cplusplus

View File

@@ -3000,8 +3000,8 @@ typedef enum {
/// Structure representing a range.
///
typedef struct _cef_range_t {
uint32_t from;
uint32_t to;
int from;
int to;
} cef_range_t;
///
@@ -3488,14 +3488,6 @@ typedef enum {
CEF_PREFERENCES_TYPE_REQUEST_CONTEXT,
} cef_preferences_type_t;
///
/// Specifies the gesture commands.
///
typedef enum {
CEF_GESTURE_COMMAND_BACK,
CEF_GESTURE_COMMAND_FORWARD,
} cef_gesture_command_t;
#ifdef __cplusplus
}
#endif

View File

@@ -31,8 +31,6 @@
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
#pragma once
#include <limits>
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_types.h"
@@ -217,12 +215,7 @@ class CefRange : public cef_range_t {
public:
CefRange() : cef_range_t{} {}
CefRange(const cef_range_t& r) : cef_range_t(r) {}
CefRange(uint32_t from, uint32_t to) : cef_range_t{from, to} {}
static CefRange InvalidRange() {
return CefRange((std::numeric_limits<uint32_t>::max)(),
(std::numeric_limits<uint32_t>::max)());
}
CefRange(int from, int to) : cef_range_t{from, to} {}
void Set(int from_val, int to_val) { from = from_val, to = to_val; }
};

View File

@@ -114,19 +114,6 @@ class CefBrowserViewDelegate : public CefViewDelegate {
///
/*--cef(default_retval=CEF_CTT_NONE)--*/
virtual ChromeToolbarType GetChromeToolbarType() { return CEF_CTT_NONE; }
///
/// Called when |browser_view| receives a gesture command. Return true to
/// handle (or disable) a |gesture_command| or false to propagate the gesture
/// to the browser for default handling. This method will only be called with
/// the Alloy runtime. To handle these commands with the Chrome runtime
/// implement CefCommandHandler::OnChromeCommand instead.
///
/*--cef()--*/
virtual bool OnGestureCommand(CefRefPtr<CefBrowserView> browser_view,
cef_gesture_command_t gesture_command) {
return false;
}
};
#endif // CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_

View File

@@ -440,30 +440,30 @@ ProfileKey* AlloyBrowserContext::GetProfileKey() const {
policy::SchemaRegistryService*
AlloyBrowserContext::GetPolicySchemaRegistryService() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
policy::UserCloudPolicyManager*
AlloyBrowserContext::GetUserCloudPolicyManager() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
policy::ProfilePolicyConnector*
AlloyBrowserContext::GetProfilePolicyConnector() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
const policy::ProfilePolicyConnector*
AlloyBrowserContext::GetProfilePolicyConnector() const {
DCHECK(false);
NOTREACHED();
return nullptr;
}
bool AlloyBrowserContext::IsNewProfile() const {
DCHECK(false);
NOTREACHED();
return false;
}

View File

@@ -296,7 +296,7 @@ void AlloyBrowserHostImpl::CloseBrowser(bool force_close) {
bool AlloyBrowserHostImpl::TryCloseBrowser() {
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}
@@ -333,7 +333,7 @@ CefWindowHandle AlloyBrowserHostImpl::GetOpenerWindowHandle() {
double AlloyBrowserHostImpl::GetZoomLevel() {
// Verify that this method is being called on the UI thread.
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return 0;
}
@@ -416,7 +416,7 @@ void AlloyBrowserHostImpl::CloseDevTools() {
bool AlloyBrowserHostImpl::HasDevTools() {
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}
@@ -481,7 +481,7 @@ void AlloyBrowserHostImpl::WasResized() {
void AlloyBrowserHostImpl::WasHidden(bool hidden) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -498,7 +498,7 @@ void AlloyBrowserHostImpl::WasHidden(bool hidden) {
void AlloyBrowserHostImpl::NotifyScreenInfoChanged() {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -516,7 +516,7 @@ void AlloyBrowserHostImpl::NotifyScreenInfoChanged() {
void AlloyBrowserHostImpl::Invalidate(PaintElementType type) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -533,7 +533,7 @@ void AlloyBrowserHostImpl::Invalidate(PaintElementType type) {
void AlloyBrowserHostImpl::SendExternalBeginFrame() {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -551,7 +551,7 @@ void AlloyBrowserHostImpl::SendExternalBeginFrame() {
void AlloyBrowserHostImpl::SendTouchEvent(const CefTouchEvent& event) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -582,7 +582,7 @@ void AlloyBrowserHostImpl::SendCaptureLostEvent() {
int AlloyBrowserHostImpl::GetWindowlessFrameRate() {
// Verify that this method is being called on the UI thread.
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return 0;
}
@@ -795,7 +795,7 @@ void AlloyBrowserHostImpl::ImeSetComposition(
const CefRange& replacement_range,
const CefRange& selection_range) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -817,7 +817,7 @@ void AlloyBrowserHostImpl::ImeCommitText(const CefString& text,
const CefRange& replacement_range,
int relative_cursor_pos) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -836,7 +836,7 @@ void AlloyBrowserHostImpl::ImeCommitText(const CefString& text,
void AlloyBrowserHostImpl::ImeFinishComposingText(bool keep_selection) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -854,7 +854,7 @@ void AlloyBrowserHostImpl::ImeFinishComposingText(bool keep_selection) {
void AlloyBrowserHostImpl::ImeCancelComposition() {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -875,7 +875,7 @@ void AlloyBrowserHostImpl::DragTargetDragEnter(
const CefMouseEvent& event,
CefBrowserHost::DragOperationsMask allowed_ops) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -887,7 +887,7 @@ void AlloyBrowserHostImpl::DragTargetDragEnter(
}
if (!drag_data.get()) {
DCHECK(false);
NOTREACHED();
return;
}
@@ -900,7 +900,7 @@ void AlloyBrowserHostImpl::DragTargetDragOver(
const CefMouseEvent& event,
CefBrowserHost::DragOperationsMask allowed_ops) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -918,7 +918,7 @@ void AlloyBrowserHostImpl::DragTargetDragOver(
void AlloyBrowserHostImpl::DragTargetDragLeave() {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -936,7 +936,7 @@ void AlloyBrowserHostImpl::DragTargetDragLeave() {
void AlloyBrowserHostImpl::DragTargetDrop(const CefMouseEvent& event) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -953,7 +953,7 @@ void AlloyBrowserHostImpl::DragTargetDrop(const CefMouseEvent& event) {
void AlloyBrowserHostImpl::DragSourceSystemDragEnded() {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -974,7 +974,7 @@ void AlloyBrowserHostImpl::DragSourceEndedAt(
int y,
CefBrowserHost::DragOperationsMask op) {
if (!IsWindowless()) {
DCHECK(false) << "Window rendering is not disabled";
NOTREACHED() << "Window rendering is not disabled";
return;
}
@@ -1004,7 +1004,7 @@ void AlloyBrowserHostImpl::SetAudioMuted(bool mute) {
bool AlloyBrowserHostImpl::IsAudioMuted() {
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}
if (!web_contents()) {

View File

@@ -75,7 +75,7 @@
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
#include "components/os_crypt/sync/os_crypt.h"
#include "components/os_crypt/os_crypt.h"
#endif
#if BUILDFLAG(IS_LINUX)
@@ -84,7 +84,7 @@
#include "chrome/browser/ui/views/theme_profile_key.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/grit/chromium_strings.h"
#include "components/os_crypt/sync/key_storage_config_linux.h"
#include "components/os_crypt/key_storage_config_linux.h"
#include "libcef/browser/printing/print_dialog_linux.h"
#include "ui/base/cursor/cursor_factory.h"
#include "ui/base/ime/input_method.h"

View File

@@ -89,7 +89,6 @@
#include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
#include "components/pdf/browser/pdf_web_contents_helper.h"
#include "components/pdf/common/internal_plugin_helpers.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/spellcheck/common/spellcheck.mojom.h"
#include "components/version_info/version_info.h"
#include "content/browser/plugin_service_impl.h"
@@ -924,10 +923,8 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles(
Profile* profile = Profile::FromBrowserContext(browser_context);
chrome::mojom::DynamicParams dynamic_params = {
profile->GetPrefs()->GetBoolean(
policy::policy_prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(
policy::policy_prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)};
result.push_back(
std::make_unique<GoogleURLLoaderThrottle>(std::move(dynamic_params)));

View File

@@ -219,7 +219,7 @@ void CefBrowserPlatformDelegateAlloy::CreateExtensionHost(
extension, web_contents_, url, host_type);
// Load will be triggered by ProcessManager::CreateBackgroundHost.
} else {
DCHECK(false) << " Unsupported extension host type: " << host_type;
NOTREACHED() << " Unsupported extension host type: " << host_type;
}
}

View File

@@ -32,7 +32,6 @@
#include "content/public/browser/network_service_instance.h"
#include "content/public/common/content_switches.h"
#include "net/log/net_log_capture_mode.h"
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
@@ -136,27 +135,22 @@ void ChromeBrowserProcessAlloy::CleanupOnUIThread() {
}
void ChromeBrowserProcessAlloy::EndSession() {
DCHECK(false);
NOTREACHED();
}
void ChromeBrowserProcessAlloy::FlushLocalStateAndReply(
base::OnceClosure reply) {
DCHECK(false);
}
device::GeolocationManager* ChromeBrowserProcessAlloy::geolocation_manager() {
DCHECK(false);
return nullptr;
NOTREACHED();
}
metrics_services_manager::MetricsServicesManager*
ChromeBrowserProcessAlloy::GetMetricsServicesManager() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
metrics::MetricsService* ChromeBrowserProcessAlloy::metrics_service() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -168,7 +162,7 @@ ChromeBrowserProcessAlloy::system_network_context_manager() {
network::NetworkQualityTracker*
ChromeBrowserProcessAlloy::network_quality_tracker() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -197,17 +191,17 @@ PrefService* ChromeBrowserProcessAlloy::local_state() {
scoped_refptr<network::SharedURLLoaderFactory>
ChromeBrowserProcessAlloy::shared_url_loader_factory() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
variations::VariationsService* ChromeBrowserProcessAlloy::variations_service() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
BrowserProcessPlatformPart* ChromeBrowserProcessAlloy::platform_part() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -218,21 +212,16 @@ ChromeBrowserProcessAlloy::extension_event_router_forwarder() {
}
NotificationUIManager* ChromeBrowserProcessAlloy::notification_ui_manager() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
NotificationPlatformBridge*
ChromeBrowserProcessAlloy::notification_platform_bridge() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
void ChromeBrowserProcessAlloy::SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) {
DCHECK(false);
}
policy::ChromeBrowserPolicyConnector*
ChromeBrowserProcessAlloy::browser_policy_connector() {
if (!browser_policy_connector_) {
@@ -247,25 +236,25 @@ policy::PolicyService* ChromeBrowserProcessAlloy::policy_service() {
}
IconManager* ChromeBrowserProcessAlloy::icon_manager() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
GpuModeManager* ChromeBrowserProcessAlloy::gpu_mode_manager() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
void ChromeBrowserProcessAlloy::CreateDevToolsProtocolHandler() {
DCHECK(false);
NOTREACHED();
}
void ChromeBrowserProcessAlloy::CreateDevToolsAutoOpener() {
DCHECK(false);
NOTREACHED();
}
bool ChromeBrowserProcessAlloy::IsShuttingDown() {
DCHECK(false);
NOTREACHED();
return false;
}
@@ -294,7 +283,7 @@ ChromeBrowserProcessAlloy::background_printing_manager() {
IntranetRedirectDetector*
ChromeBrowserProcessAlloy::intranet_redirect_detector() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -309,29 +298,29 @@ void ChromeBrowserProcessAlloy::SetApplicationLocale(
}
DownloadStatusUpdater* ChromeBrowserProcessAlloy::download_status_updater() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
DownloadRequestLimiter* ChromeBrowserProcessAlloy::download_request_limiter() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
BackgroundModeManager* ChromeBrowserProcessAlloy::background_mode_manager() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
void ChromeBrowserProcessAlloy::set_background_mode_manager_for_test(
std::unique_ptr<BackgroundModeManager> manager) {
DCHECK(false);
NOTREACHED();
}
#endif
StatusTray* ChromeBrowserProcessAlloy::status_tray() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -342,12 +331,12 @@ ChromeBrowserProcessAlloy::safe_browsing_service() {
subresource_filter::RulesetService*
ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
StartupData* ChromeBrowserProcessAlloy::startup_data() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -379,55 +368,61 @@ ChromeBrowserProcessAlloy::component_updater() {
MediaFileSystemRegistry*
ChromeBrowserProcessAlloy::media_file_system_registry() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
WebRtcLogUploader* ChromeBrowserProcessAlloy::webrtc_log_uploader() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
network_time::NetworkTimeTracker*
ChromeBrowserProcessAlloy::network_time_tracker() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
gcm::GCMDriver* ChromeBrowserProcessAlloy::gcm_driver() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
resource_coordinator::TabManager* ChromeBrowserProcessAlloy::GetTabManager() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
resource_coordinator::ResourceCoordinatorParts*
ChromeBrowserProcessAlloy::resource_coordinator_parts() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
BuildState* ChromeBrowserProcessAlloy::GetBuildState() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
SerialPolicyAllowedPorts*
ChromeBrowserProcessAlloy::serial_policy_allowed_ports() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
HidPolicyAllowedDevices*
ChromeBrowserProcessAlloy::hid_policy_allowed_devices() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
breadcrumbs::BreadcrumbPersistentStorageManager*
ChromeBrowserProcessAlloy::GetBreadcrumbPersistentStorageManager() {
NOTREACHED();
return nullptr;
}
HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() {
DCHECK(false);
NOTREACHED();
return nullptr;
}

View File

@@ -51,7 +51,6 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
// BrowserProcess implementation.
void EndSession() override;
void FlushLocalStateAndReply(base::OnceClosure reply) override;
device::GeolocationManager* geolocation_manager() override;
metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
override;
metrics::MetricsService* metrics_service() override;
@@ -66,8 +65,6 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
extensions::EventRouterForwarder* extension_event_router_forwarder() override;
NotificationUIManager* notification_ui_manager() override;
NotificationPlatformBridge* notification_platform_bridge() override;
void SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) override;
policy::ChromeBrowserPolicyConnector* browser_policy_connector() override;
policy::PolicyService* policy_service() override;
IconManager* icon_manager() override;
@@ -110,6 +107,8 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
BuildState* GetBuildState() override;
SerialPolicyAllowedPorts* serial_policy_allowed_ports() override;
HidPolicyAllowedDevices* hid_policy_allowed_devices() override;
breadcrumbs::BreadcrumbPersistentStorageManager*
GetBreadcrumbPersistentStorageManager() override;
HidSystemTrayIcon* hid_system_tray_icon() override;
private:

View File

@@ -54,7 +54,7 @@ bool ChromeProfileAlloy::IsOffTheRecord() const {
}
const Profile::OTRProfileID& ChromeProfileAlloy::GetOTRProfileID() const {
DCHECK(false);
NOTREACHED();
static base::NoDestructor<Profile::OTRProfileID> otr_profile_id(
Profile::OTRProfileID::PrimaryID());
return *otr_profile_id;
@@ -68,19 +68,19 @@ variations::VariationsClient* ChromeProfileAlloy::GetVariationsClient() {
}
scoped_refptr<base::SequencedTaskRunner> ChromeProfileAlloy::GetIOTaskRunner() {
DCHECK(false);
NOTREACHED();
return scoped_refptr<base::SequencedTaskRunner>();
}
std::string ChromeProfileAlloy::GetProfileUserName() const {
DCHECK(false);
NOTREACHED();
return std::string();
}
Profile* ChromeProfileAlloy::GetOffTheRecordProfile(
const Profile::OTRProfileID& otr_profile_id,
bool create_if_needed) {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -89,7 +89,7 @@ std::vector<Profile*> ChromeProfileAlloy::GetAllOffTheRecordProfiles() {
}
void ChromeProfileAlloy::DestroyOffTheRecordProfile(Profile* otr_profile) {
DCHECK(false);
NOTREACHED();
}
bool ChromeProfileAlloy::HasOffTheRecordProfile(
@@ -115,17 +115,17 @@ bool ChromeProfileAlloy::IsChild() const {
ExtensionSpecialStoragePolicy*
ChromeProfileAlloy::GetExtensionSpecialStoragePolicy() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
bool ChromeProfileAlloy::IsSameOrParent(Profile* profile) {
DCHECK(false);
NOTREACHED();
return false;
}
base::Time ChromeProfileAlloy::GetStartTime() const {
DCHECK(false);
NOTREACHED();
return base::Time();
}
@@ -139,30 +139,30 @@ void ChromeProfileAlloy::set_last_selected_directory(
}
GURL ChromeProfileAlloy::GetHomePage() {
DCHECK(false);
NOTREACHED();
return GURL();
}
bool ChromeProfileAlloy::WasCreatedByVersionOrLater(
const std::string& version) {
DCHECK(false);
NOTREACHED();
return false;
}
base::Time ChromeProfileAlloy::GetCreationTime() const {
DCHECK(false);
NOTREACHED();
return base::Time();
}
void ChromeProfileAlloy::SetCreationTimeForTesting(base::Time creation_time) {
DCHECK(false);
NOTREACHED();
}
void ChromeProfileAlloy::RecordPrimaryMainFrameNavigation() {
DCHECK(false);
NOTREACHED();
}
bool ChromeProfileAlloy::IsSignedIn() {
DCHECK(false);
NOTREACHED();
return false;
}

View File

@@ -29,7 +29,7 @@ class AlloyConstrainedWindowViewsClient
if (auto browser = GetPreferredBrowser(parent)) {
return browser->platform_delegate()->GetWebContentsModalDialogHost();
}
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -73,4 +73,4 @@ class AlloyConstrainedWindowViewsClient
std::unique_ptr<constrained_window::ConstrainedWindowViewsClient>
CreateAlloyConstrainedWindowViewsClient() {
return std::make_unique<AlloyConstrainedWindowViewsClient>();
}
}

View File

@@ -33,7 +33,7 @@ bool AlloyWebContentsDialogHelper::IsWebContentsVisible(
} else if (auto native_view = web_contents->GetNativeView()) {
return platform_util::IsVisible(native_view);
}
DCHECK(false);
NOTREACHED();
return false;
}
@@ -51,7 +51,7 @@ gfx::NativeView AlloyWebContentsDialogHelper::GetHostView() const {
if (auto widget = browser_delegate_->GetWindowWidget()) {
return widget->GetNativeView();
}
DCHECK(false);
NOTREACHED();
return gfx::NativeView();
}
@@ -66,7 +66,7 @@ gfx::AcceleratedWidget AlloyWebContentsDialogHelper::GetHostWidget() const {
return parent_widget;
}
#endif // defined(USE_AURA)
DCHECK(false);
NOTREACHED();
return gfx::kNullAcceleratedWidget;
}

View File

@@ -77,6 +77,6 @@ CefRefPtr<CefFrameHostImpl> CefBrowserFrame::GetFrameHost(
return browser->browser_info()->GetFrameForHost(rfh, nullptr,
prefer_speculative);
}
DCHECK(false);
NOTREACHED();
return nullptr;
}

View File

@@ -493,7 +493,7 @@ void CefBrowserHostBase::GetNavigationEntries(
CefRefPtr<CefNavigationEntry> CefBrowserHostBase::GetVisibleNavigationEntry() {
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return nullptr;
}

View File

@@ -53,20 +53,20 @@ bool CefBrowserHost::CreateBrowser(
CefRefPtr<CefRequestContext> request_context) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return false;
}
// Verify that the settings structure is a valid size.
if (settings.size != sizeof(cef_browser_settings_t)) {
DCHECK(false) << "invalid CefBrowserSettings structure size";
NOTREACHED() << "invalid CefBrowserSettings structure size";
return false;
}
// Verify windowless rendering requirements.
if (windowInfo.windowless_rendering_enabled &&
!client->GetRenderHandler().get()) {
DCHECK(false) << "CefRenderHandler implementation is required";
NOTREACHED() << "CefRenderHandler implementation is required";
return false;
}
@@ -110,13 +110,13 @@ CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(
CefRefPtr<CefRequestContext> request_context) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return nullptr;
}
// Verify that the settings structure is a valid size.
if (settings.size != sizeof(cef_browser_settings_t)) {
DCHECK(false) << "invalid CefBrowserSettings structure size";
NOTREACHED() << "invalid CefBrowserSettings structure size";
return nullptr;
}
@@ -134,7 +134,7 @@ CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(
// Verify windowless rendering requirements.
if (windowInfo.windowless_rendering_enabled &&
!client->GetRenderHandler().get()) {
DCHECK(false) << "CefRenderHandler implementation is required";
NOTREACHED() << "CefRenderHandler implementation is required";
return nullptr;
}

View File

@@ -358,7 +358,7 @@ void CefBrowserInfoManager::RemoveBrowserInfo(
}
}
DCHECK(false);
NOTREACHED();
}
void CefBrowserInfoManager::DestroyAllBrowsers() {

View File

@@ -20,14 +20,14 @@ CefBrowserPlatformDelegate::~CefBrowserPlatformDelegate() {
content::WebContents* CefBrowserPlatformDelegate::CreateWebContents(
CefBrowserCreateParams& create_params,
bool& own_web_contents) {
DCHECK(false);
NOTREACHED();
return nullptr;
}
void CefBrowserPlatformDelegate::CreateViewForWebContents(
content::WebContentsView** view,
content::RenderViewHostDelegateView** delegate_view) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::WebContentsCreated(
@@ -48,7 +48,7 @@ void CefBrowserPlatformDelegate::AddNewContents(
const blink::mojom::WindowFeatures& window_features,
bool user_gesture,
bool* was_blocked) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::WebContentsDestroyed(
@@ -87,12 +87,12 @@ void CefBrowserPlatformDelegate::CreateExtensionHost(
const extensions::Extension* extension,
const GURL& url,
extensions::mojom::ViewType host_type) {
DCHECK(false);
NOTREACHED();
}
extensions::ExtensionHost* CefBrowserPlatformDelegate::GetExtensionHost()
const {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -109,32 +109,32 @@ void CefBrowserPlatformDelegate::BrowserDestroyed(CefBrowserHostBase* browser) {
}
bool CefBrowserPlatformDelegate::CreateHostWindow() {
DCHECK(false);
NOTREACHED();
return true;
}
void CefBrowserPlatformDelegate::CloseHostWindow() {
DCHECK(false);
NOTREACHED();
}
CefWindowHandle CefBrowserPlatformDelegate::GetHostWindowHandle() const {
DCHECK(false);
NOTREACHED();
return kNullWindowHandle;
}
views::Widget* CefBrowserPlatformDelegate::GetWindowWidget() const {
DCHECK(false);
NOTREACHED();
return nullptr;
}
CefRefPtr<CefBrowserView> CefBrowserPlatformDelegate::GetBrowserView() const {
DCHECK(false);
NOTREACHED();
return nullptr;
}
web_modal::WebContentsModalDialogHost*
CefBrowserPlatformDelegate::GetWebContentsModalDialogHost() const {
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -150,12 +150,12 @@ void CefBrowserPlatformDelegate::PopupBrowserCreated(
bool is_devtools) {}
SkColor CefBrowserPlatformDelegate::GetBackgroundColor() const {
DCHECK(false);
NOTREACHED();
return SkColor();
}
void CefBrowserPlatformDelegate::WasResized() {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::SendKeyEvent(const CefKeyEvent& event) {
@@ -200,7 +200,7 @@ void CefBrowserPlatformDelegate::SizeTo(int width, int height) {}
gfx::Point CefBrowserPlatformDelegate::GetScreenPoint(
const gfx::Point& view,
bool want_dip_coords) const {
DCHECK(false);
NOTREACHED();
return gfx::Point();
}
@@ -210,7 +210,7 @@ void CefBrowserPlatformDelegate::ViewText(const std::string& text) {
bool CefBrowserPlatformDelegate::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
DCHECK(false);
NOTREACHED();
return false;
}
@@ -227,7 +227,7 @@ bool CefBrowserPlatformDelegate::IsNeverComposited(
CefEventHandle CefBrowserPlatformDelegate::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
DCHECK(false);
NOTREACHED();
return kNullEventHandle;
}
@@ -256,28 +256,28 @@ bool CefBrowserPlatformDelegate::HasExternalParent() const {
}
void CefBrowserPlatformDelegate::WasHidden(bool hidden) {
DCHECK(false);
NOTREACHED();
}
bool CefBrowserPlatformDelegate::IsHidden() const {
DCHECK(false);
NOTREACHED();
return false;
}
void CefBrowserPlatformDelegate::NotifyScreenInfoChanged() {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::Invalidate(cef_paint_element_type_t type) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::SendExternalBeginFrame() {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::SetWindowlessFrameRate(int frame_rate) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::ImeSetComposition(
@@ -285,43 +285,43 @@ void CefBrowserPlatformDelegate::ImeSetComposition(
const std::vector<CefCompositionUnderline>& underlines,
const CefRange& replacement_range,
const CefRange& selection_range) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::ImeCommitText(
const CefString& text,
const CefRange& replacement_range,
int relative_cursor_pos) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::ImeFinishComposingText(bool keep_selection) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::ImeCancelComposition() {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::DragTargetDragEnter(
CefRefPtr<CefDragData> drag_data,
const CefMouseEvent& event,
cef_drag_operations_mask_t allowed_ops) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::DragTargetDragOver(
const CefMouseEvent& event,
cef_drag_operations_mask_t allowed_ops) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::DragTargetDragLeave() {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::DragTargetDrop(const CefMouseEvent& event) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::StartDragging(
@@ -331,33 +331,33 @@ void CefBrowserPlatformDelegate::StartDragging(
const gfx::Vector2d& image_offset,
const blink::mojom::DragEventSourceInfo& event_info,
content::RenderWidgetHostImpl* source_rwh) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::UpdateDragCursor(
ui::mojom::DragOperation operation) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::DragSourceEndedAt(
int x,
int y,
cef_drag_operations_mask_t op) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::DragSourceSystemDragEnded() {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::AccessibilityEventReceived(
const content::AXEventNotificationDetails& eventData) {
DCHECK(false);
NOTREACHED();
}
void CefBrowserPlatformDelegate::AccessibilityLocationChangesReceived(
const std::vector<content::AXLocationChangeNotificationDetails>& locData) {
DCHECK(false);
NOTREACHED();
}
gfx::Point CefBrowserPlatformDelegate::GetDialogPosition(

View File

@@ -138,6 +138,6 @@ std::unique_ptr<CefBrowserPlatformDelegate> CefBrowserPlatformDelegate::Create(
return std::move(native_delegate);
}
DCHECK(false);
NOTREACHED();
return nullptr;
}

View File

@@ -56,7 +56,7 @@ CefBrowserPlatformDelegateChrome::GetWebContentsModalDialogHost() const {
ChromeWebModalDialogManagerDelegate* manager = chrome_browser_;
return manager->GetWebContentsModalDialogHost();
}
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -143,6 +143,6 @@ gfx::NativeWindow CefBrowserPlatformDelegateChrome::GetNativeWindow() const {
if (chrome_browser_ && chrome_browser_->window()) {
return chrome_browser_->window()->GetNativeWindow();
}
DCHECK(false);
NOTREACHED();
return gfx::NativeWindow();
}

View File

@@ -299,7 +299,7 @@ bool CefInitialize(const CefMainArgs& args,
}
if (settings.size != sizeof(cef_settings_t)) {
DCHECK(false) << "invalid CefSettings structure size";
NOTREACHED() << "invalid CefSettings structure size";
return false;
}
@@ -314,13 +314,13 @@ bool CefInitialize(const CefMainArgs& args,
void CefShutdown() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return;
}
// Must always be called on the same thread as Initialize.
if (!g_context->OnInitThread()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return;
}
@@ -335,13 +335,13 @@ void CefShutdown() {
void CefDoMessageLoopWork() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return;
}
// Must always be called on the same thread as Initialize.
if (!g_context->OnInitThread()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return;
}
@@ -352,13 +352,13 @@ void CefDoMessageLoopWork() {
void CefRunMessageLoop() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return;
}
// Must always be called on the same thread as Initialize.
if (!g_context->OnInitThread()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return;
}
@@ -368,13 +368,13 @@ void CefRunMessageLoop() {
void CefQuitMessageLoop() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return;
}
// Must always be called on the same thread as Initialize.
if (!g_context->OnInitThread()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return;
}
@@ -403,7 +403,7 @@ int CefRunMainWithPreferredStackSize(mainPtr main, int argc, char* argv[]) {
void CefSetOSModalLoop(bool osModalLoop) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return;
}

View File

@@ -227,7 +227,7 @@ class CefDevToolsFrontend::NetworkResourceLoader
bindings_->loaders_.erase(bindings_->loaders_.find(this));
}
void OnRetry(base::OnceClosure start_retry) override { DCHECK(false); }
void OnRetry(base::OnceClosure start_retry) override { NOTREACHED(); }
const int stream_id_;
CefDevToolsFrontend* const bindings_;

View File

@@ -94,7 +94,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
base::FilePath dir_path = suggested_path.DirName();
if (!base::DirectoryExists(dir_path) &&
!base::CreateDirectory(dir_path)) {
DCHECK(false) << "failed to create the download directory";
NOTREACHED() << "failed to create the download directory";
suggested_path.clear();
}
}

View File

@@ -54,7 +54,7 @@ CefRefPtr<CefExtensionHandler> CefExtensionImpl::GetHandler() {
CefRefPtr<CefRequestContext> CefExtensionImpl::GetLoaderContext() {
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return nullptr;
}
@@ -63,7 +63,7 @@ CefRefPtr<CefRequestContext> CefExtensionImpl::GetLoaderContext() {
bool CefExtensionImpl::IsLoaded() {
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}

View File

@@ -69,9 +69,9 @@ ExtensionFunction::ResponseAction TabsGetFunction::Run() {
TabsCreateFunction::TabsCreateFunction() : cef_details_(this) {}
ExtensionFunction::ResponseAction TabsCreateFunction::Run() {
absl::optional<tabs::Create::Params> params =
tabs::Create::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
std::unique_ptr<tabs::Create::Params> params(
tabs::Create::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params.get());
CefExtensionFunctionDetails::OpenTabParams options;
options.window_id = params->create_properties.window_id;
@@ -108,9 +108,9 @@ content::WebContents* BaseAPIFunction::GetWebContents(int tab_id) {
}
ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
absl::optional<tabs::Update::Params> params =
tabs::Update::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
std::unique_ptr<tabs::Update::Params> params(
tabs::Update::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params.get());
tab_id_ = params->tab_id ? *params->tab_id : -1;
content::WebContents* web_contents = GetWebContents(tab_id_);
@@ -195,8 +195,8 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
int tab_id,
std::string* error) {
GURL url;
auto url_expected = ExtensionTabUtil::PrepareURLForNavigation(
url_string, extension(), browser_context());
auto url_expected =
ExtensionTabUtil::PrepareURLForNavigation(url_string, extension());
if (url_expected.has_value()) {
url = *url_expected;
} else {
@@ -278,7 +278,7 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
return set_init_result(VALIDATION_FAILURE);
}
std::unique_ptr<InjectDetails> details(new InjectDetails());
if (!InjectDetails::Populate(details_value.GetDict(), *details)) {
if (!InjectDetails::Populate(details_value, details.get())) {
return set_init_result(VALIDATION_FAILURE);
}
@@ -419,8 +419,8 @@ bool TabsRemoveCSSFunction::ShouldRemoveCSS() const {
}
ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
absl::optional<tabs::SetZoom::Params> params =
tabs::SetZoom::Params::Create(args());
std::unique_ptr<tabs::SetZoom::Params> params(
tabs::SetZoom::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@@ -451,8 +451,8 @@ ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
}
ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
absl::optional<tabs::GetZoom::Params> params =
tabs::GetZoom::Params::Create(args());
std::unique_ptr<tabs::GetZoom::Params> params(
tabs::GetZoom::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@@ -471,8 +471,8 @@ ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
using api::tabs::ZoomSettings;
absl::optional<tabs::SetZoomSettings::Params> params =
tabs::SetZoomSettings::Params::Create(args());
std::unique_ptr<tabs::SetZoomSettings::Params> params(
tabs::SetZoomSettings::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@@ -522,8 +522,8 @@ ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
}
ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() {
absl::optional<tabs::GetZoomSettings::Params> params =
tabs::GetZoomSettings::Params::Create(args());
std::unique_ptr<tabs::GetZoomSettings::Params> params(
tabs::GetZoomSettings::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;

View File

@@ -325,7 +325,7 @@ std::unique_ptr<api::tabs::Tab> CefExtensionFunctionDetails::OpenTab(
GURL url;
if (params.url.has_value()) {
auto url_expected = ExtensionTabUtil::PrepareURLForNavigation(
*params.url, function()->extension(), function()->browser_context());
*params.url, function()->extension());
if (url_expected.has_value()) {
url = *url_expected;
} else {

View File

@@ -26,7 +26,7 @@ void CefExtensionHostDelegate::OnMainFrameCreatedForBackgroundPage(
content::JavaScriptDialogManager*
CefExtensionHostDelegate::GetJavaScriptDialogManager() {
// Never routed here from AlloyBrowserHostImpl.
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -46,7 +46,7 @@ void CefExtensionHostDelegate::ProcessMediaAccessRequest(
content::MediaResponseCallback callback,
const Extension* extension) {
// Never routed here from AlloyBrowserHostImpl.
DCHECK(false);
NOTREACHED();
}
bool CefExtensionHostDelegate::CheckMediaAccessPermission(
@@ -55,18 +55,18 @@ bool CefExtensionHostDelegate::CheckMediaAccessPermission(
blink::mojom::MediaStreamType type,
const Extension* extension) {
// Never routed here from AlloyBrowserHostImpl.
DCHECK(false);
NOTREACHED();
return false;
}
content::PictureInPictureResult CefExtensionHostDelegate::EnterPictureInPicture(
content::WebContents* web_contents) {
DCHECK(false);
NOTREACHED();
return content::PictureInPictureResult::kNotSupported;
}
void CefExtensionHostDelegate::ExitPictureInPicture() {
DCHECK(false);
NOTREACHED();
}
} // namespace extensions

View File

@@ -500,20 +500,20 @@ void CefExtensionSystem::InstallUpdate(
const base::FilePath& temp_dir,
bool install_immediately,
InstallUpdateCallback install_update_callback) {
DCHECK(false);
NOTREACHED();
base::DeletePathRecursively(temp_dir);
}
void CefExtensionSystem::PerformActionBasedOnOmahaAttributes(
const std::string& extension_id,
const base::Value& attributes) {
DCHECK(false);
NOTREACHED();
}
bool CefExtensionSystem::FinishDelayedInstallationIfReady(
const std::string& extension_id,
bool install_immediately) {
DCHECK(false);
NOTREACHED();
return false;
}

View File

@@ -28,7 +28,7 @@ CefExtensionsAPIClient::CefExtensionsAPIClient() {}
AppViewGuestDelegate* CefExtensionsAPIClient::CreateAppViewGuestDelegate()
const {
// TODO(extensions): Implement to support Apps.
DCHECK(false);
NOTREACHED();
return nullptr;
}

View File

@@ -246,7 +246,7 @@ ProcessManagerDelegate* CefExtensionsBrowserClient::GetProcessManagerDelegate()
std::unique_ptr<ExtensionHostDelegate>
CefExtensionsBrowserClient::CreateExtensionHostDelegate() {
// CEF does not use the ExtensionHost constructor that calls this method.
DCHECK(false);
NOTREACHED();
return std::unique_ptr<ExtensionHostDelegate>();
}
@@ -353,7 +353,7 @@ std::unique_ptr<RuntimeAPIDelegate>
CefExtensionsBrowserClient::CreateRuntimeAPIDelegate(
content::BrowserContext* context) const {
// TODO(extensions): Implement to support Apps.
DCHECK(false);
NOTREACHED();
return nullptr;
}
@@ -378,7 +378,7 @@ void CefExtensionsBrowserClient::BroadcastEventToRenderers(
ExtensionCache* CefExtensionsBrowserClient::GetExtensionCache() {
// Only used by Chrome via ExtensionService.
DCHECK(false);
NOTREACHED();
return nullptr;
}

View File

@@ -34,19 +34,19 @@ void CefValueStore::set_status_code(StatusCode status_code) {
size_t CefValueStore::GetBytesInUse(const std::string& key) {
// Let SettingsStorageQuotaEnforcer implement this.
DCHECK(false) << "Not implemented";
NOTREACHED() << "Not implemented";
return 0;
}
size_t CefValueStore::GetBytesInUse(const std::vector<std::string>& keys) {
// Let SettingsStorageQuotaEnforcer implement this.
DCHECK(false) << "Not implemented";
NOTREACHED() << "Not implemented";
return 0;
}
size_t CefValueStore::GetBytesInUse() {
// Let SettingsStorageQuotaEnforcer implement this.
DCHECK(false) << "Not implemented";
NOTREACHED() << "Not implemented";
return 0;
}

View File

@@ -491,7 +491,7 @@ CefFileDialogManager::MaybeRunDelegate(
mode = FILE_DIALOG_SAVE;
break;
default:
DCHECK(false);
NOTREACHED();
break;
}

View File

@@ -227,12 +227,12 @@ CefRefPtr<CefBrowser> CefFrameHostImpl::GetBrowser() {
}
CefRefPtr<CefV8Context> CefFrameHostImpl::GetV8Context() {
DCHECK(false) << "GetV8Context cannot be called from the browser process";
NOTREACHED() << "GetV8Context cannot be called from the browser process";
return nullptr;
}
void CefFrameHostImpl::VisitDOM(CefRefPtr<CefDOMVisitor> visitor) {
DCHECK(false) << "VisitDOM cannot be called from the browser process";
NOTREACHED() << "VisitDOM cannot be called from the browser process";
}
CefRefPtr<CefURLRequest> CefFrameHostImpl::CreateURLRequest(
@@ -243,7 +243,7 @@ CefRefPtr<CefURLRequest> CefFrameHostImpl::CreateURLRequest(
}
if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return nullptr;
}

View File

@@ -46,7 +46,7 @@ CefRefPtr<CefPreferenceManager>
CefPreferenceManager::GetGlobalPreferenceManager() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return nullptr;
}

View File

@@ -26,7 +26,7 @@ SkColorType GetSkColorType(cef_color_type_t color_type) {
break;
}
DCHECK(false);
NOTREACHED();
return kUnknown_SkColorType;
}
@@ -42,7 +42,7 @@ SkAlphaType GetSkAlphaType(cef_alpha_type_t alpha_type) {
break;
}
DCHECK(false);
NOTREACHED();
return kUnknown_SkAlphaType;
}

View File

@@ -230,12 +230,12 @@ bool CefMainRunner::Initialize(CefSettings* settings,
const int exit_code =
ContentMainInitialize(args, windows_sandbox_info, &settings->no_sandbox);
if (exit_code >= 0) {
DCHECK(false) << "ContentMainInitialize failed";
NOTREACHED() << "ContentMainInitialize failed";
return false;
}
if (!ContentMainRun(initialized, std::move(context_initialized))) {
DCHECK(false) << "ContentMainRun failed";
NOTREACHED() << "ContentMainRun failed";
return false;
}
@@ -385,13 +385,9 @@ int CefMainRunner::ContentMainInitialize(const CefMainArgs& args,
bool CefMainRunner::ContentMainRun(bool* initialized,
base::OnceClosure context_initialized) {
main_delegate_->BeforeMainThreadRun(multi_threaded_message_loop_);
main_delegate_->BeforeMainThreadRun();
if (multi_threaded_message_loop_) {
// Detach the CommandLine from the main thread so that it can be
// attached and modified from the UI thread going forward.
base::CommandLine::ForCurrentProcess()->DetachFromCurrentSequence();
base::WaitableEvent uithread_startup_event(
base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);

View File

@@ -130,7 +130,7 @@ class CefRegistrationImpl : public CefRegistration,
case blink::mojom::PresentationConnectionState::TERMINATED:
return CEF_MRCS_TERMINATED;
}
DCHECK(false);
NOTREACHED();
return CEF_MRCS_UNKNOWN;
}

View File

@@ -54,7 +54,7 @@ class CefSimpleMenuModel : public ui::MenuModel {
case MENUITEMTYPE_SUBMENU:
return TYPE_SUBMENU;
default:
DCHECK(false);
NOTREACHED();
return TYPE_COMMAND;
}
}
@@ -1109,7 +1109,7 @@ void CefMenuModelImpl::OnMenuClosed() {
bool CefMenuModelImpl::VerifyContext() {
if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it.
DCHECK(false);
NOTREACHED();
return false;
}

View File

@@ -161,7 +161,7 @@ ui::MouseEvent CefBrowserPlatformDelegateNativeAura::TranslateUiClickEvent(
changed_button_flags |= ui::EF_RIGHT_MOUSE_BUTTON;
break;
default:
DCHECK(false);
NOTREACHED();
}
ui::MouseEvent result(event_type, location, root_location, time_stamp, flags,

View File

@@ -276,7 +276,7 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent(
type = ui::ET_KEY_RELEASED;
break;
default:
DCHECK(false);
NOTREACHED();
}
#if BUILDFLAG(OZONE_PLATFORM_X11)

View File

@@ -23,6 +23,7 @@
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
#import "ui/base/cocoa/cocoa_base_utils.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"
@@ -438,7 +439,8 @@ gfx::Point CefBrowserPlatformDelegateNativeMac::GetScreenPoint(
NSPoint view_pt = {static_cast<CGFloat>(view.x()),
bounds.size.height - static_cast<CGFloat>(view.y())};
NSPoint window_pt = [nsview convertPoint:view_pt toView:nil];
NSPoint screen_pt = [[nsview window] convertPointToScreen:window_pt];
NSPoint screen_pt =
ui::ConvertPointFromWindowToScreen([nsview window], window_pt);
return gfx::Point(screen_pt.x, screen_pt.y);
}
return gfx::Point();
@@ -563,7 +565,7 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebClickEvent(
result.button = blink::WebMouseEvent::Button::kRight;
break;
default:
DCHECK(false);
NOTREACHED();
}
result.click_count = clickCount;

View File

@@ -466,7 +466,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
msg.message = event.is_system_key ? WM_SYSCHAR : WM_CHAR;
break;
default:
DCHECK(false);
NOTREACHED();
return false;
}
@@ -521,7 +521,7 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeWin::TranslateUiKeyEvent(
type = ui::ET_KEY_RELEASED;
break;
default:
DCHECK(false);
NOTREACHED();
}
ui::DomKey dom_key =

View File

@@ -70,7 +70,7 @@ display::Display::Rotation OrientationAngleToRotation(
if (orientation_angle == 270) {
return display::Display::ROTATE_90;
}
DCHECK(false);
NOTREACHED();
return display::Display::ROTATE_0;
}

View File

@@ -363,7 +363,7 @@ bool OnLicenseUI(std::string* mime_type, std::string* output) {
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
IDR_CEF_LICENSE_TXT);
if (piece.empty()) {
DCHECK(false) << "Failed to load license txt resource.";
NOTREACHED() << "Failed to load license txt resource.";
return false;
}
@@ -381,7 +381,7 @@ bool OnVersionUI(Profile* profile,
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
IDR_CEF_VERSION_HTML);
if (tmpl.empty()) {
DCHECK(false) << "Failed to load version html resource.";
NOTREACHED() << "Failed to load version html resource.";
return false;
}

View File

@@ -38,7 +38,7 @@ void LoadFromDisk(const base::FilePath& path) {
void CefLoadCRLSetsFile(const CefString& path) {
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return;
}

View File

@@ -50,7 +50,7 @@ std::string GetMimeType(const std::string& filename) {
return "application/font-woff2";
}
DCHECK(false) << "No known mime type for file: " << filename.c_str();
NOTREACHED() << "No known mime type for file: " << filename.c_str();
return "text/plain";
}
@@ -80,7 +80,7 @@ class RedirectHandler : public CefResourceHandler {
int bytes_to_read,
int& bytes_read,
CefRefPtr<CefResourceReadCallback> callback) override {
DCHECK(false);
NOTREACHED();
return false;
}
@@ -177,8 +177,8 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
action.resource_id);
if (str.empty()) {
DCHECK(false) << "Failed to load internal resource for id: "
<< action.resource_id << " URL: " << url.spec().c_str();
NOTREACHED() << "Failed to load internal resource for id: "
<< action.resource_id << " URL: " << url.spec().c_str();
return nullptr;
}
action.bytes =

View File

@@ -695,7 +695,7 @@ void CefBrowserURLRequest::Cancel() {
bool CefBrowserURLRequest::VerifyContext() {
if (!context_->CalledOnValidThread()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}

View File

@@ -553,7 +553,7 @@ void StreamReaderURLLoader::FollowRedirect(
const net::HttpRequestHeaders& modified_headers,
const net::HttpRequestHeaders& modified_cors_exempt_headers,
const absl::optional<GURL>& new_url) {
DCHECK(false);
NOTREACHED();
}
void StreamReaderURLLoader::SetPriority(net::RequestPriority priority,
@@ -852,4 +852,4 @@ bool StreamReaderURLLoader::byte_range_valid() const {
return byte_range_.IsValid() && byte_range_.first_byte_position() >= 0;
}
} // namespace net_service
} // namespace net_service

View File

@@ -214,14 +214,14 @@ bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin,
bool allow_target_subdomains) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false);
NOTREACHED();
return false;
}
std::string source_url = source_origin;
GURL gurl = GURL(source_url);
if (gurl.is_empty() || !gurl.is_valid()) {
DCHECK(false) << "Invalid source_origin URL: " << source_url;
NOTREACHED() << "Invalid source_origin URL: " << source_url;
return false;
}
@@ -245,14 +245,14 @@ bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin,
bool allow_target_subdomains) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false);
NOTREACHED();
return false;
}
std::string source_url = source_origin;
GURL gurl = GURL(source_url);
if (gurl.is_empty() || !gurl.is_valid()) {
DCHECK(false) << "Invalid source_origin URL: " << source_url;
NOTREACHED() << "Invalid source_origin URL: " << source_url;
return false;
}
@@ -273,7 +273,7 @@ bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin,
bool CefClearCrossOriginWhitelist() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false);
NOTREACHED();
return false;
}

View File

@@ -26,7 +26,7 @@ ui::MotionEvent::ToolType CefPointerTypeToMotionEventToolType(
case CEF_POINTER_TYPE_UNKNOWN:
return ui::MotionEvent::ToolType::UNKNOWN;
}
DCHECK(false);
NOTREACHED();
return ui::MotionEvent::ToolType::UNKNOWN;
}

View File

@@ -175,7 +175,7 @@ ui::ImeTextSpan::UnderlineStyle GetImeUnderlineStyle(
return ui::ImeTextSpan::UnderlineStyle::kNone;
}
DCHECK(false);
NOTREACHED();
return ui::ImeTextSpan::UnderlineStyle::kSolid;
}
@@ -489,7 +489,7 @@ CefRenderWidgetHostViewOSR::GetDisplayFeature() {
void CefRenderWidgetHostViewOSR::SetDisplayFeatureForTesting(
const content::DisplayFeature* display_feature) {
DCHECK(false);
NOTREACHED();
}
blink::mojom::PointerLockResult CefRenderWidgetHostViewOSR::LockMouse(
@@ -905,7 +905,7 @@ void CefRenderWidgetHostViewOSR::NotifyHostAndDelegateOnWasShown(
blink::mojom::RecordContentToVisibleTimeRequestPtr visible_time_request) {
// We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this
// method should not be called.
DCHECK(false);
NOTREACHED();
}
void CefRenderWidgetHostViewOSR::
@@ -914,14 +914,14 @@ void CefRenderWidgetHostViewOSR::
visible_time_request) {
// We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this
// method should not be called.
DCHECK(false);
NOTREACHED();
}
void CefRenderWidgetHostViewOSR::
CancelSuccessfulPresentationTimeRequestForHostAndDelegate() {
// We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this
// method should not be called.
DCHECK(false);
NOTREACHED();
}
std::unique_ptr<content::SyntheticGestureTarget>

View File

@@ -315,16 +315,16 @@ bool CefTouchSelectionControllerClientOSR::SupportsAnimation() const {
bool CefTouchSelectionControllerClientOSR::InternalClient::SupportsAnimation()
const {
DCHECK(false);
NOTREACHED();
return false;
}
void CefTouchSelectionControllerClientOSR::SetNeedsAnimate() {
DCHECK(false);
NOTREACHED();
}
void CefTouchSelectionControllerClientOSR::InternalClient::SetNeedsAnimate() {
DCHECK(false);
NOTREACHED();
}
void CefTouchSelectionControllerClientOSR::MoveCaret(
@@ -405,7 +405,7 @@ void CefTouchSelectionControllerClientOSR::OnSelectionEvent(
void CefTouchSelectionControllerClientOSR::InternalClient::OnSelectionEvent(
ui::SelectionEventType event) {
DCHECK(false);
NOTREACHED();
}
void CefTouchSelectionControllerClientOSR::OnDragUpdate(
@@ -415,7 +415,7 @@ void CefTouchSelectionControllerClientOSR::OnDragUpdate(
void CefTouchSelectionControllerClientOSR::InternalClient::OnDragUpdate(
const ui::TouchSelectionDraggable::Type type,
const gfx::PointF& position) {
DCHECK(false);
NOTREACHED();
}
std::unique_ptr<ui::TouchHandleDrawable>
@@ -427,12 +427,12 @@ void CefTouchSelectionControllerClientOSR::DidScroll() {}
std::unique_ptr<ui::TouchHandleDrawable>
CefTouchSelectionControllerClientOSR::InternalClient::CreateDrawable() {
DCHECK(false);
NOTREACHED();
return nullptr;
}
void CefTouchSelectionControllerClientOSR::InternalClient::DidScroll() {
DCHECK(false);
NOTREACHED();
}
bool CefTouchSelectionControllerClientOSR::IsCommandIdEnabled(

View File

@@ -43,7 +43,7 @@ bool CefGetPath(PathKey key, CefString& path) {
pref_key = chrome::DIR_RESOURCES;
break;
default:
DCHECK(false) << "invalid argument";
NOTREACHED() << "invalid argument";
return false;
}

View File

@@ -225,7 +225,7 @@ cef_permission_request_types_t GetCefRequestType(
return CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT;
}
DCHECK(false);
NOTREACHED();
return CEF_PERMISSION_TYPE_NONE;
}

View File

@@ -35,6 +35,7 @@
#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
#include "chrome/common/buildflags.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/safe_search_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/locale_settings.h"
#include "components/certificate_transparency/pref_names.h"
@@ -47,7 +48,6 @@
#include "components/language/core/browser/language_prefs.h"
#include "components/language/core/browser/pref_names.h"
#include "components/permissions/permission_actions_history.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_filter.h"
@@ -57,7 +57,6 @@
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/safe_search_api/safe_search_util.h"
#include "components/spellcheck/browser/pref_names.h"
#include "components/sync_preferences/pref_service_syncable.h"
#include "components/sync_preferences/pref_service_syncable_factory.h"
@@ -70,7 +69,7 @@
#include "ui/base/ui_base_switches.h"
#if BUILDFLAG(IS_WIN)
#include "components/os_crypt/sync/os_crypt.h"
#include "components/os_crypt/os_crypt.h"
#endif
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
@@ -282,10 +281,9 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
// Print preferences.
// Based on ProfileImpl::RegisterProfilePrefs.
registry->RegisterBooleanPref(policy::policy_prefs::kForceGoogleSafeSearch,
false);
registry->RegisterIntegerPref(policy::policy_prefs::kForceYouTubeRestrict,
safe_search_api::YOUTUBE_RESTRICT_OFF);
registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false);
registry->RegisterIntegerPref(prefs::kForceYouTubeRestrict,
safe_search_util::YOUTUBE_RESTRICT_OFF);
registry->RegisterStringPref(prefs::kAllowedDomainsForApps, std::string());
registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled,

View File

@@ -35,7 +35,7 @@ const char* GetTypeString(base::Value::Type type) {
return "LIST";
}
DCHECK(false);
NOTREACHED();
return "UNKNOWN";
}

View File

@@ -74,7 +74,7 @@ class CefPreferenceRegistrarImpl : public CefPreferenceRegistrar {
} else if (impl_value.type() == base::Value::Type::LIST) {
registry_->RegisterListPref(name, std::move(impl_value));
} else {
DCHECK(false);
NOTREACHED();
}
}

View File

@@ -196,7 +196,7 @@ blink::mojom::PreferredColorScheme ToBlinkPreferredColorScheme(
return blink::mojom::PreferredColorScheme::kLight;
}
DCHECK(false);
NOTREACHED();
}
// From chrome/browser/chrome_content_browser_client.cc

View File

@@ -12,12 +12,12 @@
bool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line) {
if (!command_line.get()) {
DCHECK(false) << "invalid parameter";
NOTREACHED() << "invalid parameter";
return false;
}
if (!content::CurrentlyOnProcessLauncherTaskRunner()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}

View File

@@ -94,7 +94,7 @@ class ResolveHostHelper : public network::ResolveHostClientBase {
CefRefPtr<CefRequestContext> CefRequestContext::GetGlobalContext() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return nullptr;
}
@@ -109,7 +109,7 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
CefRefPtr<CefRequestContextHandler> handler) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return nullptr;
}
@@ -126,7 +126,7 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
CefRefPtr<CefRequestContextHandler> handler) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return nullptr;
}
@@ -183,12 +183,12 @@ CefRequestContextImpl::GetOrCreateForRequestContext(
bool CefRequestContextImpl::VerifyBrowserContext() const {
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}
if (!browser_context() || !browser_context()->IsInitialized()) {
DCHECK(false) << "Uninitialized context";
NOTREACHED() << "Uninitialized context";
return false;
}

View File

@@ -13,7 +13,7 @@ bool CefRegisterSchemeHandlerFactory(
CefRefPtr<CefSchemeHandlerFactory> factory) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return false;
}
@@ -24,7 +24,7 @@ bool CefRegisterSchemeHandlerFactory(
bool CefClearSchemeHandlerFactories() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return false;
}

View File

@@ -25,16 +25,16 @@
#define CEF_CURRENTLY_ON_HT() CurrentlyOnHandlerThread()
#define CEF_REQUIRE_HT() DCHECK(CEF_CURRENTLY_ON_HT())
#define CEF_REQUIRE_HT_RETURN(var) \
if (!CEF_CURRENTLY_ON_HT()) { \
DCHECK(false) << "called on invalid thread"; \
return var; \
#define CEF_REQUIRE_HT_RETURN(var) \
if (!CEF_CURRENTLY_ON_HT()) { \
NOTREACHED() << "called on invalid thread"; \
return var; \
}
#define CEF_REQUIRE_HT_RETURN_VOID() \
if (!CEF_CURRENTLY_ON_HT()) { \
DCHECK(false) << "called on invalid thread"; \
return; \
#define CEF_REQUIRE_HT_RETURN_VOID() \
if (!CEF_CURRENTLY_ON_HT()) { \
NOTREACHED() << "called on invalid thread"; \
return; \
}
#define CEF_POST_TASK_HT(task) task_runner_->PostTask(FROM_HERE, task);

View File

@@ -540,7 +540,7 @@ bool CefSimpleMenuModelImpl::SetFontListAt(int index,
bool CefSimpleMenuModelImpl::VerifyContext() {
if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it.
DCHECK(false);
NOTREACHED();
return false;
}

View File

@@ -25,18 +25,18 @@
#define CEF_REQUIRE_UIT() CEF_REQUIRE(CEF_UIT)
#define CEF_REQUIRE_IOT() CEF_REQUIRE(CEF_IOT)
#define CEF_REQUIRE_RETURN(id, var) \
if (!CEF_CURRENTLY_ON(id)) { \
DCHECK(false) << "called on invalid thread"; \
return var; \
#define CEF_REQUIRE_RETURN(id, var) \
if (!CEF_CURRENTLY_ON(id)) { \
NOTREACHED() << "called on invalid thread"; \
return var; \
}
#define CEF_REQUIRE_UIT_RETURN(var) CEF_REQUIRE_RETURN(CEF_UIT, var)
#define CEF_REQUIRE_IOT_RETURN(var) CEF_REQUIRE_RETURN(CEF_IOT, var)
#define CEF_REQUIRE_RETURN_VOID(id) \
if (!CEF_CURRENTLY_ON(id)) { \
DCHECK(false) << "called on invalid thread"; \
return; \
#define CEF_REQUIRE_RETURN_VOID(id) \
if (!CEF_CURRENTLY_ON(id)) { \
NOTREACHED() << "called on invalid thread"; \
return; \
}
#define CEF_REQUIRE_UIT_RETURN_VOID() CEF_REQUIRE_RETURN_VOID(CEF_UIT)
#define CEF_REQUIRE_IOT_RETURN_VOID() CEF_REQUIRE_RETURN_VOID(CEF_IOT)

View File

@@ -12,12 +12,12 @@
bool CefBeginTracing(const CefString& categories,
CefRefPtr<CefCompletionCallback> callback) {
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return false;
}
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}
@@ -32,12 +32,12 @@ bool CefBeginTracing(const CefString& categories,
bool CefEndTracing(const CefString& tracing_file,
CefRefPtr<CefEndTracingCallback> callback) {
if (!CONTEXT_STATE_VALID()) {
DCHECK(false) << "context not valid";
NOTREACHED() << "context not valid";
return false;
}
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}

View File

@@ -218,23 +218,6 @@ void CefBrowserViewImpl::OnBoundsChanged() {
}
}
void CefBrowserViewImpl::OnGestureCommand(cef_gesture_command_t command) {
if (delegate()->OnGestureCommand(this, command)) {
return;
}
if (browser_) {
switch (command) {
case CEF_GESTURE_COMMAND_BACK:
browser_->GoBack();
break;
case CEF_GESTURE_COMMAND_FORWARD:
browser_->GoForward();
break;
}
}
}
CefBrowserViewImpl::CefBrowserViewImpl(
CefRefPtr<CefBrowserViewDelegate> delegate)
: ParentClass(delegate), weak_ptr_factory_(this) {}

View File

@@ -74,7 +74,6 @@ class CefBrowserViewImpl
// CefBrowserViewView::Delegate methods:
void OnBrowserViewAdded() override;
void OnBoundsChanged() override;
void OnGestureCommand(cef_gesture_command_t command) override;
// Return the WebView representation of this object.
views::WebView* web_view() const;

View File

@@ -4,28 +4,8 @@
#include "libcef/browser/views/browser_view_view.h"
#include <optional>
#include "libcef/browser/views/browser_view_impl.h"
namespace {
std::optional<cef_gesture_command_t> GetGestureCommand(
ui::GestureEvent* event) {
#if defined(OS_MAC)
if (event->details().type() == ui::ET_GESTURE_SWIPE) {
if (event->details().swipe_left()) {
return cef_gesture_command_t::CEF_GESTURE_COMMAND_BACK;
} else if (event->details().swipe_right()) {
return cef_gesture_command_t::CEF_GESTURE_COMMAND_FORWARD;
}
}
#endif
return std::nullopt;
}
} // namespace
CefBrowserViewView::CefBrowserViewView(CefBrowserViewDelegate* cef_delegate,
Delegate* browser_view_delegate)
: ParentClass(cef_delegate), browser_view_delegate_(browser_view_delegate) {
@@ -58,9 +38,3 @@ void CefBrowserViewView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
ParentClass::OnBoundsChanged(previous_bounds);
browser_view_delegate_->OnBoundsChanged();
}
void CefBrowserViewView::OnGestureEvent(ui::GestureEvent* event) {
if (auto command = GetGestureCommand(event)) {
browser_view_delegate_->OnGestureCommand(*command);
}
}

View File

@@ -41,9 +41,6 @@ class CefBrowserViewView
// Called when the BrowserView bounds have changed.
virtual void OnBoundsChanged() = 0;
// Called when the BrowserView receives a gesture command.
virtual void OnGestureCommand(cef_gesture_command_t command) = 0;
protected:
virtual ~Delegate() {}
};
@@ -57,7 +54,6 @@ class CefBrowserViewView
void ViewHierarchyChanged(
const views::ViewHierarchyChangedDetails& details) override;
void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
void OnGestureEvent(ui::GestureEvent* event) override;
private:
// Not owned by this object.

View File

@@ -486,7 +486,7 @@ void CefXmlReaderImpl::AppendError(const CefString& error_str) {
bool CefXmlReaderImpl::VerifyContext() {
if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it.
DCHECK(false);
NOTREACHED();
return false;
}

View File

@@ -58,7 +58,7 @@ OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)) {
whence = SEEK_SET;
break;
default:
DCHECK(false);
NOTREACHED();
return -1;
}
return reader->Seek(offset, whence);
@@ -295,7 +295,7 @@ bool CefZipReaderImpl::GetFileInfo() {
bool CefZipReaderImpl::VerifyContext() {
if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it.
DCHECK(false);
NOTREACHED();
return false;
}

View File

@@ -32,8 +32,7 @@ void AlloyMainRunnerDelegate::BeforeMainThreadInitialize(
g_browser_process = new ChromeBrowserProcessAlloy();
}
void AlloyMainRunnerDelegate::BeforeMainThreadRun(
bool multi_threaded_message_loop) {
void AlloyMainRunnerDelegate::BeforeMainThreadRun() {
static_cast<ChromeBrowserProcessAlloy*>(g_browser_process)->Initialize();
}

View File

@@ -31,7 +31,7 @@ class AlloyMainRunnerDelegate : public CefMainRunnerDelegate {
// CefMainRunnerDelegate overrides.
content::ContentMainDelegate* GetContentMainDelegate() override;
void BeforeMainThreadInitialize(const CefMainArgs& args) override;
void BeforeMainThreadRun(bool multi_threaded_message_loop) override;
void BeforeMainThreadRun() override;
void AfterUIThreadInitialize() override;
void AfterUIThreadShutdown() override;
void BeforeMainThreadShutdown() override;

View File

@@ -100,7 +100,7 @@ void CefCrashReportUploadThread::ProcessPendingReport(
return;
case CrashReportDatabase::kCannotRequestUpload:
DCHECK(false);
NOTREACHED();
return;
}

View File

@@ -15,7 +15,6 @@
#include "chrome/common/profiler/main_thread_stack_sampling_profiler.h"
#include "components/keep_alive_registry/keep_alive_types.h"
#include "components/keep_alive_registry/scoped_keep_alive.h"
#include "components/metrics/persistent_system_profile.h"
ChromeMainRunnerDelegate::ChromeMainRunnerDelegate(
CefMainRunnerHandler* runner,
@@ -43,16 +42,6 @@ void ChromeMainRunnerDelegate::BeforeMainThreadInitialize(
#endif
}
void ChromeMainRunnerDelegate::BeforeMainThreadRun(
bool multi_threaded_message_loop) {
if (multi_threaded_message_loop) {
// Detach from the main thread so that these objects can be attached and
// modified from the UI thread going forward.
metrics::GlobalPersistentSystemProfile::GetInstance()
->DetachFromCurrentThread();
}
}
void ChromeMainRunnerDelegate::BeforeMainMessageLoopRun(
base::RunLoop* run_loop) {
// The ScopedKeepAlive instance triggers shutdown logic when released on the

View File

@@ -33,7 +33,6 @@ class ChromeMainRunnerDelegate : public CefMainRunnerDelegate {
// CefMainRunnerDelegate overrides.
content::ContentMainDelegate* GetContentMainDelegate() override;
void BeforeMainThreadInitialize(const CefMainArgs& args) override;
void BeforeMainThreadRun(bool multi_threaded_message_loop) override;
void BeforeMainMessageLoopRun(base::RunLoop* run_loop) override;
bool HandleMainMessageLoopQuit() override;
void BeforeUIThreadInitialize() override;

View File

@@ -37,7 +37,7 @@ void CefCommandLineImpl::InitFromArgv(int argc, const char* const* argv) {
CEF_VALUE_VERIFY_RETURN_VOID(true);
mutable_value()->InitFromArgv(argc, argv);
#else
DCHECK(false) << "method not supported on this platform";
NOTREACHED() << "method not supported on this platform";
#endif
}
@@ -47,7 +47,7 @@ void CefCommandLineImpl::InitFromString(const CefString& command_line) {
const std::wstring& str16 = command_line;
mutable_value()->ParseFromString(str16);
#else
DCHECK(false) << "method not supported on this platform";
NOTREACHED() << "method not supported on this platform";
#endif
}

View File

@@ -8,10 +8,10 @@
#include "libcef/browser/stream_impl.h"
#include "libcef/common/drag_data_impl.h"
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
DCHECK(false) << "object is read only"; \
return; \
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
NOTREACHED() << "object is read only"; \
return; \
}
CefDragDataImpl::CefDragDataImpl(const content::DropData& data)
@@ -214,4 +214,4 @@ CefPoint CefDragDataImpl::GetImageHotspot() {
bool CefDragDataImpl::HasImage() {
base::AutoLock lock_scope(lock_);
return image_ ? true : false;
}
}

View File

@@ -15,7 +15,7 @@ namespace {
bool AllowFileIO() {
if (CefCurrentlyOn(TID_UI) || CefCurrentlyOn(TID_IO)) {
DCHECK(false) << "file IO is not allowed on the current thread";
NOTREACHED() << "file IO is not allowed on the current thread";
return false;
}
return true;

View File

@@ -21,7 +21,7 @@ class CefMainRunnerDelegate {
virtual content::ContentMainDelegate* GetContentMainDelegate() = 0;
virtual void BeforeMainThreadInitialize(const CefMainArgs& args) {}
virtual void BeforeMainThreadRun(bool multi_threaded_message_loop) {}
virtual void BeforeMainThreadRun() {}
virtual void BeforeMainMessageLoopRun(base::RunLoop* run_loop) {}
virtual bool HandleMainMessageLoopQuit() { return false; }
virtual void BeforeUIThreadInitialize() {}

View File

@@ -158,16 +158,16 @@ void GetHeaderMap(const CefRequest::HeaderMap& source,
} // namespace
#define CHECK_READONLY_RETURN(val) \
if (read_only_) { \
DCHECK(false) << "object is read only"; \
return val; \
#define CHECK_READONLY_RETURN(val) \
if (read_only_) { \
NOTREACHED() << "object is read only"; \
return val; \
}
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
DCHECK(false) << "object is read only"; \
return; \
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
NOTREACHED() << "object is read only"; \
return; \
}
#define SETBOOLFLAG(obj, flags, method, FLAG) \
@@ -752,7 +752,7 @@ CefRequestImpl::NetReferrerPolicyToBlinkReferrerPolicy(
case REFERRER_POLICY_NO_REFERRER:
return network::mojom::ReferrerPolicy::kNever;
}
DCHECK(false);
NOTREACHED();
return network::mojom::ReferrerPolicy::kDefault;
}
@@ -779,7 +779,7 @@ cef_referrer_policy_t CefRequestImpl::BlinkReferrerPolicyToNetReferrerPolicy(
case network::mojom::ReferrerPolicy::kDefault:
return REFERRER_POLICY_DEFAULT;
}
DCHECK(false);
NOTREACHED();
return REFERRER_POLICY_DEFAULT;
}
@@ -1179,7 +1179,7 @@ void CefPostDataElementImpl::Get(network::ResourceRequestBody& body) const {
body.AppendFileRange(path, 0, std::numeric_limits<uint64_t>::max(),
base::Time());
} else {
DCHECK(false);
NOTREACHED();
}
}

View File

@@ -113,7 +113,7 @@ base::FilePath GetUserDataPath(CefSettings* settings,
return result;
}
DCHECK(false);
NOTREACHED();
return result;
}
@@ -130,7 +130,7 @@ bool DownloadPathIsDangerous(const base::FilePath& download_path) {
base::FilePath desktop_dir;
if (!base::PathService::Get(base::DIR_USER_DESKTOP, &desktop_dir)) {
DCHECK(false);
NOTREACHED();
return false;
}
return (download_path == desktop_dir);

View File

@@ -18,10 +18,10 @@
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_response.h"
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
DCHECK(false) << "object is read only"; \
return; \
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
NOTREACHED() << "object is read only"; \
return; \
}
// CefResponse ----------------------------------------------------------------

View File

@@ -104,7 +104,7 @@ CefTaskRunnerImpl::GetCurrentTaskRunner() {
} else if (current_id == BrowserThread::IO) {
return content::GetIOThreadTaskRunner({});
} else {
DCHECK(false);
NOTREACHED();
}
}

View File

@@ -29,7 +29,7 @@ CefRefPtr<CefThread> CefThread::CreateThread(
bool stoppable,
cef_com_init_mode_t com_init_mode) {
if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return nullptr;
}
@@ -130,7 +130,7 @@ void CefThreadImpl::Stop() {
return;
}
if (!owner_task_runner_->RunsTasksInCurrentSequence()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return;
}
@@ -144,7 +144,7 @@ bool CefThreadImpl::IsRunning() {
return false;
}
if (!owner_task_runner_->RunsTasksInCurrentSequence()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return false;
}

View File

@@ -18,12 +18,12 @@ CefRefPtr<CefURLRequest> CefURLRequest::Create(
CefRefPtr<CefURLRequestClient> client,
CefRefPtr<CefRequestContext> request_context) {
if (!request.get() || !client.get()) {
DCHECK(false) << "called with invalid parameters";
NOTREACHED() << "called with invalid parameters";
return nullptr;
}
if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) {
DCHECK(false) << "called on invalid thread";
NOTREACHED() << "called on invalid thread";
return nullptr;
}
@@ -37,7 +37,7 @@ CefRefPtr<CefURLRequest> CefURLRequest::Create(
}
return nullptr;
} else {
DCHECK(false) << "called in unsupported process";
NOTREACHED() << "called in unsupported process";
return nullptr;
}
}

View File

@@ -84,7 +84,7 @@ class CefValueController
inline bool VerifyThread() {
if (!thread_safe() && !on_correct_thread()) {
// This object should only be accessed from the thread that created it.
DCHECK(false) << "object accessed from incorrect thread.";
NOTREACHED() << "object accessed from incorrect thread.";
return false;
}
return true;
@@ -349,7 +349,7 @@ class CefValueBase : public CefType, public CefValueController::Object {
inline bool VerifyAttached() const {
if (detached()) {
// This object should not be accessed after being detached.
DCHECK(false) << "object accessed after being detached.";
NOTREACHED() << "object accessed after being detached.";
return false;
}
return true;
@@ -397,7 +397,7 @@ class CefValueBase : public CefType, public CefValueController::Object {
if (read_only() && modify) {
// This object cannot be modified.
DCHECK(false) << "mutation attempted on read-only object.";
NOTREACHED() << "mutation attempted on read-only object.";
return false;
}

View File

@@ -296,7 +296,7 @@ CefValueType CefValueImpl::GetType() {
case base::Value::Type::STRING:
return VTYPE_STRING;
default:
DCHECK(false);
NOTREACHED();
break;
}
}

View File

@@ -13,7 +13,7 @@ namespace {
bool AllowWait() {
if (CefCurrentlyOn(TID_UI) || CefCurrentlyOn(TID_IO)) {
DCHECK(false) << "waiting is not allowed on the current thread";
NOTREACHED() << "waiting is not allowed on the current thread";
return false;
}
return true;

View File

@@ -53,7 +53,7 @@ bool CefBrowserImpl::IsValid() {
}
CefRefPtr<CefBrowserHost> CefBrowserImpl::GetHost() {
DCHECK(false) << "GetHost cannot be called from the render process";
NOTREACHED() << "GetHost cannot be called from the render process";
return nullptr;
}

View File

@@ -271,7 +271,7 @@ void CefDOMDocumentImpl::Detach() {
bool CefDOMDocumentImpl::VerifyContext() {
if (!CEF_CURRENTLY_ON_RT() || frame_ == nullptr) {
DCHECK(false);
NOTREACHED();
return false;
}
return true;

View File

@@ -293,7 +293,7 @@ CefString CefDOMNodeImpl::GetElementTagName() {
}
if (!node_.IsElementNode()) {
DCHECK(false);
NOTREACHED();
return str;
}
@@ -312,7 +312,7 @@ bool CefDOMNodeImpl::HasElementAttributes() {
}
if (!node_.IsElementNode()) {
DCHECK(false);
NOTREACHED();
return false;
}
@@ -326,7 +326,7 @@ bool CefDOMNodeImpl::HasElementAttribute(const CefString& attrName) {
}
if (!node_.IsElementNode()) {
DCHECK(false);
NOTREACHED();
return false;
}
@@ -341,7 +341,7 @@ CefString CefDOMNodeImpl::GetElementAttribute(const CefString& attrName) {
}
if (!node_.IsElementNode()) {
DCHECK(false);
NOTREACHED();
return str;
}
@@ -361,7 +361,7 @@ void CefDOMNodeImpl::GetElementAttributes(AttributeMap& attrMap) {
}
if (!node_.IsElementNode()) {
DCHECK(false);
NOTREACHED();
return;
}
@@ -385,7 +385,7 @@ bool CefDOMNodeImpl::SetElementAttribute(const CefString& attrName,
}
if (!node_.IsElementNode()) {
DCHECK(false);
NOTREACHED();
return false;
}
@@ -402,7 +402,7 @@ CefString CefDOMNodeImpl::GetElementInnerText() {
}
if (!node_.IsElementNode()) {
DCHECK(false);
NOTREACHED();
return str;
}
@@ -422,7 +422,7 @@ CefRect CefDOMNodeImpl::GetElementBounds() {
}
if (!node_.IsElementNode()) {
DCHECK(false);
NOTREACHED();
return rect;
}
@@ -440,14 +440,14 @@ void CefDOMNodeImpl::Detach() {
bool CefDOMNodeImpl::VerifyContext() {
if (!document_.get()) {
DCHECK(false);
NOTREACHED();
return false;
}
if (!document_->VerifyContext()) {
return false;
}
if (node_.IsNull()) {
DCHECK(false);
NOTREACHED();
return false;
}
return true;

View File

@@ -105,7 +105,7 @@ void CefFrameImpl::SelectAll() {
}
void CefFrameImpl::ViewSource() {
DCHECK(false) << "ViewSource cannot be called from the renderer process";
NOTREACHED() << "ViewSource cannot be called from the renderer process";
}
void CefFrameImpl::GetSource(CefRefPtr<CefStringVisitor> visitor) {
@@ -258,7 +258,7 @@ void CefFrameImpl::VisitDOM(CefRefPtr<CefDOMVisitor> visitor) {
CefRefPtr<CefURLRequest> CefFrameImpl::CreateURLRequest(
CefRefPtr<CefRequest> request,
CefRefPtr<CefURLRequestClient> client) {
DCHECK(false) << "CreateURLRequest cannot be called from the render process";
NOTREACHED() << "CreateURLRequest cannot be called from the render process";
return nullptr;
}

Some files were not shown because too many files have changed in this diff Show More