Chromium Code Reviews| Index: impl/memory/info.go |
| diff --git a/impl/memory/info.go b/impl/memory/info.go |
| index a52d02ab5d7c82ecc33949f173150deb1b2c6427..4f8fb8b43aef0a1fba518ad290ebbeedbddc4bac 100644 |
| --- a/impl/memory/info.go |
| +++ b/impl/memory/info.go |
| @@ -26,19 +26,14 @@ func curGID(c context.Context) *globalInfoData { |
| // useGI adds a gae.GlobalInfo context, accessible |
| // by gae.GetGI(c) |
| -func useGI(c context.Context) context.Context { |
| +func useGI(c context.Context, appID string) context.Context { |
| return info.SetFactory(c, func(ic context.Context) info.Interface { |
| return &giImpl{dummy.Info(), curGID(ic), ic} |
| }) |
| } |
| -// globalAppID is the 'AppID' of everythin returned from this memory |
| -// implementation (DSKeys, GlobalInfo, etc.). There's no way to modify this |
| -// value through the API, and there are a couple bits of code where it's hard to |
| -// route this value through to without making the internal APIs really complex. |
| -const globalAppID = "dev~app" |
|
iannucci
2015/09/29 04:43:27
routed through the internal apis :)
|
| - |
| type globalInfoData struct { |
| + appid string |
| namespace string |
| } |
| @@ -58,15 +53,15 @@ func (gi *giImpl) Namespace(ns string) (ret context.Context, err error) { |
| if !validNamespace.MatchString(ns) { |
| return nil, fmt.Errorf("appengine: namespace %q does not match /%s/", ns, validNamespace) |
| } |
| - return context.WithValue(gi.c, giContextKey, &globalInfoData{ns}), nil |
| + return context.WithValue(gi.c, giContextKey, &globalInfoData{gi.appid, ns}), nil |
| } |
| func (gi *giImpl) AppID() string { |
| - return globalAppID |
| + return gi.appid |
| } |
| func (gi *giImpl) FullyQualifiedAppID() string { |
| - return globalAppID |
| + return gi.appid |
| } |
| func (gi *giImpl) IsDevAppServer() bool { |