Sergey
f989bb2ea8
Moved tests out of components to fix dependencies
2021-03-25 12:26:36 +03:00
Jocelyn Liu
def4f64391
Don't create DecentralizedDnsNavigationThrottle for OTR contexts
2021-03-05 19:53:57 -08:00
Anthony Tseng
1e3380b160
Fix Open in Tor in wrong window by
...
calling `chrome::FindTabbedBrowser` with `match_original_profiles` equals false
2021-02-23 16:34:53 -08:00
Anthony Tseng
d9ef154e2b
Block .onion requests in non-Tor window and show "Open in Tor" when auto
...
redirect setting is off
2021-02-22 15:46:08 -08:00
mkarolin
d3f9f6b9be
GN formatting fixes.
2021-02-04 23:52:46 -05:00
mkarolin
e6abb6dc72
//chrome/browser/browser_process.h moved to its own target.
...
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/d3ee8ec8af52972d0b0e0273b6d4e594e1c0e791
commit d3ee8ec8af52972d0b0e0273b6d4e594e1c0e791
Author: Alan Cutter <alancutter@chromium.org >
Date: Thu Nov 19 07:24:04 2020 +0000
Reland "Reland "Extract browser_process.h/cc into own gn target""
This is a reland of d4e5f661c140a678791119d7504cd17a47355b4a
Re-fixed the Windows deps requirements. Also verified gn check locally
on Linux cross compile target for Windows.
https://chromium-review.googlesource.com/c/chromium/src/+/2546142/3/chrome/browser/win/conflicts/BUILD.gn
Original change's description:
> Reland "Extract browser_process.h/cc into own gn target"
>
> This is a reland of 86556051d6e906f2cb04e47609ab4a2dd667d698
>
> The original CL missed a dep requirement in the Chrome branded
> Windows build. This has been fixed:
> https://chromium-review.googlesource.com/c/chromium/src/+/2543873/2/chrome/browser/win/conflicts/BUILD.gn
>
> Original change's description:
> > Extract browser_process.h/cc into own gn target
> >
> > This CL pulls out browser_process.h and browser_process.cc into their
> > own gn target so that other gn targets can depend on it without creating
> > cyclic dependencies with //chrome/browser:browser.
> >
> > This is required for CL:
> > https://chromium-review.googlesource.com/c/chromium/src/+/2528519
> >
> > Bug: 1147410, 883570, 925153
2021-02-04 23:52:45 -05:00
Anthony Tseng
ffbddc9c7d
Ignore Onion-Location header if host is served over HTTP
2021-01-29 14:40:54 -08:00
Anthony Tseng
8dc18b4da2
Ignore Onion-Location header if scheme is not HTTP or HTTPS or not a .onion hostname
2021-01-29 14:39:38 -08:00
Anthony Tseng
4e70710c11
Fix infinite OpenInTorWindow looping when auto redirect through
...
navigation throttle.
Also change window disposition to SWITCH_TO_TAB to avoid redundant new
tab. We no longer close the original tab to avoid confusion.
2021-01-26 17:42:10 -08:00
Anthony Tseng
90e89ec220
fix tests
2021-01-25 12:19:23 -08:00
mkarolin
f6f6d30dc0
Formatting fixes.
2021-01-05 21:27:44 -05:00
Mario Sanchez Prada
e6fedc966a
Migrate away from using ResourceIdentifier now that it's gone upstream
...
As part of upstream bug 1134547[1], the ResourceIdentifier that Brave
Shields relied on so far has been completely removed[2], so we need to
adapt our code not to rely on it anymore so that we can keep building
Brave correctly on the latest dev channel release of Chromium 88.
This patch implements the first step to adapt Brave to this new
scenario, by moving into using Brave-specific values of the
ContentSettingsType enumeration instead of using the PLUGINS
type plus a ResourceIdentifier as we did before.
Note that this patch adds a "bs_" prefix to all the BraveShields
constants, to avoid collisions with the COOKIES and JAVASCRIPT
upstream content types. Added prefix to all constants for
consistency + update TS code.
Note that the goal of this change is simply to keep Brave building,
running and passing the tests so that we can continue working on the
rebase. Further work will be still needed in follow-up patches to
fully migrate the code base to a post-Flash world by changing those
bits that don't make sense anymore, and simplifying things as much
as possible.
[1] https://crbug.com/1134547
[2] https://crrev.com/c/2500161
2021-01-05 21:27:44 -05:00
Mario Sanchez Prada
69361548e8
Adapt includes for base/test/bind_test_util.h to base/test/bind.h
...
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/ef4e919472b5d3392ee0a203eb127cbbdfca18d2
commit ef4e919472b5d3392ee0a203eb127cbbdfca18d2
Author: Guido Urdaneta <guidou@chromium.org >
Date: Mon Nov 9 15:06:24 2020 +0000
Reland "Move base/test/bind_test_util.h to base/test/bind.h"
This reverts commit 8bd07a6cf9f06aabfa2af81c6e3679c0d51dad73.
Reason for revert: This revert was incorrect and breaks the build.
Original change's description:
> Revert "Move base/test/bind_test_util.h to base/test/bind.h"
>
> This reverts commit a4493a6f807921ee85f7783e671c1d7d488c5bff.
>
> Reason for revert: This CL breaks internal builds (e.g. /chrome/browser/media/kaleidoscope/internal/kaleidoscope_browsertest.cc).
>
> Original change's description:
> > Move base/test/bind_test_util.h to base/test/bind.h
> >
> > Stop relying on us to remember arcane file names when writing tests,
> > and repeating the directory hierarchy into the file name.
> >
> > R=dcheng@chromium.org
> > TBR=
> > NOPRESUBMIT=true
> >
> > Change-Id: I49c951162939c7dcef44883bee740f94b2f49e09
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523099
> > Commit-Queue: danakj <danakj@chromium.org >
> > Reviewed-by: Daniel Cheng <dcheng@chromium.org >
> > Cr-Commit-Position: refs/heads/master@{#825145}
>
> TBR=danakj@chromium.org ,dcheng@chromium.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Change-Id: If165b8443662baa564895e994ea0d772348e6da6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2526102
> Reviewed-by: Denis Kuznetsov [CET] <antrim@chromium.org >
> Commit-Queue: Denis Kuznetsov [CET] <antrim@chromium.org >
> Cr-Commit-Position: refs/heads/master@{#825328}
2021-01-05 21:27:43 -05:00
Anthony Tseng
a3bea53b95
Check auto onion redirect setting for onion domain and
...
rename kAutoOnionLocation to kAutoOnionRedirect
2021-01-04 12:09:11 -08:00
Anthony Tseng
4bac0616e3
Enabling extensions in Tor through "Allow in private" and warn users
...
that network requests will not go through Tor if the extension is running in
spanning mode
2020-12-14 14:59:36 -08:00
Anthony Tseng
c0ea3db0fb
Fix test build and eliminate one extra patch
2020-12-14 14:59:35 -08:00
Anthony Tseng
8b5636c117
Add a test case for allow in tor and split mode
2020-12-14 14:59:35 -08:00
mkarolin
9b5a0ca1d6
[Unit tests] Added a missing header include.
2020-12-08 15:26:01 -05:00
Anthony Tseng
78f81ae248
Address review feedback from yrliou
...
1. Component extension should be allowed in tor
2. InitTorProfileUserPref unittest
3. GetTorProfile refactor
2020-11-18 15:13:23 -08:00
Anthony Tseng
b82905c97d
Introduce MockTorLauncherFactory to test cases like CloseLastTorWindow
2020-11-18 15:13:23 -08:00
Anthony Tseng
df4842a53a
Remove brave/browser/profiles deps for brave/browser/tor
2020-11-18 15:13:23 -08:00
Anthony Tseng
dfd40f7ca1
Move KillTor() to TorProfileManager
2020-11-18 15:13:23 -08:00
Anthony Tseng
b03d2c44db
Fix tests
2020-11-18 15:13:22 -08:00
Anthony Tseng
fde6209853
Brave profile manager cleanup:
...
1. Block extensions for tor OTR profile
2. Init prefs
3. Decouple tor logic from it completely
2020-11-18 15:13:22 -08:00
Anthony Tseng
55afff5070
Make Tor profile an OTR profile associated with the original profile
2020-11-18 15:13:16 -08:00
Anthony Tseng
62cfbb85b1
Use tor_strings in components and address various review feedbacks
2020-10-27 16:27:24 -07:00
Anthony Tseng
f7c65a925a
Remove BraveTorClientUpdaterDelegate and avoid unused variable warning
2020-10-27 16:27:24 -07:00
Anthony Tseng
560f751c0e
Put TorProfileServiceFactory behind ENABLE_TOR build flag
2020-10-27 16:27:24 -07:00
Anthony Tseng
4e658bdccb
Move tor related tests out of test/BUILD.gn
...
and fix minor deps issues
2020-10-27 16:27:23 -07:00
Anthony Tseng
eb844a44e2
Move navigation_throttles and tab_helpers to components/tor
2020-10-27 16:27:23 -07:00
Anthony Tseng
93b2f545d7
Move BraveTorClientUpdater
2020-10-27 16:27:23 -07:00
Anthony Tseng
1d74cf94c3
Move browser/tor & common/tor
...
except navigation_throttle and tab_helper
2020-10-27 16:27:23 -07:00
Anthony Tseng
64d6268d67
Remove TorConfig typemap
2020-10-27 16:27:23 -07:00
Anthony Tseng
08e8604cd4
Move buildflag
2020-10-27 16:27:22 -07:00
Anthony Tseng
008196fc1b
Fix browser test for new icon and clang-format
2020-10-13 22:37:24 -07:00
Anthony Tseng
15b4acd44a
nits fix and add comments for .onion handling
2020-10-13 22:02:02 -07:00
Anthony Tseng
4494e6a5ad
Remove unused WebContentsObserve from OnionLocationTabHelper
2020-10-13 22:02:02 -07:00
Anthony Tseng
f14d87a8e6
Move OnionLocationView to BraveLocationBarView
2020-10-13 22:02:02 -07:00
Anthony Tseng
6c12465edd
Close original tab after auto onion redirect if it is not last tab of the window
2020-10-13 22:02:01 -07:00
Anthony Tseng
5d74b40ad3
Add TorDisabled test case
2020-10-13 22:02:01 -07:00
Anthony Tseng
37aa257866
Fix crash when automatically opening onion site and close the tor window
...
at browser startup
[8357:775:1008/110058.682124:FATAL:remote.h(97)] Check failed: is_bound(). Cannot issue Interface method calls on an unbound Remote
0 libbase.dylib 0x000000010eb7c7b9 base::debug::CollectStackTrace(void**, unsigned long) + 9
1 libbase.dylib 0x000000010ea67f43 base::debug::StackTrace::StackTrace() + 19
2 libbase.dylib 0x000000010ea8b075 logging::LogMessage::~LogMessage() + 261
3 libbase.dylib 0x000000010ea8bd5e logging::LogMessage::~LogMessage() + 14
4 libchrome_dll.dylib 0x0000000114832d6b TorLauncherFactory::OnTorControlCheckComplete() + 219
5 libchrome_dll.dylib 0x00000001148361cb base::internal::Invoker<base::internal::BindState<void (TorLauncherFactory::*)(), base::WeakPtr<TorLauncherFactory> >, void ()>::RunOnce(base::internal::BindStateBase*) + 155
6 libbase.dylib 0x000000010eb09dbb base::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 411
2020-10-13 22:02:01 -07:00
Anthony Tseng
8faf100aea
Address review feedbacks from iefremov
2020-10-13 22:02:01 -07:00
Anthony Tseng
e01eafe815
Use Onion Available label button in Tor window
2020-10-13 22:02:01 -07:00
Anthony Tseng
89c36b07bb
Check onion location label in browser test
2020-10-13 22:02:00 -07:00
Anthony Tseng
ba2de916e3
Add browser test for OnionLocationNavigationThrottle
2020-10-13 22:02:00 -07:00
Anthony Tseng
31cb0d270f
Fix OnTorProfileCreated lifetime issue
2020-10-13 22:02:00 -07:00
Anthony Tseng
2fcf841718
Add prefs for auto onion location redirect
2020-10-13 22:02:00 -07:00
Anthony Tseng
32e4594415
Handle onion-location HTTP header & .onion domain
2020-10-13 22:01:59 -07:00
Anthony Tseng
03f860ef88
clang-format
2020-09-17 15:07:42 -07:00
Anthony Tseng
c667a2c56c
Address review feedback
2020-09-17 15:07:42 -07:00