OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/profiles/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 using base::Time; | 144 using base::Time; |
145 using base::TimeDelta; | 145 using base::TimeDelta; |
146 using base::UserMetricsAction; | 146 using base::UserMetricsAction; |
147 using content::BrowserThread; | 147 using content::BrowserThread; |
148 using content::DownloadManagerDelegate; | 148 using content::DownloadManagerDelegate; |
149 using content::HostZoomMap; | 149 using content::HostZoomMap; |
150 | 150 |
151 namespace { | 151 namespace { |
152 | 152 |
153 // Constrict us to a very specific platform and architecture to make sure | |
154 // ifdefs don't cause problems with the check. | |
155 #if defined(OS_LINUX) && defined(TOOLKIT_GTK) && defined(ARCH_CPU_X86_64) && \ | |
156 !defined(_GLIBCXX_DEBUG) | |
157 // Make sure that the ProfileImpl doesn't grow. We're currently trying to drive | |
158 // the number of services that are included in ProfileImpl (instead of using | |
159 // BrowserContextKeyedServiceFactory) to zero. | |
160 // | |
161 // If you don't know about this effort, please read: | |
162 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/pro
file-architecture | |
163 // | |
164 // REVIEWERS: Do not let anyone increment this. We need to drive the number of | |
165 // raw accessed services down to zero. DO NOT LET PEOPLE REGRESS THIS UNLESS | |
166 // THE PATCH ITSELF IS MAKING PROGRESS ON PKSF REFACTORING. | |
167 COMPILE_ASSERT(sizeof(ProfileImpl) <= 744u, profile_impl_size_unexpected); | |
168 #endif | |
169 | |
170 #if defined(ENABLE_SESSION_SERVICE) | 153 #if defined(ENABLE_SESSION_SERVICE) |
171 // Delay, in milliseconds, before we explicitly create the SessionService. | 154 // Delay, in milliseconds, before we explicitly create the SessionService. |
172 static const int kCreateSessionServiceDelayMS = 500; | 155 static const int kCreateSessionServiceDelayMS = 500; |
173 #endif | 156 #endif |
174 | 157 |
175 // Text content of README file created in each profile directory. Both %s | 158 // Text content of README file created in each profile directory. Both %s |
176 // placeholders must contain the product name. This is not localizable and hence | 159 // placeholders must contain the product name. This is not localizable and hence |
177 // not in resources. | 160 // not in resources. |
178 static const char kReadmeText[] = | 161 static const char kReadmeText[] = |
179 "%s settings and storage represent user-selected preferences and " | 162 "%s settings and storage represent user-selected preferences and " |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1305 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
1323 #if defined(OS_CHROMEOS) | 1306 #if defined(OS_CHROMEOS) |
1324 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1307 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
1325 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1308 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
1326 g_browser_process->local_state()); | 1309 g_browser_process->local_state()); |
1327 } | 1310 } |
1328 #endif // defined(OS_CHROMEOS) | 1311 #endif // defined(OS_CHROMEOS) |
1329 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1312 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
1330 GetPrefs(), g_browser_process->local_state()); | 1313 GetPrefs(), g_browser_process->local_state()); |
1331 } | 1314 } |
OLD | NEW |