Morph InstallationReporter into a KeyedService
Before that it used static profile-bases map, which is exactly what
KeyedService is about.
One more small change to make this possible: ExternalProviderImpl no
more accepts and deals with nullptr as a profile. The only place where
it was used is one test, which has testing profile now.
Bug: 949142
Change-Id: Ice9669be43104c76d71b140d2dfbc65a29fd1368
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807252
Commit-Queue: Oleg Davydov <[email protected]>
Reviewed-by: Devlin <[email protected]>
Reviewed-by: Sergey Poromov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#700284}
diff --git a/chrome/browser/extensions/crx_installer_browsertest.cc b/chrome/browser/extensions/crx_installer_browsertest.cc
index a199cf0b..c837ecc 100644
--- a/chrome/browser/extensions/crx_installer_browsertest.cc
+++ b/chrome/browser/extensions/crx_installer_browsertest.cc
@@ -699,7 +699,7 @@
EXPECT_FALSE(InstallExtension(crx_path, 0));
auto installation_failure =
- InstallationReporter::Get(profile(), extension_id);
+ InstallationReporter::Get(profile())->Get(extension_id);
EXPECT_EQ(InstallationReporter::FailureReason::CRX_INSTALL_ERROR_DECLINED,
installation_failure.failure_reason);
EXPECT_EQ(CrxInstallErrorDetail::EXTENSION_IS_BLOCKLISTED,
@@ -962,7 +962,7 @@
EXPECT_EQ("0.0", extension->VersionString());
auto installation_failure =
- InstallationReporter::Get(profile(), extension_id);
+ InstallationReporter::Get(profile())->Get(extension_id);
EXPECT_EQ(InstallationReporter::FailureReason::
CRX_INSTALL_ERROR_SANDBOXED_UNPACKER_FAILURE,
installation_failure.failure_reason);
@@ -1005,7 +1005,7 @@
EXPECT_EQ("0.0", extension->VersionString());
auto installation_failure =
- InstallationReporter::Get(profile(), extension_id);
+ InstallationReporter::Get(profile())->Get(extension_id);
EXPECT_EQ(InstallationReporter::FailureReason::CRX_INSTALL_ERROR_OTHER,
installation_failure.failure_reason);
EXPECT_EQ(CrxInstallErrorDetail::UNEXPECTED_ID,