| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 using base::TimeDelta; | 114 using base::TimeDelta; |
| 115 using content::BrowserThread; | 115 using content::BrowserThread; |
| 116 using content::DownloadManagerDelegate; | 116 using content::DownloadManagerDelegate; |
| 117 using content::HostZoomMap; | 117 using content::HostZoomMap; |
| 118 using content::UserMetricsAction; | 118 using content::UserMetricsAction; |
| 119 | 119 |
| 120 namespace { | 120 namespace { |
| 121 | 121 |
| 122 // Constrict us to a very specific platform and architecture to make sure | 122 // Constrict us to a very specific platform and architecture to make sure |
| 123 // ifdefs don't cause problems with the check. | 123 // ifdefs don't cause problems with the check. |
| 124 #if defined(OS_LINUX) && defined(TOOLKIT_GTK) && defined(ARCH_CPU_X86_64) | 124 #if defined(OS_LINUX) && defined(TOOLKIT_GTK) && defined(ARCH_CPU_X86_64) && \ |
| 125 !defined(_GLIBCXX_DEBUG) |
| 125 // Make sure that the ProfileImpl doesn't grow. We're currently trying to drive | 126 // Make sure that the ProfileImpl doesn't grow. We're currently trying to drive |
| 126 // the number of services that are included in ProfileImpl (instead of using | 127 // the number of services that are included in ProfileImpl (instead of using |
| 127 // ProfileKeyedServiceFactory) to zero. | 128 // ProfileKeyedServiceFactory) to zero. |
| 128 // | 129 // |
| 129 // If you don't know about this effort, please read: | 130 // If you don't know about this effort, please read: |
| 130 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/pro
file-architecture | 131 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/pro
file-architecture |
| 131 // | 132 // |
| 132 // REVIEWERS: Do not let anyone increment this. We need to drive the number of | 133 // REVIEWERS: Do not let anyone increment this. We need to drive the number of |
| 133 // raw accessed services down to zero. DO NOT LET PEOPLE REGRESS THIS UNLESS | 134 // raw accessed services down to zero. DO NOT LET PEOPLE REGRESS THIS UNLESS |
| 134 // THE PATCH ITSELF IS MAKING PROGRESS ON PKSF REFACTORING. | 135 // THE PATCH ITSELF IS MAKING PROGRESS ON PKSF REFACTORING. |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 if (!path.empty()) | 1167 if (!path.empty()) |
| 1167 *cache_path = path; | 1168 *cache_path = path; |
| 1168 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1169 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1169 prefs_->GetInteger(prefs::kDiskCacheSize); | 1170 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1170 } | 1171 } |
| 1171 | 1172 |
| 1172 base::Callback<ChromeURLDataManagerBackend*(void)> | 1173 base::Callback<ChromeURLDataManagerBackend*(void)> |
| 1173 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1174 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
| 1174 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1175 return io_data_.GetChromeURLDataManagerBackendGetter(); |
| 1175 } | 1176 } |
| OLD | NEW |