Chromium Code Reviews| Index: components/arc/instance_holder.h |
| diff --git a/components/arc/instance_holder.h b/components/arc/instance_holder.h |
| index 4918cd2d5616cce7790630b621b2d960f8d9ee06..8b57b75d75234b7126390019086d4561c3da81dc 100644 |
| --- a/components/arc/instance_holder.h |
| +++ b/components/arc/instance_holder.h |
| @@ -14,12 +14,13 @@ |
| #include "base/observer_list.h" |
| #include "base/threading/thread_checker.h" |
| -// A convenience macro to call arc::InstanceHolder<T>::GetInstanceForVersion(). |
| +// A convenience macro to call |
|
Luis Héctor Chávez
2017/01/09 18:41:02
This is now not a convenience macro, but the only
Yusuke Sato
2017/01/09 19:10:31
Done.
|
| +// arc::InstanceHolder<T>::GetInstanceForVersionDoNotCallDirectly(). |
| // In order to avoid exposing method names from within the Mojo bindings, we |
| // will rely on stringification and the fact that the method min versions have a |
| // consistent naming scheme. |
| #define ARC_GET_INSTANCE_FOR_METHOD(holder, method_name) \ |
| - (holder)->GetInstanceForVersion( \ |
| + (holder)->GetInstanceForVersionDoNotCallDirectly( \ |
| std::remove_pointer<decltype( \ |
| holder)>::type::Instance::k##method_name##MinVersion, \ |
| #method_name) |
| @@ -60,8 +61,9 @@ class InstanceHolder { |
| // not have the requested version, and logs appropriately. |
| // This function should not be called directly. Instead, use the |
| // ARC_GET_INSTANCE_FOR_METHOD() macro. |
| - T* GetInstanceForVersion(uint32_t min_version, |
| - const char method_name_for_logging[]) { |
| + T* GetInstanceForVersionDoNotCallDirectly( |
| + uint32_t min_version, |
| + const char method_name_for_logging[]) { |
| if (!instance_) { |
| VLOG(1) << "Instance for " << T::Name_ << "::" << method_name_for_logging |
| << " not available."; |