I was trying to follow the
C++ dos and don'ts on nested classes in this
CL of mine to create a new data struct to group some metrics specific data. But it seems that's not the way things have been done so far in Chromium.
As its usage is private to NavigatorImpl I didn't think creating a new pair of .H/.CC files was the way to go. As it is a new member I had to change navigator_impl.h to forward declare the type and declare the new private member so I am unable to limit the change to the .CC file (as an un-nested class in an anonymous namespace).
I also could not follow the above mentioned guide strictly and had to use a scoped_ptr to hold the instance because creating it as a non-pointer would demand its definition to be moved to the .H as well (field has incomplete type).
So what's the general opinion on using nested classes? It seems both
style guides accept it but it's just not the usual choice. Any suggestions on what could I do that would stand closer to what's been done so far?
Thanks,
Carlos.