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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 infinite_cache_path.Append(FILE_PATH_LITERAL("Infinite Cache")); | 606 infinite_cache_path.Append(FILE_PATH_LITERAL("Infinite Cache")); |
607 | 607 |
608 #if defined(OS_ANDROID) | 608 #if defined(OS_ANDROID) |
609 SessionStartupPref::Type startup_pref_type = | 609 SessionStartupPref::Type startup_pref_type = |
610 SessionStartupPref::GetDefaultStartupType(); | 610 SessionStartupPref::GetDefaultStartupType(); |
611 #else | 611 #else |
612 SessionStartupPref::Type startup_pref_type = | 612 SessionStartupPref::Type startup_pref_type = |
613 StartupBrowserCreator::GetSessionStartupPref( | 613 StartupBrowserCreator::GetSessionStartupPref( |
614 *CommandLine::ForCurrentProcess(), this).type; | 614 *CommandLine::ForCurrentProcess(), this).type; |
615 #endif | 615 #endif |
616 bool restore_old_session_cookies = | 616 content::CookieStoreConfig::SessionCookieMode session_cookie_mode = |
617 (GetLastSessionExitType() == Profile::EXIT_CRASHED || | 617 content::CookieStoreConfig::PERSISTANT_SESSION_COOKIES; |
618 startup_pref_type == SessionStartupPref::LAST); | 618 if (GetLastSessionExitType() == Profile::EXIT_CRASHED || |
| 619 startup_pref_type == SessionStartupPref::LAST) { |
| 620 session_cookie_mode = content::CookieStoreConfig::RESTORED_SESSION_COOKIES; |
| 621 } |
619 | 622 |
620 InitHostZoomMap(); | 623 InitHostZoomMap(); |
621 | 624 |
622 // Make sure we initialize the ProfileIOData after everything else has been | 625 // Make sure we initialize the ProfileIOData after everything else has been |
623 // initialized that we might be reading from the IO thread. | 626 // initialized that we might be reading from the IO thread. |
624 | 627 |
625 io_data_.Init(cookie_path, server_bound_cert_path, cache_path, | 628 io_data_.Init(cookie_path, server_bound_cert_path, cache_path, |
626 cache_max_size, media_cache_path, media_cache_max_size, | 629 cache_max_size, media_cache_path, media_cache_max_size, |
627 extensions_cookie_path, GetPath(), infinite_cache_path, | 630 extensions_cookie_path, GetPath(), infinite_cache_path, |
628 predictor_, | 631 predictor_, |
629 restore_old_session_cookies, | 632 session_cookie_mode, |
630 GetSpecialStoragePolicy()); | 633 GetSpecialStoragePolicy()); |
631 | 634 |
632 #if defined(ENABLE_PLUGINS) | 635 #if defined(ENABLE_PLUGINS) |
633 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( | 636 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
634 PluginPrefs::GetForProfile(this).get(), | 637 PluginPrefs::GetForProfile(this).get(), |
635 io_data_.GetResourceContextNoInit()); | 638 io_data_.GetResourceContextNoInit()); |
636 #endif | 639 #endif |
637 | 640 |
638 // Delay README creation to not impact startup performance. | 641 // Delay README creation to not impact startup performance. |
639 BrowserThread::PostDelayedTask( | 642 BrowserThread::PostDelayedTask( |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1324 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
1322 #if defined(OS_CHROMEOS) | 1325 #if defined(OS_CHROMEOS) |
1323 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1326 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
1324 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1327 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
1325 g_browser_process->local_state()); | 1328 g_browser_process->local_state()); |
1326 } | 1329 } |
1327 #endif // defined(OS_CHROMEOS) | 1330 #endif // defined(OS_CHROMEOS) |
1328 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1331 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
1329 GetPrefs(), g_browser_process->local_state()); | 1332 GetPrefs(), g_browser_process->local_state()); |
1330 } | 1333 } |
OLD | NEW |