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

Unified Diff: perf/server/data.go

Issue 335183002: Fixing install and OAuth (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: rebase Created 6 years, 6 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 | « no previous file | perf/server/perf.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: perf/server/data.go
diff --git a/perf/server/data.go b/perf/server/data.go
index eb419ec3396aa51dedd6684a43d35530b3b56117..7d2b3bcbb358f02adccec17ed94e77360175e056 100644
--- a/perf/server/data.go
+++ b/perf/server/data.go
@@ -17,6 +17,7 @@ import (
)
import (
+ "code.google.com/p/goauth2/compute/serviceaccount"
"code.google.com/p/goauth2/oauth"
"code.google.com/p/google-api-go-client/bigquery/v2"
"github.com/oxtoacart/webbrowser"
@@ -458,7 +459,10 @@ func NewData(doOauth bool, gitRepoDir string) (*Data, error) {
return nil, fmt.Errorf("Failed to auth: %s", err)
}
} else {
- client = http.DefaultClient
+ client, err = serviceaccount.NewClient(nil)
+ if err != nil {
+ return nil, fmt.Errorf("Failed to auth using a service account: %s", err)
+ }
}
service, err := bigquery.New(client)
if err != nil {
« no previous file with comments | « no previous file | perf/server/perf.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698