| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepAliveForTest)) | 553 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepAliveForTest)) |
| 554 init_background_mode_manager = false; | 554 init_background_mode_manager = false; |
| 555 #endif | 555 #endif |
| 556 if (init_background_mode_manager) { | 556 if (init_background_mode_manager) { |
| 557 if (g_browser_process->background_mode_manager()) | 557 if (g_browser_process->background_mode_manager()) |
| 558 g_browser_process->background_mode_manager()->RegisterProfile(this); | 558 g_browser_process->background_mode_manager()->RegisterProfile(this); |
| 559 } | 559 } |
| 560 | 560 |
| 561 base::FilePath cookie_path = GetPath(); | 561 base::FilePath cookie_path = GetPath(); |
| 562 cookie_path = cookie_path.Append(chrome::kCookieFilename); | 562 cookie_path = cookie_path.Append(chrome::kCookieFilename); |
| 563 base::FilePath server_bound_cert_path = GetPath(); | 563 base::FilePath channel_id_path = GetPath(); |
| 564 server_bound_cert_path = | 564 channel_id_path = channel_id_path.Append(chrome::kChannelIDFilename); |
| 565 server_bound_cert_path.Append(chrome::kOBCertFilename); | |
| 566 base::FilePath cache_path = base_cache_path_; | 565 base::FilePath cache_path = base_cache_path_; |
| 567 int cache_max_size; | 566 int cache_max_size; |
| 568 GetCacheParameters(false, &cache_path, &cache_max_size); | 567 GetCacheParameters(false, &cache_path, &cache_max_size); |
| 569 cache_path = GetCachePath(cache_path); | 568 cache_path = GetCachePath(cache_path); |
| 570 | 569 |
| 571 base::FilePath media_cache_path = base_cache_path_; | 570 base::FilePath media_cache_path = base_cache_path_; |
| 572 int media_cache_max_size; | 571 int media_cache_max_size; |
| 573 GetCacheParameters(true, &media_cache_path, &media_cache_max_size); | 572 GetCacheParameters(true, &media_cache_path, &media_cache_max_size); |
| 574 media_cache_path = GetMediaCachePath(media_cache_path); | 573 media_cache_path = GetMediaCachePath(media_cache_path); |
| 575 | 574 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 594 if (GetLastSessionExitType() == Profile::EXIT_CRASHED || | 593 if (GetLastSessionExitType() == Profile::EXIT_CRASHED || |
| 595 startup_pref_type == SessionStartupPref::LAST) { | 594 startup_pref_type == SessionStartupPref::LAST) { |
| 596 session_cookie_mode = content::CookieStoreConfig::RESTORED_SESSION_COOKIES; | 595 session_cookie_mode = content::CookieStoreConfig::RESTORED_SESSION_COOKIES; |
| 597 } | 596 } |
| 598 | 597 |
| 599 InitHostZoomMap(); | 598 InitHostZoomMap(); |
| 600 | 599 |
| 601 // Make sure we initialize the ProfileIOData after everything else has been | 600 // Make sure we initialize the ProfileIOData after everything else has been |
| 602 // initialized that we might be reading from the IO thread. | 601 // initialized that we might be reading from the IO thread. |
| 603 | 602 |
| 604 io_data_.Init(cookie_path, server_bound_cert_path, cache_path, | 603 io_data_.Init(cookie_path, channel_id_path, cache_path, |
| 605 cache_max_size, media_cache_path, media_cache_max_size, | 604 cache_max_size, media_cache_path, media_cache_max_size, |
| 606 extensions_cookie_path, GetPath(), infinite_cache_path, | 605 extensions_cookie_path, GetPath(), infinite_cache_path, |
| 607 predictor_, session_cookie_mode, GetSpecialStoragePolicy(), | 606 predictor_, session_cookie_mode, GetSpecialStoragePolicy(), |
| 608 CreateDomainReliabilityMonitor()); | 607 CreateDomainReliabilityMonitor()); |
| 609 | 608 |
| 610 #if defined(ENABLE_PLUGINS) | 609 #if defined(ENABLE_PLUGINS) |
| 611 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( | 610 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
| 612 PluginPrefs::GetForProfile(this).get(), | 611 PluginPrefs::GetForProfile(this).get(), |
| 613 io_data_.GetResourceContextNoInit()); | 612 io_data_.GetResourceContextNoInit()); |
| 614 #endif | 613 #endif |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 ProfileImpl::CreateDomainReliabilityMonitor() { | 1319 ProfileImpl::CreateDomainReliabilityMonitor() { |
| 1321 domain_reliability::DomainReliabilityService* service = | 1320 domain_reliability::DomainReliabilityService* service = |
| 1322 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1321 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1323 GetForBrowserContext(this); | 1322 GetForBrowserContext(this); |
| 1324 if (!service) | 1323 if (!service) |
| 1325 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1324 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1326 | 1325 |
| 1327 return service->CreateMonitor( | 1326 return service->CreateMonitor( |
| 1328 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1327 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 1329 } | 1328 } |
| OLD | NEW |