Skip to content

Commit

Permalink
Implement first-party domain blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
pilgrim-brave committed Feb 17, 2021
1 parent 7d777c6 commit 416c027
Show file tree
Hide file tree
Showing 22 changed files with 1,264 additions and 265 deletions.
9 changes: 9 additions & 0 deletions browser/brave_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "brave/components/brave_rewards/browser/buildflags/buildflags.h"
#include "brave/components/brave_shields/browser/brave_shields_util.h"
#include "brave/components/brave_shields/browser/brave_shields_web_contents_observer.h"
#include "brave/components/brave_shields/browser/domain_blocked_navigation_throttle.h"
#include "brave/components/brave_shields/browser/tracking_protection_service.h"
#include "brave/components/brave_shields/common/brave_shield_constants.h"
#include "brave/components/brave_wallet/buildflags/buildflags.h"
Expand Down Expand Up @@ -618,5 +619,13 @@ BraveContentBrowserClient::CreateThrottlesForNavigation(
throttles.push_back(std::move(ipfs_navigation_throttle));
#endif

if (std::unique_ptr<content::NavigationThrottle>
domain_blocked_navigation_throttle = brave_shields::
DomainBlockedNavigationThrottle::MaybeCreateThrottleFor(
handle, g_brave_browser_process->ad_block_service(),
g_brave_browser_process->ad_block_custom_filters_service(),
g_brave_browser_process->GetApplicationLocale()))
throttles.push_back(std::move(domain_blocked_navigation_throttle));

return throttles;
}
Loading

0 comments on commit 416c027

Please sign in to comment.