[SM] Use C++ Manifests for SM embedders
https://chromium-review.googlesource.com/c/chromium/src/+/1383530
This commit is contained in:
parent
79040e348a
commit
a913e396d5
3 changed files with 7 additions and 5 deletions
|
@ -715,8 +715,8 @@ void AtomBrowserClient::RegisterOutOfProcessServices(
|
|||
#endif
|
||||
}
|
||||
|
||||
std::unique_ptr<base::Value> AtomBrowserClient::GetServiceManifestOverlay(
|
||||
base::StringPiece name) {
|
||||
base::Optional<service_manager::Manifest>
|
||||
AtomBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
|
||||
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
||||
int id = -1;
|
||||
if (name == content::mojom::kBrowserServiceName)
|
||||
|
@ -725,10 +725,11 @@ std::unique_ptr<base::Value> AtomBrowserClient::GetServiceManifestOverlay(
|
|||
id = IDR_ELECTRON_CONTENT_PACKAGED_SERVICES_MANIFEST_OVERLAY;
|
||||
|
||||
if (id == -1)
|
||||
return nullptr;
|
||||
return base::nullopt;
|
||||
|
||||
base::StringPiece manifest_contents = rb.GetRawDataResource(id);
|
||||
return base::JSONReader::Read(manifest_contents);
|
||||
return service_manager::Manifest::FromValueDeprecated(
|
||||
base::JSONReader::Read(manifest_contents));
|
||||
}
|
||||
|
||||
net::NetLog* AtomBrowserClient::GetNetLog() {
|
||||
|
|
|
@ -138,7 +138,7 @@ class AtomBrowserClient : public content::ContentBrowserClient,
|
|||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path) override;
|
||||
void RegisterOutOfProcessServices(OutOfProcessServiceMap* services) override;
|
||||
std::unique_ptr<base::Value> GetServiceManifestOverlay(
|
||||
base::Optional<service_manager::Manifest> GetServiceManifestOverlay(
|
||||
base::StringPiece name) override;
|
||||
net::NetLog* GetNetLog() override;
|
||||
content::MediaObserver* GetMediaObserver() override;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "content/public/child/child_thread.h"
|
||||
#include "content/public/common/service_manager_connection.h"
|
||||
#include "content/public/common/simple_connection_filter.h"
|
||||
#include "content/public/utility/utility_thread.h"
|
||||
#include "services/proxy_resolver/proxy_resolver_service.h"
|
||||
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
|
||||
#include "services/service_manager/sandbox/switches.h"
|
||||
|
|
Loading…
Reference in a new issue