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

Unified Diff: mojo/shell/dynamic_service_loader.cc

Issue 305013015: Mojo: (Mostly) factor out command-line switches from the shell's load code path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « mojo/shell/desktop/mojo_main.cc ('k') | mojo/shell/run.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/dynamic_service_loader.cc
diff --git a/mojo/shell/dynamic_service_loader.cc b/mojo/shell/dynamic_service_loader.cc
index a54edd65eef6f0e17ef3568f8b180278a739e6cd..b249c3cff31c70769160eac16d71ace46df80426 100644
--- a/mojo/shell/dynamic_service_loader.cc
+++ b/mojo/shell/dynamic_service_loader.cc
@@ -4,11 +4,9 @@
#include "mojo/shell/dynamic_service_loader.h"
-#include "base/command_line.h"
#include "base/location.h"
#include "mojo/shell/context.h"
#include "mojo/shell/keep_alive.h"
-#include "mojo/shell/switches.h"
namespace mojo {
namespace shell {
@@ -44,11 +42,8 @@ class DynamicServiceLoader::LoadContext : public mojo::shell::Loader::Delegate {
GURL url_to_load;
if (url.SchemeIs("mojo")) {
- std::string origin =
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kOrigin);
std::string lib = MakeSharedLibraryName(url.ExtractFileName());
- url_to_load = GURL(origin + "/" + lib);
+ url_to_load = GURL(loader->context_->mojo_origin() + "/" + lib);
} else {
url_to_load = url;
}
« no previous file with comments | « mojo/shell/desktop/mojo_main.cc ('k') | mojo/shell/run.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698