| OLD | NEW |
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 g_serialization_warning_observer = this; | 79 g_serialization_warning_observer = this; |
| 80 } | 80 } |
| 81 | 81 |
| 82 SerializationWarningObserverForTesting:: | 82 SerializationWarningObserverForTesting:: |
| 83 ~SerializationWarningObserverForTesting() { | 83 ~SerializationWarningObserverForTesting() { |
| 84 MOJO_DCHECK(g_serialization_warning_observer == this); | 84 MOJO_DCHECK(g_serialization_warning_observer == this); |
| 85 g_serialization_warning_observer = NULL; | 85 g_serialization_warning_observer = NULL; |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool IsNonNullableValidationEnabled() { | 88 bool IsNonNullableValidationEnabled() { |
| 89 return g_validation_error_observer || g_serialization_warning_observer; | 89 // TODO(yzshen): Remove this function and all call sites. |
| 90 return true; |
| 90 } | 91 } |
| 91 | 92 |
| 92 } // namespace internal | 93 } // namespace internal |
| 93 } // namespace mojo | 94 } // namespace mojo |
| OLD | NEW |