OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 import logging | 5 import logging |
6 | 6 |
7 from pylib.device import device_errors | 7 from devil.android import device_errors |
8 | 8 |
9 | 9 |
10 class FlagChanger(object): | 10 class FlagChanger(object): |
11 """Changes the flags Chrome runs with. | 11 """Changes the flags Chrome runs with. |
12 | 12 |
13 There are two different use cases for this file: | 13 There are two different use cases for this file: |
14 * Flags are permanently set by calling Set(). | 14 * Flags are permanently set by calling Set(). |
15 * Flags can be temporarily set for a particular set of unit tests. These | 15 * Flags can be temporarily set for a particular set of unit tests. These |
16 tests should call Restore() to revert the flags to their original state | 16 tests should call Restore() to revert the flags to their original state |
17 once the tests have completed. | 17 once the tests have completed. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 # Tack on the last flag. | 152 # Tack on the last flag. |
153 if not current_flag: | 153 if not current_flag: |
154 if within_quotations: | 154 if within_quotations: |
155 logging.warn('Unterminated quoted argument: ' + line) | 155 logging.warn('Unterminated quoted argument: ' + line) |
156 else: | 156 else: |
157 tokenized_flags.append(current_flag) | 157 tokenized_flags.append(current_flag) |
158 | 158 |
159 # Return everything but the program name. | 159 # Return everything but the program name. |
160 return tokenized_flags[1:] | 160 return tokenized_flags[1:] |
OLD | NEW |