OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/shell/application_manager.h" | 5 #include "mojo/shell/application_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 if (url_to_native_options_.find(base_resolved_url) != | 374 if (url_to_native_options_.find(base_resolved_url) != |
375 url_to_native_options_.end()) { | 375 url_to_native_options_.end()) { |
376 DVLOG(2) << "Applying stored native options to resolved URL " | 376 DVLOG(2) << "Applying stored native options to resolved URL " |
377 << fetcher->GetURL(); | 377 << fetcher->GetURL(); |
378 options = url_to_native_options_[base_resolved_url]; | 378 options = url_to_native_options_[base_resolved_url]; |
379 } | 379 } |
380 | 380 |
381 // TODO(erg): Have a better way of switching the sandbox on. For now, switch | 381 // TODO(erg): Have a better way of switching the sandbox on. For now, switch |
382 // it on hard coded when we're using some of the sandboxable core services. | 382 // it on hard coded when we're using some of the sandboxable core services. |
383 bool start_sandboxed = false; | 383 bool start_sandboxed = false; |
384 if (app_url == GURL("mojo://core_services/") && qualifier == "Core") | 384 if (app_url == GURL("mojo://core_services/") && qualifier == "Sandboxed Core") |
385 start_sandboxed = true; | 385 start_sandboxed = true; |
386 else if (app_url == GURL("mojo://html_viewer/")) | 386 else if (app_url == GURL("mojo://html_viewer/")) |
387 start_sandboxed = true; | 387 start_sandboxed = true; |
388 | 388 |
389 fetcher->AsPath(blocking_pool_, | 389 fetcher->AsPath(blocking_pool_, |
390 base::Bind(&ApplicationManager::RunNativeApplication, | 390 base::Bind(&ApplicationManager::RunNativeApplication, |
391 weak_ptr_factory_.GetWeakPtr(), | 391 weak_ptr_factory_.GetWeakPtr(), |
392 base::Passed(request.Pass()), start_sandboxed, | 392 base::Passed(request.Pass()), start_sandboxed, |
393 options, cleanup, base::Passed(fetcher.Pass()))); | 393 options, cleanup, base::Passed(fetcher.Pass()))); |
394 } | 394 } |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 ConnectToApplication(nullptr, request.Pass(), std::string(), GURL(), | 543 ConnectToApplication(nullptr, request.Pass(), std::string(), GURL(), |
544 GetProxy(&services), nullptr, | 544 GetProxy(&services), nullptr, |
545 GetPermissiveCapabilityFilter(), base::Closure()); | 545 GetPermissiveCapabilityFilter(), base::Closure()); |
546 MessagePipe pipe; | 546 MessagePipe pipe; |
547 services->ConnectToService(interface_name, pipe.handle1.Pass()); | 547 services->ConnectToService(interface_name, pipe.handle1.Pass()); |
548 return pipe.handle0.Pass(); | 548 return pipe.handle0.Pass(); |
549 } | 549 } |
550 | 550 |
551 } // namespace shell | 551 } // namespace shell |
552 } // namespace mojo | 552 } // namespace mojo |
OLD | NEW |