-
Notifications
You must be signed in to change notification settings - Fork 872
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
969ae4c
commit 93cf28a
Showing
4 changed files
with
61 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
42 changes: 42 additions & 0 deletions
42
chromium_src/chrome/browser/component_updater/tls_deprecation_config_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,42 @@ | ||
/* Copyright (c) 2020 The Brave Authors. All rights reserved. | ||
* 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 "chrome/browser/component_updater/tls_deprecation_config_component_installer.h" | ||
|
||
#define ReconfigureAfterNetworkRestart \ | ||
ReconfigureAfterNetworkRestart_ChromiumImpl | ||
#include "../../../../../chrome/browser/component_updater/tls_deprecation_config_component_installer.cc" // NOLINT | ||
#undef ReconfigureAfterNetworkRestart | ||
|
||
#include "base/bind.h" | ||
#include "chrome/browser/browser_process.h" | ||
#include "content/public/browser/browser_thread.h" | ||
#include "services/network/public/proto/tls_deprecation_config.pb.h" | ||
|
||
namespace component_updater { | ||
|
||
namespace { | ||
|
||
std::string LoadEmptyConfig() { | ||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, | ||
base::BlockingType::WILL_BLOCK); | ||
auto config = | ||
std::make_unique<chrome_browser_ssl::LegacyTLSExperimentConfig>(); | ||
config->set_version_id(1); | ||
return config->SerializeAsString(); | ||
} | ||
|
||
} // namespace | ||
|
||
// static | ||
void TLSDeprecationConfigComponentInstallerPolicy:: | ||
ReconfigureAfterNetworkRestart() { | ||
base::ThreadPool::PostTaskAndReplyWithResult( | ||
FROM_HERE, {base::TaskPriority::USER_VISIBLE, base::MayBlock()}, | ||
base::BindOnce(&LoadEmptyConfig), | ||
base::BindOnce(&UpdateLegacyTLSConfigOnUI)); | ||
} | ||
|
||
} // namespace component_updater |
15 changes: 15 additions & 0 deletions
15
chromium_src/chrome/browser/component_updater/tls_deprecation_config_component_installer.h
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,15 @@ | ||
/* Copyright (c) 2020 The Brave Authors. All rights reserved. | ||
* 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/. */ | ||
|
||
#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_COMPONENT_UPDATER_TLS_DEPRECATION_CONFIG_COMPONENT_INSTALLER_H_ | ||
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_COMPONENT_UPDATER_TLS_DEPRECATION_CONFIG_COMPONENT_INSTALLER_H_ | ||
|
||
#define ReconfigureAfterNetworkRestart \ | ||
ReconfigureAfterNetworkRestart_ChromiumImpl(); \ | ||
static void ReconfigureAfterNetworkRestart | ||
#include "../../../../../chrome/browser/component_updater/tls_deprecation_config_component_installer.h" | ||
#undef ReconfigureAfterNetworkRestart | ||
|
||
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_COMPONENT_UPDATER_TLS_DEPRECATION_CONFIG_COMPONENT_INSTALLER_H_ |