| Index: mojo/public/tools/bindings/generators/mojom_go_generator.py
|
| diff --git a/mojo/public/tools/bindings/generators/mojom_go_generator.py b/mojo/public/tools/bindings/generators/mojom_go_generator.py
|
| index 709bcc63021f56a760456e6ecd685cb958143aac..b6f6074dca5afce11f0fd8ce66eca9e72d52ad85 100644
|
| --- a/mojo/public/tools/bindings/generators/mojom_go_generator.py
|
| +++ b/mojo/public/tools/bindings/generators/mojom_go_generator.py
|
| @@ -307,8 +307,9 @@ def AddImport(imports, mojom_imports, module, element):
|
| imports[path] = name
|
| mojom_imports[path] = name
|
|
|
| -def GetIdentifier(kind):
|
| - """Use the kind's module to determine the package and name."""
|
| +# Get the mojom type's identifier suffix.
|
| +def GetMojomTypeIdentifier(kind):
|
| + """Get the mojom type's unique identifier from the kind's package and name."""
|
| # Note: InterfaceRequest's should use the Interface inside them.
|
| if hasattr(kind, 'module'):
|
| package = GetPackageName(kind.module)
|
| @@ -319,13 +320,7 @@ def GetIdentifier(kind):
|
| else:
|
| # These kinds (e.g., simple kinds, maps, and arrays) lack identifiers.
|
| raise Exception('Unexpected kind: %s' % kind)
|
| -
|
| - return '%s_%s' % (package, name)
|
| -
|
| -# Get the mojom type's identifier suffix.
|
| -def GetMojomTypeIdentifier(kind):
|
| - # Since this should be unique, it is based on the type's identifier.
|
| - return "%s__" % GetIdentifier(kind)
|
| + return "%s_%s__" % (package, name)
|
|
|
| class Generator(generator.Generator):
|
| go_filters = {
|
| @@ -336,7 +331,6 @@ class Generator(generator.Generator):
|
| 'go_type': GetGoType,
|
| 'expression_to_text': ExpressionToText,
|
| 'has_response': lambda method: method.response_parameters is not None,
|
| - 'identifier': GetIdentifier,
|
| 'is_array': mojom.IsArrayKind,
|
| 'is_enum': mojom.IsEnumKind,
|
| 'is_handle': mojom.IsAnyHandleKind,
|
|
|