| OLD | NEW | 
|---|
| 1 #!/usr/bin/python |  | 
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 3 # 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 | 
| 4 # found in the LICENSE file. | 3 # found in the LICENSE file. | 
| 5 | 4 | 
| 6 | 5 | 
| 7 # Location where chrome reads command line flags from | 6 # Location where chrome reads command line flags from | 
| 8 CHROME_COMMAND_FILE = '/data/local/chrome-command-line' | 7 CHROME_COMMAND_FILE = '/data/local/chrome-command-line' | 
| 9 | 8 | 
| 10 | 9 | 
| 11 class FlagChanger(object): | 10 class FlagChanger(object): | 
| (...skipping 29 matching lines...) Expand all  Loading... | 
| 41                                         'chrome ' + ' '.join(flags)) | 40                                         'chrome ' + ' '.join(flags)) | 
| 42 | 41 | 
| 43   def Restore(self): | 42   def Restore(self): | 
| 44     """Restores the flags to their original state.""" | 43     """Restores the flags to their original state.""" | 
| 45     if self._old_flags == None: | 44     if self._old_flags == None: | 
| 46       return  # Set() was never called. | 45       return  # Set() was never called. | 
| 47     elif self._old_flags: | 46     elif self._old_flags: | 
| 48       self._android_cmd.SetFileContents(CHROME_COMMAND_FILE, self._old_flags) | 47       self._android_cmd.SetFileContents(CHROME_COMMAND_FILE, self._old_flags) | 
| 49     else: | 48     else: | 
| 50       self._android_cmd.RunShellCommand('rm ' + CHROME_COMMAND_FILE) | 49       self._android_cmd.RunShellCommand('rm ' + CHROME_COMMAND_FILE) | 
| OLD | NEW | 
|---|