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

Side by Side Diff: mojo/shell/application_manager.cc

Issue 1280043003: Sandbox html_viewer on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update DEPS for the new dependency. Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « mojo/runner/linux_sandbox.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 == "Sandboxed 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/"))
387 start_sandboxed = true;
386 388
387 fetcher->AsPath(blocking_pool_, 389 fetcher->AsPath(blocking_pool_,
388 base::Bind(&ApplicationManager::RunNativeApplication, 390 base::Bind(&ApplicationManager::RunNativeApplication,
389 weak_ptr_factory_.GetWeakPtr(), 391 weak_ptr_factory_.GetWeakPtr(),
390 base::Passed(request.Pass()), start_sandboxed, 392 base::Passed(request.Pass()), start_sandboxed,
391 options, cleanup, base::Passed(fetcher.Pass()))); 393 options, cleanup, base::Passed(fetcher.Pass())));
392 } 394 }
393 395
394 void ApplicationManager::RunNativeApplication( 396 void ApplicationManager::RunNativeApplication(
395 InterfaceRequest<Application> application_request, 397 InterfaceRequest<Application> application_request,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 ConnectToApplication(nullptr, request.Pass(), std::string(), GURL(), 543 ConnectToApplication(nullptr, request.Pass(), std::string(), GURL(),
542 GetProxy(&services), nullptr, 544 GetProxy(&services), nullptr,
543 GetPermissiveCapabilityFilter(), base::Closure()); 545 GetPermissiveCapabilityFilter(), base::Closure());
544 MessagePipe pipe; 546 MessagePipe pipe;
545 services->ConnectToService(interface_name, pipe.handle1.Pass()); 547 services->ConnectToService(interface_name, pipe.handle1.Pass());
546 return pipe.handle0.Pass(); 548 return pipe.handle0.Pass();
547 } 549 }
548 550
549 } // namespace shell 551 } // namespace shell
550 } // namespace mojo 552 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/linux_sandbox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698