| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import optparse | 4 import optparse |
| 5 import re | 5 import re |
| 6 | 6 |
| 7 class PageFilter(object): | 7 class PageFilter(object): |
| 8 """Filters pages in the page set based on command line flags.""" | 8 """Filters pages in the page set based on command line flags.""" |
| 9 | 9 |
| 10 def __init__(self, options): | 10 def __init__(self, options): |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 return True | 32 return True |
| 33 | 33 |
| 34 @staticmethod | 34 @staticmethod |
| 35 def AddCommandLineOptions(parser): | 35 def AddCommandLineOptions(parser): |
| 36 group = optparse.OptionGroup(parser, 'Page filtering options') | 36 group = optparse.OptionGroup(parser, 'Page filtering options') |
| 37 group.add_option('--page-filter', dest='page_filter', | 37 group.add_option('--page-filter', dest='page_filter', |
| 38 help='Use only pages whose URLs match the given filter regexp.') | 38 help='Use only pages whose URLs match the given filter regexp.') |
| 39 group.add_option('--page-filter-exclude', dest='page_filter_exclude', | 39 group.add_option('--page-filter-exclude', dest='page_filter_exclude', |
| 40 help='Exclude pages whose URLs match the given filter regexp.') | 40 help='Exclude pages whose URLs match the given filter regexp.') |
| 41 parser.add_option_group(group) | 41 parser.add_option_group(group) |
| OLD | NEW |