| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 FilePath extensions_cookie_path = GetPath(); | 373 FilePath extensions_cookie_path = GetPath(); |
| 374 extensions_cookie_path = | 374 extensions_cookie_path = |
| 375 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename); | 375 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename); |
| 376 | 376 |
| 377 FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname); | 377 FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname); |
| 378 | 378 |
| 379 bool restore_old_session_cookies = | 379 bool restore_old_session_cookies = |
| 380 session_restore_enabled_ && | 380 session_restore_enabled_ && |
| 381 (!DidLastSessionExitCleanly() || | 381 (!DidLastSessionExitCleanly() || |
| 382 CommandLine::ForCurrentProcess()->HasSwitch( | 382 CommandLine::ForCurrentProcess()->HasSwitch( |
| 383 switches::kRestoreLastSession)); | 383 switches::kRestoreLastSession) || |
| 384 local_state->GetBoolean(prefs::kWasRestarted)); |
| 384 | 385 |
| 385 // Make sure we initialize the ProfileIOData after everything else has been | 386 // Make sure we initialize the ProfileIOData after everything else has been |
| 386 // initialized that we might be reading from the IO thread. | 387 // initialized that we might be reading from the IO thread. |
| 387 | 388 |
| 388 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path, | 389 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path, |
| 389 cache_max_size, media_cache_path, media_cache_max_size, | 390 cache_max_size, media_cache_path, media_cache_max_size, |
| 390 extensions_cookie_path, app_path, predictor_, | 391 extensions_cookie_path, app_path, predictor_, |
| 391 g_browser_process->local_state(), | 392 g_browser_process->local_state(), |
| 392 g_browser_process->io_thread(), | 393 g_browser_process->io_thread(), |
| 393 restore_old_session_cookies); | 394 restore_old_session_cookies); |
| (...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 FilePath* cache_path, | 1650 FilePath* cache_path, |
| 1650 int* max_size) { | 1651 int* max_size) { |
| 1651 DCHECK(cache_path); | 1652 DCHECK(cache_path); |
| 1652 DCHECK(max_size); | 1653 DCHECK(max_size); |
| 1653 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1654 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
| 1654 if (!path.empty()) | 1655 if (!path.empty()) |
| 1655 *cache_path = path; | 1656 *cache_path = path; |
| 1656 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1657 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1657 prefs_->GetInteger(prefs::kDiskCacheSize); | 1658 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1658 } | 1659 } |
| OLD | NEW |