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

Side by Side Diff: perf/server/perf.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 unified diff | Download patch
« no previous file with comments | « perf/server/data.go ('k') | perf/server/setup/continue_install » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found 2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file. 3 // in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "database/sql" 8 "database/sql"
9 "flag" 9 "flag"
10 "fmt" 10 "fmt"
(...skipping 17 matching lines...) Expand all
28 // indexTemplate is the main index.html page we serve. 28 // indexTemplate is the main index.html page we serve.
29 indexTemplate *template.Template = nil 29 indexTemplate *template.Template = nil
30 30
31 // db is the database, nil if we don't have an SQL database to store dat a into. 31 // db is the database, nil if we don't have an SQL database to store dat a into.
32 db *sql.DB = nil 32 db *sql.DB = nil
33 ) 33 )
34 34
35 // flags 35 // flags
36 var ( 36 var (
37 port = flag.String("port", ":8000", "HTTP service address (e.g., ' :8000')") 37 port = flag.String("port", ":8000", "HTTP service address (e.g., ' :8000')")
38 » doOauth = flag.Bool("oauth", true, "Run through the OAuth 2.0 flow on startup.") 38 » doOauth = flag.Bool("oauth", true, "Run through the OAuth 2.0 flow on startup, otherwise use a GCE service account.")
39 gitRepoDir = flag.String("git_repo_dir", "../../../skia", "Directory loc ation for the Skia repo.") 39 gitRepoDir = flag.String("git_repo_dir", "../../../skia", "Directory loc ation for the Skia repo.")
40 ) 40 )
41 41
42 var ( 42 var (
43 data *Data 43 data *Data
44 ) 44 )
45 45
46 func init() { 46 func init() {
47 rand.Seed(time.Now().UnixNano()) 47 rand.Seed(time.Now().UnixNano())
48 48
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // Resources are served directly. 139 // Resources are served directly.
140 http.Handle("/res/", autogzip.Handle(http.FileServer(http.Dir("./")))) 140 http.Handle("/res/", autogzip.Handle(http.FileServer(http.Dir("./"))))
141 141
142 http.HandleFunc("/", autogzip.HandleFunc(mainHandler)) 142 http.HandleFunc("/", autogzip.HandleFunc(mainHandler))
143 http.HandleFunc("/json/", autogzip.HandleFunc(jsonHandler)) 143 http.HandleFunc("/json/", autogzip.HandleFunc(jsonHandler))
144 144
145 log.Println("Ready to serve.") 145 log.Println("Ready to serve.")
146 log.Fatal(http.ListenAndServe(*port, nil)) 146 log.Fatal(http.ListenAndServe(*port, nil))
147 } 147 }
OLDNEW
« no previous file with comments | « perf/server/data.go ('k') | perf/server/setup/continue_install » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698