| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 InitHostZoomMap(); | 373 InitHostZoomMap(); |
| 374 | 374 |
| 375 // Make sure we initialize the ProfileIOData after everything else has been | 375 // Make sure we initialize the ProfileIOData after everything else has been |
| 376 // initialized that we might be reading from the IO thread. | 376 // initialized that we might be reading from the IO thread. |
| 377 | 377 |
| 378 io_data_.Init(cookie_path, server_bound_cert_path, cache_path, | 378 io_data_.Init(cookie_path, server_bound_cert_path, cache_path, |
| 379 cache_max_size, media_cache_path, media_cache_max_size, | 379 cache_max_size, media_cache_path, media_cache_max_size, |
| 380 extensions_cookie_path, app_path, predictor_, | 380 extensions_cookie_path, app_path, predictor_, |
| 381 g_browser_process->local_state(), | 381 g_browser_process->local_state(), |
| 382 g_browser_process->io_thread(), | 382 g_browser_process->io_thread(), |
| 383 restore_old_session_cookies); | 383 restore_old_session_cookies, |
| 384 GetSpecialStoragePolicy()); |
| 384 | 385 |
| 385 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( | 386 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
| 386 PluginPrefs::GetForProfile(this), | 387 PluginPrefs::GetForProfile(this), |
| 387 io_data_.GetResourceContextNoInit()); | 388 io_data_.GetResourceContextNoInit()); |
| 388 | 389 |
| 389 // Delay README creation to not impact startup performance. | 390 // Delay README creation to not impact startup performance. |
| 390 BrowserThread::PostDelayedTask( | 391 BrowserThread::PostDelayedTask( |
| 391 BrowserThread::FILE, FROM_HERE, | 392 BrowserThread::FILE, FROM_HERE, |
| 392 base::Bind(&EnsureReadmeFile, GetPath()), | 393 base::Bind(&EnsureReadmeFile, GetPath()), |
| 393 base::TimeDelta::FromMilliseconds(create_readme_delay_ms)); | 394 base::TimeDelta::FromMilliseconds(create_readme_delay_ms)); |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 if (!path.empty()) | 1114 if (!path.empty()) |
| 1114 *cache_path = path; | 1115 *cache_path = path; |
| 1115 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1116 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1116 prefs_->GetInteger(prefs::kDiskCacheSize); | 1117 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1117 } | 1118 } |
| 1118 | 1119 |
| 1119 base::Callback<ChromeURLDataManagerBackend*(void)> | 1120 base::Callback<ChromeURLDataManagerBackend*(void)> |
| 1120 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1121 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
| 1121 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1122 return io_data_.GetChromeURLDataManagerBackendGetter(); |
| 1122 } | 1123 } |
| OLD | NEW |