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

Side by Side Diff: gae/config.py

Issue 1150463002: [chrome-devtools-frontend] Migrate to cloudstorage client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chrome-devtools-frontend
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « gae/cloudstorage/test_utils.py ('k') | gae/content_type.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) 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 4
5 import os 5 import os
6 6
7 IS_DEV_APP_SERVER = os.environ['SERVER_SOFTWARE'].startswith('Development') 7 IS_DEV_APP_SERVER = os.environ['SERVER_SOFTWARE'].startswith('Development')
8 8
9 DEFAULT = { 9 DEFAULT = {
10 'bucket': '/gs/chrome-devtools-frontend/%s', 10 'bucket': '/chrome-devtools-frontend/%s',
11 'hash_path': 'hash/%s', 11 'hash_path': 'hash/%s',
12 'max_age': 7 * 24 * 60 * 60, # in seconds 12 'max_age': 7 * 24 * 60 * 60, # in seconds
13 'meta_path': 'meta/%s', 13 'meta_path': 'meta/%s',
14 'revision_path': 'revs/%s', 14 'revision_path': 'revs/%s',
15 'version_path': 'vers/%s', 15 'version_path': 'vers/%s',
16 'zip_path': 'zips/%s.zip', 16 'zip_path': 'zips/%s.zip',
17 } 17 }
18 18
19 class ConfigHelper: 19 class ConfigHelper:
20 def __init__(self, conf): 20 def __init__(self, conf):
(...skipping 12 matching lines...) Expand all
33 return self.conf['max_age'] 33 return self.conf['max_age']
34 34
35 def get_revision_path(self, rev): 35 def get_revision_path(self, rev):
36 return self.conf['revision_path'] % rev 36 return self.conf['revision_path'] % rev
37 37
38 def get_version_path(self, ver): 38 def get_version_path(self, ver):
39 return self.conf['version_path'] % ver 39 return self.conf['version_path'] % ver
40 40
41 def get_zip_path(self, name): 41 def get_zip_path(self, name):
42 return self.conf['zip_path'] % name 42 return self.conf['zip_path'] % name
OLDNEW
« no previous file with comments | « gae/cloudstorage/test_utils.py ('k') | gae/content_type.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698