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

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

Issue 10828042: Extensions Docs Server: Integration testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for CQ 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_memcache.py
diff --git a/chrome/common/extensions/docs/server2/appengine_memcache.py b/chrome/common/extensions/docs/server2/appengine_memcache.py
index c75193e80867b211a760400b67ceffe3aa226213..d42ff194f08271d1764298798e1fa4c1f7e3c6ef 100644
--- a/chrome/common/extensions/docs/server2/appengine_memcache.py
+++ b/chrome/common/extensions/docs/server2/appengine_memcache.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from appengine_wrappers import memcache
+
MEMCACHE_FILE_SYSTEM_READ = 'MemcacheFileSystem.Get'
MEMCACHE_FILE_SYSTEM_STAT = 'MemcacheFileSystem.Stat'
MEMCACHE_BRANCH_UTILITY = 'BranchUtility'
@@ -11,18 +13,17 @@ class AppEngineMemcache(object):
use. Uses a branch to make sure there are no key collisions if separate
branches cache the same file.
"""
- def __init__(self, branch, memcache):
+ def __init__(self, branch):
self._branch = branch
- self._memcache = memcache
def Set(self, key, value, namespace, time=60):
- return self._memcache.set(key,
- value,
- namespace=self._branch + '.' + namespace,
- time=time)
+ return memcache.set(key,
+ value,
+ namespace=self._branch + '.' + namespace,
+ time=time)
def Get(self, key, namespace):
- return self._memcache.get(key, namespace=self._branch + '.' + namespace)
+ return memcache.get(key, namespace=self._branch + '.' + namespace)
def Delete(self, key, namespace):
- return self._memcache.delete(key, namespace=self._branch + '.' + namespace)
+ return memcache.delete(key, namespace=self._branch + '.' + namespace)

Powered by Google App Engine
This is Rietveld 408576698