Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: content/browser/service_manager/service_manager_context.cc

Issue 2501913002: Change the NaCl loader and broker processes to use the ServiceManager. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/service_manager/service_manager_context.cc
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc
index 2b211b4511f52a523581e026e33ba0523c759a5f..0a0dbaa17ce7444b0af6cc106d79241774932451 100644
--- a/content/browser/service_manager/service_manager_context.cc
+++ b/content/browser/service_manager/service_manager_context.cc
@@ -248,6 +248,24 @@ ServiceManagerContext::ServiceManagerContext() {
manifest_provider->AddManifestValue(kManifests[i].name,
std::move(manifest_value));
}
+ for (const auto& manifest :
+ GetContentClient()->browser()->GetExtraServiceManifests()) {
+ std::string contents =
+ GetContentClient()
+ ->GetDataResource(manifest.second,
+ ui::ScaleFactor::SCALE_FACTOR_NONE)
+ .as_string();
+ base::debug::Alias(&manifest.first);
piman 2016/11/23 18:08:10 Why this?
Sam McNally 2016/11/24 02:10:41 Copy-pasta. Removed it.
+ CHECK(!contents.empty());
piman 2016/11/23 18:08:11 nit: DCHECK
Sam McNally 2016/11/24 02:10:41 I've refactored this duplicate code out, keeping t
+
+ std::unique_ptr<base::Value> manifest_value =
+ base::JSONReader::Read(contents);
+ base::debug::Alias(&contents);
piman 2016/11/23 18:08:11 Why this?
Sam McNally 2016/11/24 02:10:41 Copy-pasta.
+ CHECK(manifest_value);
piman 2016/11/23 18:08:11 nit: DCHECK
Sam McNally 2016/11/24 02:10:41 Same as with the above CHECK.
+
+ manifest_provider->AddManifestValue(manifest.first,
+ std::move(manifest_value));
piman 2016/11/23 18:08:11 This block looks like a bunch of copy/paste from t
Sam McNally 2016/11/24 02:10:41 Done.
+ }
in_process_context_ = new InProcessServiceManagerContext;
request = in_process_context_->Start(std::move(manifest_provider));
}

Powered by Google App Engine
This is Rietveld 408576698