-
Notifications
You must be signed in to change notification settings - Fork 902
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 #997 from brave/crlset_reintroduced
CRLsets reintroduced
- Loading branch information
Showing
8 changed files
with
156 additions
and
0 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
29 changes: 29 additions & 0 deletions
29
chromium_src/chrome/browser/component_updater/crl_set_component_installer.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,29 @@ | ||
/* 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/. */ | ||
|
||
#define RegisterCRLSetComponent RegisterCRLSetComponent_ChromiumImpl | ||
#include "../../../../../chrome/browser/component_updater/crl_set_component_installer.cc" | ||
#undef RegisterCRLSetComponent | ||
|
||
#include "brave/browser/extensions/brave_component_extension.h" | ||
#include "brave/common/extensions/extension_constants.h" | ||
#include "chrome/browser/browser_process.h" | ||
|
||
namespace component_updater { | ||
|
||
void OnCRLSetRegistered() { | ||
ComponentsUI demand_updater; | ||
demand_updater.OnDemandUpdate(g_browser_process->component_updater(), | ||
crl_set_extension_id); | ||
} | ||
|
||
void RegisterCRLSetComponent(ComponentUpdateService* cus, | ||
const base::FilePath& user_data_dir) { | ||
auto installer = base::MakeRefCounted<component_updater::ComponentInstaller>( | ||
std::make_unique<CRLSetPolicy>()); | ||
installer->Register(g_browser_process->component_updater(), | ||
base::Bind(&OnCRLSetRegistered)); | ||
} | ||
|
||
} // namespace component_updater |
21 changes: 21 additions & 0 deletions
21
chromium_src/components/component_updater/configurator_impl.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,21 @@ | ||
/* 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 "components/component_updater/component_updater_url_constants.h" | ||
|
||
namespace component_updater { | ||
|
||
const char kBraveUpdaterDefaultUrl[] = | ||
"https://componentupdater.brave.com/service/update2"; | ||
|
||
const char kBraveUpdaterFallbackUrl[] = | ||
"http://componentupdater.brave.com/service/update2"; | ||
|
||
} // namespace component_updater | ||
|
||
#define kUpdaterDefaultUrl kBraveUpdaterDefaultUrl | ||
#define kUpdaterFallbackUrl kBraveUpdaterFallbackUrl | ||
#include "../../../../components/component_updater/configurator_impl.cc" | ||
#undef kUpdaterDefaultUrl | ||
#undef kUpdaterFallbackUrl |
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