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

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

Issue 10750017: Extensions Docs Server: Intro data source (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
OLDNEW
1 # Copyright (c) 2012 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 SUBVERSION_URL = 'http://src.chromium.org/viewvc/chrome' 5 SUBVERSION_URL = 'http://src.chromium.org/chrome'
not at google - send to devlin 2012/07/10 01:00:20 seems unrelated :P
6 TRUNK_URL = SUBVERSION_URL + '/trunk' 6 TRUNK_URL = SUBVERSION_URL + '/trunk'
7 BRANCH_URL = SUBVERSION_URL + '/branches' 7 BRANCH_URL = SUBVERSION_URL + '/branches'
8 8
9 class SubversionFetcher(object): 9 class SubversionFetcher(object):
10 """Class to fetch resources from src.chromium.org. 10 """Class to fetch resources from src.chromium.org.
11 """ 11 """
12 def __init__(self, branch, base_path, url_fetcher): 12 def __init__(self, branch, base_path, url_fetcher):
13 self._base_path = self._GetURLFromBranch(branch) + '/' + base_path 13 self._base_path = self._GetURLFromBranch(branch) + '/' + base_path
14 self._url_fetcher = url_fetcher 14 self._url_fetcher = url_fetcher
15 15
16 def _GetURLFromBranch(self, branch): 16 def _GetURLFromBranch(self, branch):
17 if branch == 'trunk': 17 if branch == 'trunk':
18 return TRUNK_URL + '/src' 18 return TRUNK_URL + '/src'
19 return BRANCH_URL + '/' + branch + '/src' 19 return BRANCH_URL + '/' + branch + '/src'
20 20
21 def FetchResource(self, path): 21 def FetchResource(self, path):
22 return self._url_fetcher.fetch(self._base_path + '/' + path) 22 return self._url_fetcher.fetch(self._base_path + '/' + path)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698