 Chromium Code Reviews
 Chromium Code Reviews Issue 9111035:
  Profiles: Add a size check to ProfileImpl to make sure it no longer grows.  (Closed) 
  Base URL: http://git.chromium.org/chromium/src.git@master
    
  
    Issue 9111035:
  Profiles: Add a size check to ProfileImpl to make sure it no longer grows.  (Closed) 
  Base URL: http://git.chromium.org/chromium/src.git@master| Index: chrome/browser/profiles/profile_impl.cc | 
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc | 
| index cdef23c94bb42390a98b6e3f6b8d2928c1b787bb..011a514c74caac54467ba49bd055ef7fda41b135 100644 | 
| --- a/chrome/browser/profiles/profile_impl.cc | 
| +++ b/chrome/browser/profiles/profile_impl.cc | 
| @@ -149,6 +149,22 @@ using content::UserMetricsAction; | 
| namespace { | 
| +// Constrict us to a very specific platform and architecture to make sure | 
| +// ifdefs don't cause problems with the check. | 
| +#if defined(OS_LINUX) && defined(TOOLKIT_GTK) && defined(ARCH_CPU_X86_64) | 
| +// Make sure that the ProfileImpl doesn't grow. We're currently trying to drive | 
| +// the number of services that are included in ProfileImpl (instead of using | 
| +// ProfileKeyedServiceFactory) to zero. | 
| +// | 
| +// If you don't know about this effort, please read: | 
| +// https://sites.google.com/a/chromium.org/dev/developers/design-documents/profile-architecture | 
| +// | 
| +// REVIEWERS: Do not let anyone increment this. We need to drive the number of | 
| +// raw accessed services down to zero. DO NOT LET PEOPLE REGRESS THIS UNLESS | 
| +// THE PATCH ITSELF IS MAKING PROGRESS ON PKSF REFACTORING. | 
| +COMPILE_ASSERT(sizeof(ProfileImpl) == 656u, profile_impl_size_unexpected); | 
| 
Miranda Callahan
2012/01/06 15:34:57
Should we instead assert sizeof(ProfileImpl) <= 65
 
Elliot Glaysher
2012/01/06 18:23:58
I'm not crazy about this, but I changed it.
Using
 | 
| +#endif | 
| + | 
| // Delay, in milliseconds, before we explicitly create the SessionService. | 
| static const int kCreateSessionServiceDelayMS = 500; |