Eliminate multiple inheritance style guide violation for IOSChromeSyncedTabDelegate |
|||||
Issue descriptionMultiple inheritance is prohibited by the style guide unless only one superclass has an implementation. All other superclasses must be pure interfaces with an "Interface" suffix: https://google.github.io/styleguide/cppguide.html#Multiple_Inheritance
,
Mar 13 2017
,
Mar 14 2017
[Bulk Edit] I'm not sure those bugs are worth fixing. First our observer classes are interface-ish classes (they are not named XXXInterface because it make much more sense to name them XXXObserver) and if they have implementation for their method they are empty (i.e. you never have to call the super class implementation in the derived class). So those inheritance are not cases of implementation inheritance. Second, those classes (e.g. WebFaviconDriver) are designed to mimic their chrome/ counterpart (e.g. ContentFaviconDriver) and removing the multiple inheritance from the ios/chrome/ implementation would need to be done in sync with removing the inheritance from the chrome/ class too. Finally some of the bugs are incorrect as the classes inheritance correspond to what is allowed by the style guide (e.g. IOSChromeSyncedTabDelegate inherits from sync_sessions::SyncedTabDelegate and web::WebStateUserData<IOSChromeSyncedTabDelegate> where sync_sessions::SyncedTabDelegate is a pure interface).
,
Mar 14 2017
+1 to all of this. In general, Chromium broadly does not adhere to this style rule (and in particular the "Interface" name -- think of how many implementation classes are subclasses of multiple Observer interfaces, for example). Avoiding multiple implementation inheritance is always a good thing, of course, and if we find any blatant violations of that it would be good to fix them if possible. But fixing all cases by rote seems unwise.
,
Mar 17 2017
kkhorimoto@ - feel free to close/re-assign once it is decided if we are okay with the current code or not.
,
May 10 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by kkhorimoto@chromium.org
, Mar 13 2017