| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 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 | 4 |
| 5 from collections import defaultdict | 5 from collections import defaultdict |
| 6 import posixpath | 6 import posixpath |
| 7 | 7 |
| 8 from future import Future | 8 from future import Future |
| 9 from path_util import SplitParent | 9 from path_util import SplitParent |
| 10 from special_paths import SITE_VERIFICATION_FILE | 10 from special_paths import SITE_VERIFICATION_FILE |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 # which may matter. | 107 # which may matter. |
| 108 max_prefix = potential_paths[0] | 108 max_prefix = potential_paths[0] |
| 109 max_prefix_length = len(_CommonNormalizedPrefix(max_prefix, path)) | 109 max_prefix_length = len(_CommonNormalizedPrefix(max_prefix, path)) |
| 110 for path_for_file in potential_paths[1:]: | 110 for path_for_file in potential_paths[1:]: |
| 111 prefix_length = len(_CommonNormalizedPrefix(path_for_file, path)) | 111 prefix_length = len(_CommonNormalizedPrefix(path_for_file, path)) |
| 112 if prefix_length > max_prefix_length: | 112 if prefix_length > max_prefix_length: |
| 113 max_prefix, max_prefix_length = path_for_file, prefix_length | 113 max_prefix, max_prefix_length = path_for_file, prefix_length |
| 114 | 114 |
| 115 return max_prefix | 115 return max_prefix |
| 116 | 116 |
| 117 def Cron(self): | 117 def Refresh(self): |
| 118 return self._LoadCache() | 118 return self._LoadCache() |
| OLD | NEW |