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

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

Issue 10566028: Fix build/android/run_tests.sh (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 months 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
« no previous file with comments | « no previous file | build/android/test_package_executable.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 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 5
6 # Location where chrome reads command line flags from 6 # Location where chrome reads command line flags from
7 CHROME_COMMAND_FILE = '/data/local/chrome-command-line' 7 CHROME_COMMAND_FILE = '/data/local/tmp/chrome-command-line'
8 8
9 9
10 class FlagChanger(object): 10 class FlagChanger(object):
11 """Temporarily changes the flags Chrome runs with.""" 11 """Temporarily changes the flags Chrome runs with."""
12 12
13 def __init__(self, android_cmd): 13 def __init__(self, android_cmd):
14 self._android_cmd = android_cmd 14 self._android_cmd = android_cmd
15 self._old_flags = None 15 self._old_flags = None
16 16
17 def Set(self, flags, append=False): 17 def Set(self, flags, append=False):
(...skipping 22 matching lines...) Expand all
40 'chrome ' + ' '.join(flags)) 40 'chrome ' + ' '.join(flags))
41 41
42 def Restore(self): 42 def Restore(self):
43 """Restores the flags to their original state.""" 43 """Restores the flags to their original state."""
44 if self._old_flags == None: 44 if self._old_flags == None:
45 return # Set() was never called. 45 return # Set() was never called.
46 elif self._old_flags: 46 elif self._old_flags:
47 self._android_cmd.SetFileContents(CHROME_COMMAND_FILE, self._old_flags) 47 self._android_cmd.SetFileContents(CHROME_COMMAND_FILE, self._old_flags)
48 else: 48 else:
49 self._android_cmd.RunShellCommand('rm ' + CHROME_COMMAND_FILE) 49 self._android_cmd.RunShellCommand('rm ' + CHROME_COMMAND_FILE)
OLDNEW
« no previous file with comments | « no previous file | build/android/test_package_executable.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698