-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4228 from brave/bsc-remote-debugging-uplift
Remote debugging can now be enabled via brave://settings/privacy (uplift to 1.2.x)
- Loading branch information
Showing
12 changed files
with
154 additions
and
11 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