-
Notifications
You must be signed in to change notification settings - Fork 850
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
Decouple adblock engines from component loading methods #10994
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3153432
add httpse component installer
bridiver c9a05e6
delete on correct task runner
bridiver 345c566
create engine to handle task runner vs UI thread
bridiver 2578955
initialize engine right away
bridiver 7648cba
fix tests
antonok-edm 2718626
rename things according to review feedback
antonok-edm d8a2360
remove dead code
antonok-edm 8ae094f
add regional catalog provider interface
antonok-edm 331afde
call LoadRegionalCatalog in AdBlockRegionalServiceManager::Init
antonok-edm 6ceedb7
fix thread issues with new classes
bridiver 9ad25d7
use the new engine
bridiver e4a1acc
add deleter for all adblock services
bridiver 1ed764d
fix destruction of providers
bridiver bf82da8
review feedback
antonok-edm 64d01d6
final fixes
antonok-edm 391d032
fix sequence checking in tests
antonok-edm a60b50d
remove outdated WaitForBraveExtensionShieldsDataReady method
antonok-edm 70c6a33
use a PrefChangeRegistrar for DefaultCookieListFlagEnabledTest
antonok-edm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,6 @@ class LocalDataFilesService; | |
|
||
namespace brave_shields { | ||
class AdBlockService; | ||
class AdBlockCustomFiltersService; | ||
class AdBlockRegionalServiceManager; | ||
class HTTPSEverywhereService; | ||
} // namespace brave_shields | ||
|
||
|
@@ -90,10 +88,6 @@ class BraveBrowserProcessImpl : public BraveBrowserProcess, | |
|
||
void StartBraveServices() override; | ||
brave_shields::AdBlockService* ad_block_service() override; | ||
brave_shields::AdBlockCustomFiltersService* ad_block_custom_filters_service() | ||
override; | ||
brave_shields::AdBlockRegionalServiceManager* | ||
ad_block_regional_service_manager() override; | ||
#if BUILDFLAG(ENABLE_EXTENSIONS) | ||
brave_component_updater::ExtensionWhitelistService* | ||
extension_whitelist_service() override; | ||
|
@@ -155,6 +149,7 @@ class BraveBrowserProcessImpl : public BraveBrowserProcess, | |
#endif | ||
std::unique_ptr<debounce::DebounceComponentInstaller> | ||
debounce_component_installer_; | ||
bool created_https_everywhere_service_ = false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure why this is needed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as explained above this was changed to match upstream conventions |
||
std::unique_ptr<brave_shields::HTTPSEverywhereService> | ||
https_everywhere_service_; | ||
std::unique_ptr<brave_stats::BraveStatsUpdater> brave_stats_updater_; | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridiver I believe this was your change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pretty standard for lazy init and you can find many examples in browser_process_impl.cc. I just changed it to match upstream conventions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure those four upstream occurences of
bool
inbrowser_process_impl.h
are leftovers from ancient times (mbscoped_ptr
was not convertible to bool?) You can see that all new additions to browser_process_impl simply checkunique_ptr
s, no additional flags are really needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember why I bothered doing it in the first place, maybe some test issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like there was some reason I did this, but it was so long ago I can't remember. If it doesn't cause any problems I'm fine with undoing it