| Index: tools/android/loading/sandwich_utils.py
|
| diff --git a/tools/android/loading/sandwich_utils.py b/tools/android/loading/sandwich_utils.py
|
| index bbc2d9d198c7b98e6bb20fc80c8c7fa3bb9ab20a..406034d1d59f1cda549664b1e26995163d376f06 100644
|
| --- a/tools/android/loading/sandwich_utils.py
|
| +++ b/tools/android/loading/sandwich_utils.py
|
| @@ -2,12 +2,26 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +import re
|
| +import urlparse
|
| +
|
| import common_util
|
| import emulation
|
| import sandwich_runner
|
| import task_manager
|
|
|
|
|
| +class SandwichKnownError(Exception):
|
| + pass
|
| +
|
| +
|
| +def NormalizeUrl(url):
|
| + """Returns normalized URL with trailing slashes."""
|
| + parsed_url = list(urlparse.urlparse(url))
|
| + parsed_url[2] = re.sub(r"/{2,}", r"/", parsed_url[2])
|
| + return urlparse.urlunparse(parsed_url)
|
| +
|
| +
|
| def NetworkSimulationTransformer(network_condition):
|
| """Creates a function that accepts a SandwichRunner as a parameter and sets
|
| network emulation options on it.
|
|
|