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

Side by Side Diff: build/android/flag_changer.py

Issue 8667008: Fix python scripts in src/build/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698