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

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

Issue 1276163002: Revert of Sandbox html_viewer on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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;
388 386
389 fetcher->AsPath(blocking_pool_, 387 fetcher->AsPath(blocking_pool_,
390 base::Bind(&ApplicationManager::RunNativeApplication, 388 base::Bind(&ApplicationManager::RunNativeApplication,
391 weak_ptr_factory_.GetWeakPtr(), 389 weak_ptr_factory_.GetWeakPtr(),
392 base::Passed(request.Pass()), start_sandboxed, 390 base::Passed(request.Pass()), start_sandboxed,
393 options, cleanup, base::Passed(fetcher.Pass()))); 391 options, cleanup, base::Passed(fetcher.Pass())));
394 } 392 }
395 393
396 void ApplicationManager::RunNativeApplication( 394 void ApplicationManager::RunNativeApplication(
397 InterfaceRequest<Application> application_request, 395 InterfaceRequest<Application> application_request,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 ConnectToApplication(nullptr, request.Pass(), std::string(), GURL(), 541 ConnectToApplication(nullptr, request.Pass(), std::string(), GURL(),
544 GetProxy(&services), nullptr, 542 GetProxy(&services), nullptr,
545 GetPermissiveCapabilityFilter(), base::Closure()); 543 GetPermissiveCapabilityFilter(), base::Closure());
546 MessagePipe pipe; 544 MessagePipe pipe;
547 services->ConnectToService(interface_name, pipe.handle1.Pass()); 545 services->ConnectToService(interface_name, pipe.handle1.Pass());
548 return pipe.handle0.Pass(); 546 return pipe.handle0.Pass();
549 } 547 }
550 548
551 } // namespace shell 549 } // namespace shell
552 } // namespace mojo 550 } // 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