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

Side by Side Diff: web/inc/logdog-stream/logdog-error.html

Issue 2335223003: LogDog: Update web code, stream/query with auth. (Closed)
Patch Set: Fix background page loading. 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!--
2 Copyright 2016 The LUCI Authors. All rights reserved.
3 Use of this source code is governed under the Apache License, Version 2.0
4 that can be found in the LICENSE file.
5 -->
6
7 <link rel="import" href="../rpc/rpc-error.html">
8
9 <script>
10 "use strict";
11
12 function LogDogError(base) {
13 this.base = base;
14 };
15 LogDogError.wrapGrpc = function(err) {
16 if (err instanceof luci.rpc.GrpcError) {
17 return new LogDogError(err);
18 }
19 return err;
20 }
21
22 LogDogError.prototype = Object.create(Error.prototype);
23 LogDogError.prototype.isGrpcError = function() {
24 return (this.base.name === "GrpcError");
25 };
26 LogDogError.prototype.isNotFound = function() {
27 return (this.isGrpcError() && this.base.code === 5);
28 };
29 LogDogError.prototype.isPermissionDenied = function() {
30 return (this.isGrpcError() && this.base.code === 7);
31 };
32 </script>
OLDNEW
« no previous file with comments | « web/inc/logdog-stream-view/logdog-stream-view.html ('k') | web/inc/logdog-stream/logdog-stream.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698