Chromium Code Reviews| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 369 int media_cache_max_size; | 369 int media_cache_max_size; |
| 370 GetCacheParameters(true, &media_cache_path, &media_cache_max_size); | 370 GetCacheParameters(true, &media_cache_path, &media_cache_max_size); |
| 371 media_cache_path = GetMediaCachePath(media_cache_path); | 371 media_cache_path = GetMediaCachePath(media_cache_path); |
| 372 | 372 |
| 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 PrefService* pref_service = g_browser_process->local_state(); | |
|
Miranda Callahan
2011/12/05 14:30:28
You actually already have this as a local variable
marja
2011/12/05 14:44:01
Done.
| |
| 379 bool restore_old_session_cookies = | 380 bool restore_old_session_cookies = |
| 380 session_restore_enabled_ && | 381 session_restore_enabled_ && |
| 381 (!DidLastSessionExitCleanly() || | 382 (!DidLastSessionExitCleanly() || |
| 382 CommandLine::ForCurrentProcess()->HasSwitch( | 383 CommandLine::ForCurrentProcess()->HasSwitch( |
| 383 switches::kRestoreLastSession)); | 384 switches::kRestoreLastSession) || |
| 385 pref_service->GetBoolean(prefs::kWasRestarted)); | |
|
Miranda Callahan
2011/12/05 14:30:28
after removing the above declaration:
local_State
marja
2011/12/05 14:44:01
Done.
| |
| 384 | 386 |
| 385 // Make sure we initialize the ProfileIOData after everything else has been | 387 // Make sure we initialize the ProfileIOData after everything else has been |
| 386 // initialized that we might be reading from the IO thread. | 388 // initialized that we might be reading from the IO thread. |
| 387 | 389 |
| 388 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path, | 390 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path, |
| 389 cache_max_size, media_cache_path, media_cache_max_size, | 391 cache_max_size, media_cache_path, media_cache_max_size, |
| 390 extensions_cookie_path, app_path, predictor_, | 392 extensions_cookie_path, app_path, predictor_, |
| 391 g_browser_process->local_state(), | 393 g_browser_process->local_state(), |
| 392 g_browser_process->io_thread(), | 394 g_browser_process->io_thread(), |
| 393 restore_old_session_cookies); | 395 restore_old_session_cookies); |
| (...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1649 FilePath* cache_path, | 1651 FilePath* cache_path, |
| 1650 int* max_size) { | 1652 int* max_size) { |
| 1651 DCHECK(cache_path); | 1653 DCHECK(cache_path); |
| 1652 DCHECK(max_size); | 1654 DCHECK(max_size); |
| 1653 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1655 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
| 1654 if (!path.empty()) | 1656 if (!path.empty()) |
| 1655 *cache_path = path; | 1657 *cache_path = path; |
| 1656 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1658 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1657 prefs_->GetInteger(prefs::kDiskCacheSize); | 1659 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1658 } | 1660 } |
| OLD | NEW |