Skip to content

Commit

Permalink
Merge pull request #652 from brave/crlsets
Browse files Browse the repository at this point in the history
Issue 518: Enabling CRLSets
  • Loading branch information
jumde authored Nov 13, 2018
2 parents 1698b31 + 5605286 commit 92e9424
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
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
1 change: 1 addition & 0 deletions common/extensions/extension_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const char brave_rewards_extension_id[] = "jidkidbbcafjabdphckchenhfomhnfma";
const char brave_webtorrent_extension_id[] = "lgjmpdmojkpocjcopdikifhejkkjglho";
const char widevine_extension_id[] = "oimompecagnajdejgnnjijobebaeigek";
const char brave_sync_extension_id[] = "nomlkjnggnifocmealianaaiobmebgil";
const char crl_set_extension_id[] = "hfnkpimlhhgieaddgfemjhofmfblmnib";

const char pdfjs_extension_id[] = "oemmndcbldboiebfnladdacbdfmadadm";
const char pdfjs_extension_name[] = "PDF Viewer (PDF.js)";
Expand Down
1 change: 1 addition & 0 deletions common/extensions/extension_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extern const char brave_rewards_extension_id[];
extern const char brave_webtorrent_extension_id[];
extern const char widevine_extension_id[];
extern const char brave_sync_extension_id[];
extern const char crl_set_extension_id[];

extern const char pdfjs_extension_id[];
extern const char pdfjs_extension_name[];
Expand Down

0 comments on commit 92e9424

Please sign in to comment.