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 traceback | 5 import traceback |
6 import warnings | 6 import warnings |
7 | 7 |
8 | 8 |
9 # Location where chrome reads command line flags from | 9 # Location where chrome reads command line flags from |
10 CHROME_COMMAND_FILE = '/data/local/chrome-command-line' | 10 CHROME_COMMAND_FILE = '/data/local/tmp/chrome-command-line' |
11 | 11 |
12 class FlagChanger(object): | 12 class FlagChanger(object): |
13 """Changes the flags Chrome runs with. | 13 """Changes the flags Chrome runs with. |
14 | 14 |
15 There are two different use cases for this file: | 15 There are two different use cases for this file: |
16 * Flags are permanently set by calling Set(). | 16 * Flags are permanently set by calling Set(). |
17 * Flags can be temporarily set for a particular set of unit tests. These | 17 * Flags can be temporarily set for a particular set of unit tests. These |
18 tests should call Restore() to revert the flags to their original state | 18 tests should call Restore() to revert the flags to their original state |
19 once the tests have completed. | 19 once the tests have completed. |
20 """ | 20 """ |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 # Tack on the last flag. | 135 # Tack on the last flag. |
136 if not current_flag: | 136 if not current_flag: |
137 if within_quotations: | 137 if within_quotations: |
138 warnings.warn("Unterminated quoted string: " + current_flag) | 138 warnings.warn("Unterminated quoted string: " + current_flag) |
139 else: | 139 else: |
140 tokenized_flags.append(current_flag) | 140 tokenized_flags.append(current_flag) |
141 | 141 |
142 # Return everything but the program name. | 142 # Return everything but the program name. |
143 return tokenized_flags[1:] | 143 return tokenized_flags[1:] |
OLD | NEW |