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

Side by Side Diff: mojo/public/cpp/bindings/lib/validation_errors.cc

Issue 611633002: mojom: Add associative arrays to the mojom language. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved test classes to their own shared file. Created 6 years, 2 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 | « mojo/public/cpp/bindings/lib/validation_errors.h ('k') | mojo/public/cpp/bindings/map.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "mojo/public/cpp/bindings/lib/validation_errors.h" 5 #include "mojo/public/cpp/bindings/lib/validation_errors.h"
6 6
7 #include "mojo/public/cpp/environment/logging.h" 7 #include "mojo/public/cpp/environment/logging.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace internal { 10 namespace internal {
(...skipping 22 matching lines...) Expand all
33 case VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE: 33 case VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE:
34 return "VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE"; 34 return "VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE";
35 case VALIDATION_ERROR_ILLEGAL_POINTER: 35 case VALIDATION_ERROR_ILLEGAL_POINTER:
36 return "VALIDATION_ERROR_ILLEGAL_POINTER"; 36 return "VALIDATION_ERROR_ILLEGAL_POINTER";
37 case VALIDATION_ERROR_UNEXPECTED_NULL_POINTER: 37 case VALIDATION_ERROR_UNEXPECTED_NULL_POINTER:
38 return "VALIDATION_ERROR_UNEXPECTED_NULL_POINTER"; 38 return "VALIDATION_ERROR_UNEXPECTED_NULL_POINTER";
39 case VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAG_COMBINATION: 39 case VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAG_COMBINATION:
40 return "VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAG_COMBINATION"; 40 return "VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAG_COMBINATION";
41 case VALIDATION_ERROR_MESSAGE_HEADER_MISSING_REQUEST_ID: 41 case VALIDATION_ERROR_MESSAGE_HEADER_MISSING_REQUEST_ID:
42 return "VALIDATION_ERROR_MESSAGE_HEADER_MISSING_REQUEST_ID"; 42 return "VALIDATION_ERROR_MESSAGE_HEADER_MISSING_REQUEST_ID";
43 case VALIDATION_ERROR_DIFFERENT_SIZED_ARRAYS_IN_MAP:
44 return "VALIDATION_ERROR_DIFFERENT_SIZED_ARRAYS_IN_MAP";
43 } 45 }
44 46
45 return "Unknown error"; 47 return "Unknown error";
46 } 48 }
47 49
48 void ReportValidationError(ValidationError error, const char* description) { 50 void ReportValidationError(ValidationError error, const char* description) {
49 if (g_validation_error_observer) { 51 if (g_validation_error_observer) {
50 g_validation_error_observer->set_last_error(error); 52 g_validation_error_observer->set_last_error(error);
51 } else if (description) { 53 } else if (description) {
52 MOJO_LOG(ERROR) << "Invalid message: " << ValidationErrorToString(error) 54 MOJO_LOG(ERROR) << "Invalid message: " << ValidationErrorToString(error)
(...skipping 30 matching lines...) Expand all
83 } 85 }
84 86
85 SerializationWarningObserverForTesting:: 87 SerializationWarningObserverForTesting::
86 ~SerializationWarningObserverForTesting() { 88 ~SerializationWarningObserverForTesting() {
87 MOJO_DCHECK(g_serialization_warning_observer == this); 89 MOJO_DCHECK(g_serialization_warning_observer == this);
88 g_serialization_warning_observer = nullptr; 90 g_serialization_warning_observer = nullptr;
89 } 91 }
90 92
91 } // namespace internal 93 } // namespace internal
92 } // namespace mojo 94 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/validation_errors.h ('k') | mojo/public/cpp/bindings/map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698