Chromium Code Reviews| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 | 138 |
| 139 using base::Time; | 139 using base::Time; |
| 140 using base::TimeDelta; | 140 using base::TimeDelta; |
| 141 using base::UserMetricsAction; | 141 using base::UserMetricsAction; |
| 142 using content::BrowserThread; | 142 using content::BrowserThread; |
| 143 using content::DownloadManagerDelegate; | 143 using content::DownloadManagerDelegate; |
| 144 using content::HostZoomMap; | 144 using content::HostZoomMap; |
| 145 | 145 |
| 146 namespace { | 146 namespace { |
| 147 | 147 |
| 148 // Constrict us to a very specific platform and architecture to make sure | |
|
Lei Zhang
2014/06/10 05:12:31
Do we want to keep this and switch it to Aura?
| |
| 149 // ifdefs don't cause problems with the check. | |
| 150 #if defined(OS_LINUX) && defined(TOOLKIT_GTK) && defined(ARCH_CPU_X86_64) && \ | |
| 151 !defined(_GLIBCXX_DEBUG) | |
| 152 // Make sure that the ProfileImpl doesn't grow. We're currently trying to drive | |
| 153 // the number of services that are included in ProfileImpl (instead of using | |
| 154 // BrowserContextKeyedServiceFactory) to zero. | |
| 155 // | |
| 156 // If you don't know about this effort, please read: | |
| 157 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/pro file-architecture | |
| 158 // | |
| 159 // REVIEWERS: Do not let anyone increment this. We need to drive the number of | |
| 160 // raw accessed services down to zero. DO NOT LET PEOPLE REGRESS THIS UNLESS | |
| 161 // THE PATCH ITSELF IS MAKING PROGRESS ON PKSF REFACTORING. | |
| 162 COMPILE_ASSERT(sizeof(ProfileImpl) <= 744u, profile_impl_size_unexpected); | |
| 163 #endif | |
| 164 | |
| 165 #if defined(ENABLE_SESSION_SERVICE) | 148 #if defined(ENABLE_SESSION_SERVICE) |
| 166 // Delay, in milliseconds, before we explicitly create the SessionService. | 149 // Delay, in milliseconds, before we explicitly create the SessionService. |
| 167 static const int kCreateSessionServiceDelayMS = 500; | 150 static const int kCreateSessionServiceDelayMS = 500; |
| 168 #endif | 151 #endif |
| 169 | 152 |
| 170 // Text content of README file created in each profile directory. Both %s | 153 // Text content of README file created in each profile directory. Both %s |
| 171 // placeholders must contain the product name. This is not localizable and hence | 154 // placeholders must contain the product name. This is not localizable and hence |
| 172 // not in resources. | 155 // not in resources. |
| 173 static const char kReadmeText[] = | 156 static const char kReadmeText[] = |
| 174 "%s settings and storage represent user-selected preferences and " | 157 "%s settings and storage represent user-selected preferences and " |
| (...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1359 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1342 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
| 1360 #if defined(OS_CHROMEOS) | 1343 #if defined(OS_CHROMEOS) |
| 1361 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1344 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 1362 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1345 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 1363 g_browser_process->local_state()); | 1346 g_browser_process->local_state()); |
| 1364 } | 1347 } |
| 1365 #endif // defined(OS_CHROMEOS) | 1348 #endif // defined(OS_CHROMEOS) |
| 1366 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1349 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 1367 GetPrefs(), g_browser_process->local_state()); | 1350 GetPrefs(), g_browser_process->local_state()); |
| 1368 } | 1351 } |
| OLD | NEW |