| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto3"; | 5 syntax = "proto2"; |
| 6 option optimize_for = LITE_RUNTIME; | 6 option optimize_for = LITE_RUNTIME; |
| 7 | 7 |
| 8 package offline_pages.proto; | 8 package offline_pages.proto; |
| 9 | 9 |
| 10 import "any.proto"; | 10 import "any.proto"; |
| 11 | 11 |
| 12 enum Code { | 12 enum Code { |
| 13 OK = 0; | 13 OK = 0; |
| 14 UNKNOWN = 2; | 14 UNKNOWN = 2; |
| 15 NOT_FOUND = 5; | 15 NOT_FOUND = 5; |
| 16 FAILED_PRECONDITION = 9; | 16 FAILED_PRECONDITION = 9; |
| 17 } | 17 } |
| 18 | 18 |
| 19 message Status { | 19 message Status { |
| 20 // The status code. | 20 // The status code. |
| 21 int32 code = 1; | 21 optional int32 code = 1; |
| 22 | 22 |
| 23 // A developer-facing error message, which should be in English. | 23 // A developer-facing error message, which should be in English. |
| 24 string message = 2; | 24 optional string message = 2; |
| 25 | 25 |
| 26 // A list of messages that carry the error details. There will be a | 26 // A list of messages that carry the error details. There will be a |
| 27 // common set of message types for APIs to use. | 27 // common set of message types for APIs to use. |
| 28 repeated Any details = 3; | 28 repeated Any details = 3; |
| 29 } | 29 } |
| OLD | NEW |