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

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

Issue 10704252: Extensions Docs Server: Internal file system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests 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
Index: chrome/common/extensions/docs/server2/appengine_url_fetcher.py
diff --git a/chrome/common/extensions/docs/server2/appengine_url_fetcher.py b/chrome/common/extensions/docs/server2/appengine_url_fetcher.py
new file mode 100644
index 0000000000000000000000000000000000000000..c4c05e80ea6b66fe9c45b5bb2932e17031b983be
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/appengine_url_fetcher.py
@@ -0,0 +1,18 @@
+# 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
+
+class AppEngineUrlFetcher(object):
not at google - send to devlin 2012/07/18 10:39:15 documentation
cduvall 2012/07/18 21:26:10 Done.
+ def __init__(self, base_path):
+ self._base_path = base_path
+
+ def fetch(self, url):
not at google - send to devlin 2012/07/18 10:39:15 These should all be Google-style, like Fetch.
cduvall 2012/07/18 21:26:10 Done.
+ return urlfetch.fetch(self._base_path + '/' + url)
+
+ def create_rpc(self):
+ return urlfetch.create_rpc()
+
+ def make_fetch_call(self, rpc, path):
not at google - send to devlin 2012/07/18 10:39:15 This *is* the appengine API, I know; but it could
cduvall 2012/07/18 21:26:10 Done.
+ return urlfetch.make_fetch_call(rpc, self._base_path + '/' + path)

Powered by Google App Engine
This is Rietveld 408576698