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

Unified Diff: impl/prod/mail.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Created 4 years, 3 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/prod/mail.go
diff --git a/impl/prod/mail.go b/impl/prod/mail.go
index aca5db63f3343ad67fc1efef681890d8b35434e8..6feeba0d98d386b1ed687fdced8ebb181970fbde 100644
--- a/impl/prod/mail.go
+++ b/impl/prod/mail.go
@@ -11,9 +11,10 @@ import (
)
// useMail adds a mail service implementation to context, accessible
-// by "github.com/luci/gae/service/mail".Get(c)
+// by "github.com/luci/gae/service/mail".Raw(c) or the exported mail service
+// methods.
func useMail(c context.Context) context.Context {
- return gae_mail.SetFactory(c, func(ci context.Context) gae_mail.Interface {
+ return gae_mail.SetFactory(c, func(ci context.Context) gae_mail.RawInterface {
return mailImpl{AEContext(ci)}
})
}
@@ -30,6 +31,4 @@ func (m mailImpl) SendToAdmins(msg *gae_mail.Message) error {
return mail.Send(m.aeCtx, msg.ToSDKMessage())
}
-func (m mailImpl) Testable() gae_mail.Testable {
- return nil
-}
+func (m mailImpl) GetTestable() gae_mail.Testable { return nil }

Powered by Google App Engine
This is Rietveld 408576698