summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/ui/webui/conflicts
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/ui/webui/conflicts')
-rw-r--r--chromium/chrome/browser/ui/webui/conflicts/conflicts_data_fetcher.cc9
-rw-r--r--chromium/chrome/browser/ui/webui/conflicts/conflicts_ui.cc4
2 files changed, 7 insertions, 6 deletions
diff --git a/chromium/chrome/browser/ui/webui/conflicts/conflicts_data_fetcher.cc b/chromium/chrome/browser/ui/webui/conflicts/conflicts_data_fetcher.cc
index d7a42770c33..04c2f2a0c7d 100644
--- a/chromium/chrome/browser/ui/webui/conflicts/conflicts_data_fetcher.cc
+++ b/chromium/chrome/browser/ui/webui/conflicts/conflicts_data_fetcher.cc
@@ -7,7 +7,6 @@
#include <string>
#include <utility>
-#include "base/task/post_task.h"
#include "base/values.h"
#include "base/win/windows_version.h"
#include "chrome/browser/win/conflicts/module_database.h"
@@ -483,15 +482,15 @@ void ConflictsDataFetcher::OnModuleDatabaseIdle() {
#if defined(GOOGLE_CHROME_BUILD)
// The state of third-party features must be determined on the UI thread.
- base::PostTask(
- FROM_HERE, {content::BrowserThread::UI},
+ content::GetUIThreadTaskRunner({})->PostTask(
+ FROM_HERE,
base::BindOnce(
OnModuleDataFetched, std::move(on_conflicts_data_fetched_callback_),
std::move(results), std::move(third_party_conflicts_manager_state_)));
#else
// The third-party features are always disabled on Chromium builds.
- base::PostTask(FROM_HERE, {content::BrowserThread::UI},
- base::BindOnce(OnConflictsDataFetched,
+ content::GetUIThreadTaskRunner({})->PostTask(
+ FROM_HERE, base::BindOnce(OnConflictsDataFetched,
std::move(on_conflicts_data_fetched_callback_),
std::move(results), kNonGoogleChromeBuild));
#endif
diff --git a/chromium/chrome/browser/ui/webui/conflicts/conflicts_ui.cc b/chromium/chrome/browser/ui/webui/conflicts/conflicts_ui.cc
index 38b4f7f1cc1..15d96b0b21d 100644
--- a/chromium/chrome/browser/ui/webui/conflicts/conflicts_ui.cc
+++ b/chromium/chrome/browser/ui/webui/conflicts/conflicts_ui.cc
@@ -16,6 +16,7 @@
#include "chrome/grit/theme_resources.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/web_ui_data_source.h"
+#include "services/network/public/mojom/content_security_policy.mojom.h"
#include "ui/base/resource/resource_bundle.h"
namespace {
@@ -23,7 +24,8 @@ namespace {
content::WebUIDataSource* CreateConflictsUIHTMLSource() {
content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIConflictsHost);
- source->OverrideContentSecurityPolicyScriptSrc(
+ source->OverrideContentSecurityPolicy(
+ network::mojom::CSPDirectiveName::ScriptSrc,
"script-src chrome://resources 'self' 'unsafe-eval';");
source->AddResourcePath("conflicts.js", IDR_ABOUT_CONFLICTS_JS);