| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package serialization | 5 package serialization |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "compress/gzip" | 9 "compress/gzip" |
| 10 "encoding/base64" | 10 "encoding/base64" |
| 11 "fmt" | 11 "fmt" |
| 12 "mojo/public/go/bindings" | 12 "mojo/public/go/bindings" |
| 13 » "mojom/mojom_tool/generated/mojom_files" | 13 » "mojom/generated/mojom_files" |
| 14 » "mojom/mojom_tool/generated/mojom_types" | 14 » "mojom/generated/mojom_types" |
| 15 "mojom/mojom_tool/mojom" | 15 "mojom/mojom_tool/mojom" |
| 16 myfmt "third_party/golang/src/fmt" | 16 myfmt "third_party/golang/src/fmt" |
| 17 ) | 17 ) |
| 18 | 18 |
| 19 ////////////////////////////////////////////////// | 19 ////////////////////////////////////////////////// |
| 20 /// Mojom Descriptor Serialization | 20 /// Mojom Descriptor Serialization |
| 21 ////////////////////////////////////////////////// | 21 ////////////////////////////////////////////////// |
| 22 | 22 |
| 23 // This variable may be set to false in order to omit emitting line and | 23 // This variable may be set to false in order to omit emitting line and |
| 24 // column numbers. This is useful in tests. | 24 // column numbers. This is useful in tests. |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 | 722 |
| 723 // stringPointer is a convenience function for creating a pointer to a string wh
ose value | 723 // stringPointer is a convenience function for creating a pointer to a string wh
ose value |
| 724 // is the specified string. It may be used in situations where the compiler will | 724 // is the specified string. It may be used in situations where the compiler will |
| 725 // not allow you to take the address of a string value directly, such as the | 725 // not allow you to take the address of a string value directly, such as the |
| 726 // return value of a function. It is necessary to create pointers to strings bec
ause | 726 // return value of a function. It is necessary to create pointers to strings bec
ause |
| 727 // that is how the Mojom type |string?| (i.e. nullable string) is represented in | 727 // that is how the Mojom type |string?| (i.e. nullable string) is represented in |
| 728 // in the Mojom Go bindings. | 728 // in the Mojom Go bindings. |
| 729 func stringPointer(s string) *string { | 729 func stringPointer(s string) *string { |
| 730 return &s | 730 return &s |
| 731 } | 731 } |
| OLD | NEW |