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

Unified Diff: shell/context.cc

Issue 1378303005: Do some plumbing. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
Index: shell/context.cc
diff --git a/shell/context.cc b/shell/context.cc
index 65e11f16dcbe4704048b017408dd11a4a442f597..91b72ff5549c5fad733233ef32744fc19083cf09 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->NativeApplicationOptionsForURL(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->NativeApplicationOptionsForURL(GURL("mojo:native_support"))
+ .allow_new_privs = true;
}
class TracingServiceProvider : public ServiceProvider {

Powered by Google App Engine
This is Rietveld 408576698