-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remote debugging can now be enabled via brave://settings/privacy
Default for this is FALSE (meaning remote debugging is disabled). Setting is global (using local_state), not per-profile. Fixes brave/brave-browser#5640 Fixes brave/brave-browser#3199
- Loading branch information
Showing
13 changed files
with
122 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
chromium_src/chrome/browser/devtools/devtools_ui_bindings.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/common/pref_names.h" | ||
#include "chrome/browser/browser_process.h" | ||
#include "chrome/browser/devtools/devtools_ui_bindings.h" | ||
|
||
#define IsValidRemoteFrontendURL IsValidRemoteFrontendURL_ChromiumImpl | ||
#include "../../../../../../chrome/browser/devtools/devtools_ui_bindings.cc" | ||
#undef IsValidRemoteFrontendURL | ||
|
||
bool DevToolsUIBindings::IsValidRemoteFrontendURL(const GURL& url) { | ||
PrefService* local_state = g_browser_process->local_state(); | ||
if (local_state) { | ||
if (!local_state->GetBoolean(kRemoteDebuggingEnabled)) { | ||
LOG(ERROR) | ||
<< "Remote debugging is DISABLED. If you want to use it, please " | ||
"enable in brave://settings/privacy"; | ||
return false; | ||
} | ||
} | ||
|
||
return IsValidRemoteFrontendURL_ChromiumImpl(url); | ||
} |
15 changes: 15 additions & 0 deletions
15
chromium_src/chrome/browser/devtools/devtools_ui_bindings.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
// you can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ | ||
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ | ||
|
||
#define IsValidRemoteFrontendURL \ | ||
IsValidRemoteFrontendURL_ChromiumImpl(const GURL& url); \ | ||
static bool IsValidRemoteFrontendURL | ||
#include "../../../../../chrome/browser/devtools/devtools_ui_bindings.h" | ||
#undef IsValidRemoteFrontendURL | ||
|
||
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
patches/chrome-browser-ui-webui-devtools_ui_data_source.cc.patch
This file was deleted.
Oops, something went wrong.