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

Unified Diff: shell/context.cc

Issue 1378303005: Do some plumbing. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review Created 5 years, 2 months 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
« no previous file with comments | « shell/child_process_host_unittest.cc ('k') | shell/in_process_native_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/context.cc
diff --git a/shell/context.cc b/shell/context.cc
index 65e11f16dcbe4704048b017408dd11a4a442f597..7247559f8cc79a7eb563be9c9db45990fe37edd8 100644
--- a/shell/context.cc
+++ b/shell/context.cc
@@ -32,6 +32,7 @@
#include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
#include "shell/application_manager/application_loader.h"
#include "shell/application_manager/application_manager.h"
+#include "shell/application_manager/native_application_options.h"
#include "shell/background_application_loader.h"
#include "shell/command_line_util.h"
#include "shell/filename_util.h"
@@ -179,17 +180,20 @@ void InitNativeOptions(ApplicationManager* manager,
base::SplitString(command_line.GetSwitchValueASCII(switches::kForceInProcess),
',', &force_in_process_url_list);
for (const auto& force_in_process_url : force_in_process_url_list) {
- GURL gurl(force_in_process_url);
- if (!gurl.is_valid()) {
+ GURL url(force_in_process_url);
+ if (!url.is_valid()) {
LOG(ERROR) << "Invalid value for switch " << switches::kForceInProcess
<< ": '" << force_in_process_url << "'is not a valid URL.";
return;
}
- NativeRunnerFactory::Options options;
- options.force_in_process = true;
- manager->SetNativeOptionsForURL(options, gurl);
+ manager->GetNativeApplicationOptionsForURL(url)->force_in_process = true;
}
+
+ // TODO(vtl): This is a total hack. We should have a systematic way of
+ // configuring options for native apps.
+ manager->GetNativeApplicationOptionsForURL(GURL("mojo:native_support"))
+ ->allow_new_privs = true;
}
class TracingServiceProvider : public ServiceProvider {
« no previous file with comments | « shell/child_process_host_unittest.cc ('k') | shell/in_process_native_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698