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

Unified Diff: chrome/common/extensions/docs/server2/urlfetch.py

Issue 10704252: Extensions Docs Server: Internal file system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed up 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/docs/server2/test_urlfetch.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/urlfetch.py
diff --git a/chrome/common/extensions/docs/server2/urlfetch.py b/chrome/common/extensions/docs/server2/urlfetch.py
deleted file mode 100644
index a95803632ceb65d8ad62f13be18d3e68c04183ff..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/docs/server2/urlfetch.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from google.appengine.api import urlfetch
-from google.appengine.api import memcache
-
-DEFAULT_CACHE_TIME = 300
-
-class _FetchException(Exception):
- """Thrown when status code is not 200.
- """
- def __init__(self, url):
- Exception.__init__(self, 'Fetch exception from ' + url)
-
-def fetch(url):
- result = memcache.get(url, namespace=__name__)
- if result is not None:
- return result
-
- result = urlfetch.fetch(url)
- if result.status_code != 200:
- raise _FetchException(url)
-
- memcache.add(url, result, DEFAULT_CACHE_TIME, namespace=__name__)
- return result
« no previous file with comments | « chrome/common/extensions/docs/server2/test_urlfetch.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698