Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 2546533003: Respect QuicAllowed policy for new streams (Closed)
Patch Set: Reviewers' feedback Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 617
616 // Make sure we initialize the ProfileIOData after everything else has been 618 // Make sure we initialize the ProfileIOData after everything else has been
617 // initialized that we might be reading from the IO thread. 619 // initialized that we might be reading from the IO thread.
618 620
619 io_data_.Init(cookie_path, channel_id_path, cache_path, 621 io_data_.Init(cookie_path, channel_id_path, cache_path,
620 cache_max_size, media_cache_path, media_cache_max_size, 622 cache_max_size, media_cache_path, media_cache_max_size,
621 extensions_cookie_path, GetPath(), predictor_, 623 extensions_cookie_path, GetPath(), predictor_,
622 session_cookie_mode, GetSpecialStoragePolicy(), 624 session_cookie_mode, GetSpecialStoragePolicy(),
623 CreateDomainReliabilityMonitor(local_state)); 625 CreateDomainReliabilityMonitor(local_state));
624 626
627 DCHECK(!net_pref_observer_);
628 NetPrefObserver::UpdateNetParamsCallback update_net_params_callback =
629 base::Bind(&ProfileImpl::UpdateNetParams, base::Unretained(this));
630 net_pref_observer_ = base::MakeUnique<NetPrefObserver>(
631 prefs_.get(), update_net_params_callback);
632
625 #if BUILDFLAG(ENABLE_PLUGINS) 633 #if BUILDFLAG(ENABLE_PLUGINS)
626 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( 634 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
627 this, io_data_.GetResourceContextNoInit()); 635 this, io_data_.GetResourceContextNoInit());
628 #endif 636 #endif
629 637
630 TRACE_EVENT0("browser", "ProfileImpl::SetSaveSessionStorageOnDisk"); 638 TRACE_EVENT0("browser", "ProfileImpl::SetSaveSessionStorageOnDisk");
631 content::BrowserContext::GetDefaultStoragePartition(this)-> 639 content::BrowserContext::GetDefaultStoragePartition(this)->
632 GetDOMStorageContext()->SetSaveSessionStorageOnDisk(); 640 GetDOMStorageContext()->SetSaveSessionStorageOnDisk();
633 641
634 // The DomDistillerViewerSource is not a normal WebUI so it must be registered 642 // The DomDistillerViewerSource is not a normal WebUI so it must be registered
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1283 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1276 domain_reliability::DomainReliabilityService* service = 1284 domain_reliability::DomainReliabilityService* service =
1277 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1285 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1278 GetForBrowserContext(this); 1286 GetForBrowserContext(this);
1279 if (!service) 1287 if (!service)
1280 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); 1288 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>();
1281 1289
1282 return service->CreateMonitor( 1290 return service->CreateMonitor(
1283 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 1291 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
1284 } 1292 }
1293
1294 void ProfileImpl::UpdateNetParams(
1295 NetPrefObserver::NetParamsChange net_params_change) {
1296 io_data_.UpdateNetParams(net_params_change);
mmenke 2017/01/03 18:49:40 BUG: There are potentially multiple profiles. IO
pmarko 2017/01/03 19:30:49 As far as I can see, this is not actually global -
mmenke 2017/01/03 19:35:42 Oops, sorry, was thinking this was IOData...Where
1297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698