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

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

Issue 1222903002: Refactor current GAE abstraction library to be free of the SDK* (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: fixes Created 5 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: go/src/infra/gae/libs/gae/memory/globalinfo.go
diff --git a/go/src/infra/gae/libs/wrapper/memory/globalinfo.go b/go/src/infra/gae/libs/gae/memory/globalinfo.go
similarity index 70%
rename from go/src/infra/gae/libs/wrapper/memory/globalinfo.go
rename to go/src/infra/gae/libs/gae/memory/globalinfo.go
index 397e9def6820e15582ff895a313e3b2004469e06..0232c68ca71d613bae4b70bbec832b55363d1d94 100644
--- a/go/src/infra/gae/libs/wrapper/memory/globalinfo.go
+++ b/go/src/infra/gae/libs/gae/memory/globalinfo.go
@@ -5,9 +5,9 @@
package memory
import (
- "infra/gae/libs/wrapper"
-
"golang.org/x/net/context"
+
+ "infra/gae/libs/gae"
)
type giContextKeyType int
@@ -18,23 +18,23 @@ func curGID(c context.Context) *globalInfoData {
return c.Value(giContextKey).(*globalInfoData)
}
-// useGI adds a wrapper.GlobalInfo context, accessible
-// by wrapper.GetGI(c)
+// useGI adds a gae.GlobalInfo context, accessible
+// by gae.GetGI(c)
func useGI(c context.Context) context.Context {
- return wrapper.SetGIFactory(c, func(ic context.Context) wrapper.GlobalInfo {
- return &giImpl{wrapper.DummyGI(), curGID(ic), ic}
+ return gae.SetGIFactory(c, func(ic context.Context) gae.GlobalInfo {
+ return &giImpl{gae.DummyGI(), curGID(ic), ic}
})
}
type globalInfoData struct{ namespace string }
type giImpl struct {
- wrapper.GlobalInfo
+ gae.GlobalInfo
data *globalInfoData
c context.Context
}
-var _ = wrapper.GlobalInfo((*giImpl)(nil))
+var _ = gae.GlobalInfo((*giImpl)(nil))
func (gi *giImpl) Namespace(ns string) (context.Context, error) {
return context.WithValue(gi.c, giContextKey, &globalInfoData{ns}), nil

Powered by Google App Engine
This is Rietveld 408576698