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

Unified Diff: impl/memory/user.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Created 4 years, 4 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: impl/memory/user.go
diff --git a/impl/memory/user.go b/impl/memory/user.go
index 53fbd0b3aa74a653cb68da68a60cb4d636aa1718..1a3382b708eddc6366e82fa230f2b8329862670b 100644
--- a/impl/memory/user.go
+++ b/impl/memory/user.go
@@ -28,14 +28,14 @@ type userImpl struct {
data *userData
}
-var _ user.Interface = (*userImpl)(nil)
+var _ user.RawInterface = (*userImpl)(nil)
-// useUser adds a user.Interface implementation to context, accessible
-// by user.Get(c)
+// useUser adds a user.RawInterface implementation to context, accessible
+// by user.Raw(c) or the exported user methods.
func useUser(c context.Context) context.Context {
data := &userData{}
- return user.SetFactory(c, func(ic context.Context) user.Interface {
+ return user.SetFactory(c, func(ic context.Context) user.RawInterface {
return &userImpl{data}
})
}
@@ -83,9 +83,7 @@ func (u *userImpl) OAuthConsumerKey() (string, error) {
return "", fmt.Errorf("OAuthConsumerKey is deprecated")
}
-func (u *userImpl) Testable() user.Testable {
- return u
-}
+func (u *userImpl) GetTestable() user.Testable { return u }
func (u *userImpl) SetUser(user *user.User) {
u.data.Lock()

Powered by Google App Engine
This is Rietveld 408576698