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

Unified Diff: go/src/infra/gae/libs/wrapper/gae/globalinfo.go

Issue 1143053004: Simplify memory package interface. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: switch to blasters 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/src/infra/gae/libs/wrapper/gae/datastore.go ('k') | go/src/infra/gae/libs/wrapper/gae/memcache.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/gae/libs/wrapper/gae/globalinfo.go
diff --git a/go/src/infra/gae/libs/wrapper/gae/globalinfo.go b/go/src/infra/gae/libs/wrapper/gae/globalinfo.go
index 7bc50e99d47c4948a317d6f584bebe36949e0830..c4988e0976ed7ec23ff5b2bb515b97d70318a17d 100644
--- a/go/src/infra/gae/libs/wrapper/gae/globalinfo.go
+++ b/go/src/infra/gae/libs/wrapper/gae/globalinfo.go
@@ -14,9 +14,9 @@ import (
"infra/gae/libs/wrapper"
)
-// UseGI adds a wrapper.GlobalInfo implementation to context, accessible
+// useGI adds a wrapper.GlobalInfo implementation to context, accessible
// by wrapper.GetGI(c)
-func UseGI(c context.Context) context.Context {
+func useGI(c context.Context) context.Context {
return wrapper.SetGIFactory(c, func(ci context.Context) wrapper.GlobalInfo {
return giImpl{ctx(c).Context, ci}
})
@@ -65,7 +65,7 @@ func (g giImpl) Namespace(namespace string) (context.Context, error) {
if err != nil {
return nil, err
}
- return Enable(g.ctx, gaeC), nil
+ return context.WithValue(g.ctx, goonContextKey, gaeC), nil
}
func (g giImpl) PublicCertificates() ([]appengine.Certificate, error) {
return appengine.PublicCertificates(g)
« no previous file with comments | « go/src/infra/gae/libs/wrapper/gae/datastore.go ('k') | go/src/infra/gae/libs/wrapper/gae/memcache.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698