Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 7645: Enable remote debugging by default and proxy devtools request #5500

Merged
merged 1 commit into from
May 12, 2020

Conversation

jumde
Copy link
Contributor

@jumde jumde commented May 10, 2020

Resolves brave/brave-browser#7645

Submitter Checklist:

Test Plan:

  1. Navigate to example.com
  2. Open developer tools > Audit - Generate Report
  3. Should work without any issues.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.
@jumde jumde requested a review from bridiver as a code owner May 10, 2020 04:10
@jumde jumde requested review from bsclifton and iefremov May 10, 2020 04:13
@jumde jumde self-assigned this May 10, 2020

#include "chrome/browser/devtools/url_constants.h"

const char kRemoteFrontendDomain[] = "devtools.brave.com";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not use the normal static redirect? My concern is that we're changing urls in different places and that makes it harder to find how/where/what we're changing

Copy link
Contributor Author

@jumde jumde May 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bridiver - I was trying that first, but it requires a much bigger re-write of the code.

Currently, the brave-proxy code lives in brave_proxying_url_loader_factory.cc which lives in //brave/browser/net. To use static redirect we need to invoke MaybeProxyRequest from devtools_instrumentation::WillCreateURLLoaderFactory which is present in //content/browser and we cannot add a deps for //brave/browser/net to //content/browser.

So for static redirect to work, we'll need to move the proxying code to //content/ or //net.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jumde do you remember if we have an issue for moving proxying code to //net? At least brave_system_request_handler.cc. I guess this is not the first layering problem with this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iefremov - Filed one: brave/brave-browser#9770 - Thanks for the reminder.

@bsclifton bsclifton added this to the 1.10.x - Nightly milestone May 11, 2020
@bsclifton
Copy link
Member

bsclifton commented May 11, 2020

Changes LGTM - but when running locally on Windows, it starts working and then gets to the generating report part. Unfortunately, that seems to close dev tools? Not sure if something is not being proxied properly?

Will try a signed executable tomorrow (from PR builder) to see if it makes a difference

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release version works as expected! 😄 Nice work here

@bsclifton
Copy link
Member

As mentioned in the issue, I believe what I ran into is captured w/ https://bugs.chromium.org/p/chromium/issues/detail?id=1036525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants