| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 37 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 38 #include "chrome/browser/browser_process.h" | 38 #include "chrome/browser/browser_process.h" |
| 39 #include "chrome/browser/chrome_notification_types.h" | 39 #include "chrome/browser/chrome_notification_types.h" |
| 40 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 40 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 41 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 41 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 42 #include "chrome/browser/dom_distiller/profile_utils.h" | 42 #include "chrome/browser/dom_distiller/profile_utils.h" |
| 43 #include "chrome/browser/domain_reliability/service_factory.h" | 43 #include "chrome/browser/domain_reliability/service_factory.h" |
| 44 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 44 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 45 #include "chrome/browser/download/download_service.h" | 45 #include "chrome/browser/download/download_service.h" |
| 46 #include "chrome/browser/download/download_service_factory.h" | 46 #include "chrome/browser/download/download_service_factory.h" |
| 47 #include "chrome/browser/net/net_pref_observer.h" |
| 47 #include "chrome/browser/net/predictor.h" | 48 #include "chrome/browser/net/predictor.h" |
| 48 #include "chrome/browser/net/proxy_service_factory.h" | 49 #include "chrome/browser/net/proxy_service_factory.h" |
| 49 #include "chrome/browser/permissions/permission_manager.h" | 50 #include "chrome/browser/permissions/permission_manager.h" |
| 50 #include "chrome/browser/permissions/permission_manager_factory.h" | 51 #include "chrome/browser/permissions/permission_manager_factory.h" |
| 51 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 52 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
| 52 #include "chrome/browser/plugins/plugin_prefs.h" | 53 #include "chrome/browser/plugins/plugin_prefs.h" |
| 53 #include "chrome/browser/policy/profile_policy_connector.h" | 54 #include "chrome/browser/policy/profile_policy_connector.h" |
| 54 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 55 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
| 55 #include "chrome/browser/policy/schema_registry_service.h" | 56 #include "chrome/browser/policy/schema_registry_service.h" |
| 56 #include "chrome/browser/policy/schema_registry_service_factory.h" | 57 #include "chrome/browser/policy/schema_registry_service_factory.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 #include "content/public/browser/browser_thread.h" | 109 #include "content/public/browser/browser_thread.h" |
| 109 #include "content/public/browser/dom_storage_context.h" | 110 #include "content/public/browser/dom_storage_context.h" |
| 110 #include "content/public/browser/notification_service.h" | 111 #include "content/public/browser/notification_service.h" |
| 111 #include "content/public/browser/render_process_host.h" | 112 #include "content/public/browser/render_process_host.h" |
| 112 #include "content/public/browser/storage_partition.h" | 113 #include "content/public/browser/storage_partition.h" |
| 113 #include "content/public/browser/url_data_source.h" | 114 #include "content/public/browser/url_data_source.h" |
| 114 #include "content/public/browser/user_metrics.h" | 115 #include "content/public/browser/user_metrics.h" |
| 115 #include "content/public/common/content_constants.h" | 116 #include "content/public/common/content_constants.h" |
| 116 #include "content/public/common/page_zoom.h" | 117 #include "content/public/common/page_zoom.h" |
| 117 #include "extensions/features/features.h" | 118 #include "extensions/features/features.h" |
| 119 #include "net/http/http_network_session.h" |
| 118 #include "ppapi/features/features.h" | 120 #include "ppapi/features/features.h" |
| 119 #include "printing/features/features.h" | 121 #include "printing/features/features.h" |
| 120 #include "ui/base/l10n/l10n_util.h" | 122 #include "ui/base/l10n/l10n_util.h" |
| 121 | 123 |
| 122 #if defined(OS_CHROMEOS) | 124 #if defined(OS_CHROMEOS) |
| 123 #include "chrome/browser/chromeos/locale_change_guard.h" | 125 #include "chrome/browser/chromeos/locale_change_guard.h" |
| 124 #include "chrome/browser/chromeos/preferences.h" | 126 #include "chrome/browser/chromeos/preferences.h" |
| 125 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 127 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 126 #include "components/user_manager/user_manager.h" | 128 #include "components/user_manager/user_manager.h" |
| 127 #endif | 129 #endif |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 StartupBrowserCreator::GetSessionStartupPref( | 608 StartupBrowserCreator::GetSessionStartupPref( |
| 607 *base::CommandLine::ForCurrentProcess(), this).type; | 609 *base::CommandLine::ForCurrentProcess(), this).type; |
| 608 #endif | 610 #endif |
| 609 content::CookieStoreConfig::SessionCookieMode session_cookie_mode = | 611 content::CookieStoreConfig::SessionCookieMode session_cookie_mode = |
| 610 content::CookieStoreConfig::PERSISTANT_SESSION_COOKIES; | 612 content::CookieStoreConfig::PERSISTANT_SESSION_COOKIES; |
| 611 if (GetLastSessionExitType() == Profile::EXIT_CRASHED || | 613 if (GetLastSessionExitType() == Profile::EXIT_CRASHED || |
| 612 startup_pref_type == SessionStartupPref::LAST) { | 614 startup_pref_type == SessionStartupPref::LAST) { |
| 613 session_cookie_mode = content::CookieStoreConfig::RESTORED_SESSION_COOKIES; | 615 session_cookie_mode = content::CookieStoreConfig::RESTORED_SESSION_COOKIES; |
| 614 } | 616 } |
| 615 | 617 |
| 618 DCHECK(!net_pref_observer_); |
| 619 net_pref_observer_.reset(new NetPrefObserver(prefs_.get())); |
| 620 |
| 616 // Make sure we initialize the ProfileIOData after everything else has been | 621 // Make sure we initialize the ProfileIOData after everything else has been |
| 617 // initialized that we might be reading from the IO thread. | 622 // initialized that we might be reading from the IO thread. |
| 618 | 623 |
| 619 io_data_.Init(cookie_path, channel_id_path, cache_path, | 624 io_data_.Init(cookie_path, channel_id_path, cache_path, |
| 620 cache_max_size, media_cache_path, media_cache_max_size, | 625 cache_max_size, media_cache_path, media_cache_max_size, |
| 621 extensions_cookie_path, GetPath(), predictor_, | 626 extensions_cookie_path, GetPath(), predictor_, |
| 622 session_cookie_mode, GetSpecialStoragePolicy(), | 627 session_cookie_mode, GetSpecialStoragePolicy(), |
| 623 CreateDomainReliabilityMonitor(local_state)); | 628 CreateDomainReliabilityMonitor(local_state)); |
| 624 | 629 |
| 625 #if BUILDFLAG(ENABLE_PLUGINS) | 630 #if BUILDFLAG(ENABLE_PLUGINS) |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1280 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| 1276 domain_reliability::DomainReliabilityService* service = | 1281 domain_reliability::DomainReliabilityService* service = |
| 1277 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1282 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1278 GetForBrowserContext(this); | 1283 GetForBrowserContext(this); |
| 1279 if (!service) | 1284 if (!service) |
| 1280 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1285 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1281 | 1286 |
| 1282 return service->CreateMonitor( | 1287 return service->CreateMonitor( |
| 1283 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1288 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 1284 } | 1289 } |
| OLD | NEW |