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

Side by Side Diff: shell/context.cc

Issue 1444433002: Added anti-singleton services (new process/thread per connection). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Made MakeApplicationIdentity, updated README Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "shell/context.h" 5 #include "shell/context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return; 187 return;
188 } 188 }
189 189
190 manager->GetNativeApplicationOptionsForURL(url)->force_in_process = true; 190 manager->GetNativeApplicationOptionsForURL(url)->force_in_process = true;
191 } 191 }
192 192
193 // TODO(vtl): This is a total hack. We should have a systematic way of 193 // TODO(vtl): This is a total hack. We should have a systematic way of
194 // configuring options for native apps. 194 // configuring options for native apps.
195 manager->GetNativeApplicationOptionsForURL(GURL("mojo:native_support")) 195 manager->GetNativeApplicationOptionsForURL(GURL("mojo:native_support"))
196 ->allow_new_privs = true; 196 ->allow_new_privs = true;
197 // All NaCl operations require a unique process
198 manager->GetNativeApplicationOptionsForURL(GURL("mojo:pnacl_compile"))
199 ->force_unique_process = true;
200 manager->GetNativeApplicationOptionsForURL(GURL("mojo:pnacl_link"))
201 ->force_unique_process = true;
202 manager->GetNativeApplicationOptionsForURL(
203 GURL("mojo:content_handler_nonsfi_pexe"))
204 ->force_unique_process = true;
205 manager->GetNativeApplicationOptionsForURL(
206 GURL("mojo:content_handler_nonsfi_nexe"))
207 ->force_unique_process = true;
197 } 208 }
198 209
199 class TracingServiceProvider : public ServiceProvider { 210 class TracingServiceProvider : public ServiceProvider {
200 public: 211 public:
201 TracingServiceProvider(Tracer* tracer, 212 TracingServiceProvider(Tracer* tracer,
202 mojo::InterfaceRequest<ServiceProvider> request) 213 mojo::InterfaceRequest<ServiceProvider> request)
203 : tracer_(tracer), binding_(this, request.Pass()) {} 214 : tracer_(tracer), binding_(this, request.Pass()) {}
204 ~TracingServiceProvider() override {} 215 ~TracingServiceProvider() override {}
205 216
206 void ConnectToService(const mojo::String& service_name, 217 void ConnectToService(const mojo::String& service_name,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 app_urls_.erase(url); 399 app_urls_.erase(url);
389 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { 400 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) {
390 DCHECK_EQ(base::MessageLoop::current()->task_runner(), 401 DCHECK_EQ(base::MessageLoop::current()->task_runner(),
391 task_runners_->shell_runner()); 402 task_runners_->shell_runner());
392 base::MessageLoop::current()->Quit(); 403 base::MessageLoop::current()->Quit();
393 } 404 }
394 } 405 }
395 } 406 }
396 407
397 } // namespace shell 408 } // namespace shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698