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

Unified Diff: mojo/devtools/common/devtoolslib/shell_arguments.py

Issue 1411503011: devtools: drop Shell.serve_local_directory(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/devtools/common/devtoolslib/shell.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/devtoolslib/shell_arguments.py
diff --git a/mojo/devtools/common/devtoolslib/shell_arguments.py b/mojo/devtools/common/devtoolslib/shell_arguments.py
index 9df58b39dcac2e82d6a792ef5f6a1b3441cf37e8..65e6d3cb2356cc9f8bfef27434c6539176183516 100644
--- a/mojo/devtools/common/devtoolslib/shell_arguments.py
+++ b/mojo/devtools/common/devtoolslib/shell_arguments.py
@@ -36,7 +36,8 @@ def _host_local_url_destination(shell, dest_file, port, free_host_port):
if not os.path.exists(directory):
raise ValueError('local path passed as --map-url destination '
'does not exist')
- server_url = shell.serve_local_directory(directory, port, free_host_port)
+ mappings = [('', [directory])]
+ server_url = shell.serve_local_directories(mappings, port, free_host_port)
return server_url + os.path.relpath(dest_file, directory)
@@ -46,7 +47,8 @@ def _host_local_origin_destination(shell, dest_dir, port, free_host_port):
Returns:
Url of the hosted directory.
"""
- return shell.serve_local_directory(dest_dir, port, free_host_port)
+ mappings = [('', [dest_dir])]
+ return shell.serve_local_directories(mappings, port, free_host_port)
def _rewrite(mapping, host_destination_functon, shell, port, free_host_port):
@@ -118,8 +120,8 @@ def configure_local_origin(shell, local_dir, port, free_host_port):
Returns:
The list of arguments to be appended to the shell argument list.
"""
-
- origin_url = shell.serve_local_directory(local_dir, port, free_host_port)
+ mappings = [('', [local_dir])]
+ origin_url = shell.serve_local_directories(mappings, port, free_host_port)
return ["--origin=" + origin_url]
« no previous file with comments | « mojo/devtools/common/devtoolslib/shell.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698