Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1808)

Unified Diff: chrome/browser/profiles/profile_impl.cc

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
Patch Set: comments from mirandac Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..969000ab66e65282c19c30f6dddee740c9e82248 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);
+#endif
+
// Delay, in milliseconds, before we explicitly create the SessionService.
static const int kCreateSessionServiceDelayMS = 500;
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698