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

Side by Side Diff: chrome/common/extensions/docs/server2/update_cache.py

Issue 2412863005: Make some code gender neutral. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import cPickle 5 import cPickle
6 import copy 6 import copy
7 import getopt 7 import getopt
8 import json 8 import json
9 import logging 9 import logging
10 import os.path 10 import os.path
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 finally: 103 finally:
104 logging.info('Updating %s took %s' % (name, timer.Stop().FormatElapsed())) 104 logging.info('Updating %s took %s' % (name, timer.Stop().FormatElapsed()))
105 105
106 106
107 def UpdateCache(single_data_source=None, commit=None): 107 def UpdateCache(single_data_source=None, commit=None):
108 '''Attempts to populate the datastore with a bunch of information derived from 108 '''Attempts to populate the datastore with a bunch of information derived from
109 a given commit. 109 a given commit.
110 ''' 110 '''
111 server_instance = _CreateServerInstance(commit) 111 server_instance = _CreateServerInstance(commit)
112 112
113 # This is the guy that would be responsible for refreshing the cache of 113 # This is the thing that would be responsible for refreshing the cache of
114 # examples. Here for posterity, hopefully it will be added to the targets 114 # examples. Here for posterity, hopefully it will be added to the targets
115 # below someday. 115 # below someday.
116 # render_refresher = RenderRefresher(server_instance, self._request) 116 # render_refresher = RenderRefresher(server_instance, self._request)
117 117
118 data_sources = CreateDataSources(server_instance) 118 data_sources = CreateDataSources(server_instance)
119 data_sources['content_providers'] = server_instance.content_providers 119 data_sources['content_providers'] = server_instance.content_providers
120 data_sources['platform_bundle'] = server_instance.platform_bundle 120 data_sources['platform_bundle'] = server_instance.platform_bundle
121 if single_data_source: 121 if single_data_source:
122 _UpdateDataSource(single_data_source, data_sources[single_data_source]) 122 _UpdateDataSource(single_data_source, data_sources[single_data_source])
123 else: 123 else:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 _FlushMemcache() 197 _FlushMemcache()
198 if save_file: 198 if save_file:
199 PersistentObjectStoreFake.SaveToFile(save_file) 199 PersistentObjectStoreFake.SaveToFile(save_file)
200 200
201 logging.info('Update completed in %s' % timer.Stop().FormatElapsed()) 201 logging.info('Update completed in %s' % timer.Stop().FormatElapsed())
202 202
203 203
204 if __name__ == '__main__': 204 if __name__ == '__main__':
205 _Main(sys.argv[1:]) 205 _Main(sys.argv[1:])
206 206
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/platform_keys.idl ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698