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

Unified Diff: impl/memory/context.go

Issue 1871943003: Add Info Testable interface, implement for memory. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Fall through in filter. Created 4 years, 8 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 | « impl/dummy/dummy.go ('k') | impl/memory/info.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/context.go
diff --git a/impl/memory/context.go b/impl/memory/context.go
index 3efaec2f6c6a7b2b197464bdc3e168ef7f542499..4fc2eb200877f6fc21c05a00940f1f5dbdfea016 100644
--- a/impl/memory/context.go
+++ b/impl/memory/context.go
@@ -122,8 +122,10 @@ func UseWithAppID(c context.Context, aid string) context.Context {
memctx := newMemContext(aid)
c = context.WithValue(c, memContextKey, memctx)
c = context.WithValue(c, memContextNoTxnKey, memctx)
- c = context.WithValue(c, giContextKey, &globalInfoData{appid: aid})
- return useMod(useMail(useUser(useTQ(useRDS(useMC(useGI(c, aid)))))))
+ c = useGID(c, func(mod *globalInfoData) {
+ mod.appid = aid
+ })
+ return useMod(useMail(useUser(useTQ(useRDS(useMC(useGI(c)))))))
}
func cur(c context.Context) (p *memContext) {
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/info.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698