Chromium Code Reviews| 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" |
|
mtklein
2014/06/16 20:25:11
Am I thinking using a service account is roughly l
jcgregorio
2014/06/16 20:33:47
There's a service account associated with the clou
|
| "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 { |