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

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

Issue 2468723003: Move session service and supervised users to buildflags. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 #if defined(ENABLE_EXTENSIONS) 114 #if defined(ENABLE_EXTENSIONS)
115 #include "chrome/browser/extensions/extension_cookie_monster_delegate.h" 115 #include "chrome/browser/extensions/extension_cookie_monster_delegate.h"
116 #include "chrome/browser/extensions/extension_resource_protocols.h" 116 #include "chrome/browser/extensions/extension_resource_protocols.h"
117 #include "extensions/browser/extension_protocols.h" 117 #include "extensions/browser/extension_protocols.h"
118 #include "extensions/browser/extension_system.h" 118 #include "extensions/browser/extension_system.h"
119 #include "extensions/browser/extension_throttle_manager.h" 119 #include "extensions/browser/extension_throttle_manager.h"
120 #include "extensions/browser/info_map.h" 120 #include "extensions/browser/info_map.h"
121 #include "extensions/common/constants.h" 121 #include "extensions/common/constants.h"
122 #endif 122 #endif
123 123
124 #if defined(ENABLE_SUPERVISED_USERS) 124 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
125 #include "chrome/browser/supervised_user/supervised_user_service.h" 125 #include "chrome/browser/supervised_user/supervised_user_service.h"
126 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 126 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
127 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" 127 #include "chrome/browser/supervised_user/supervised_user_url_filter.h"
128 #endif 128 #endif
129 129
130 #if defined(OS_ANDROID) 130 #if defined(OS_ANDROID)
131 #include "content/public/browser/android/content_protocol_handler.h" 131 #include "content/public/browser/android/content_protocol_handler.h"
132 #endif // defined(OS_ANDROID) 132 #endif // defined(OS_ANDROID)
133 133
134 #if defined(OS_CHROMEOS) 134 #if defined(OS_CHROMEOS)
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 426
427 NewTabPageInterceptorService* new_tab_interceptor_service = 427 NewTabPageInterceptorService* new_tab_interceptor_service =
428 NewTabPageInterceptorServiceFactory::GetForProfile(profile); 428 NewTabPageInterceptorServiceFactory::GetForProfile(profile);
429 if (new_tab_interceptor_service) { 429 if (new_tab_interceptor_service) {
430 params->new_tab_page_interceptor = 430 params->new_tab_page_interceptor =
431 new_tab_interceptor_service->CreateInterceptor(); 431 new_tab_interceptor_service->CreateInterceptor();
432 } 432 }
433 433
434 params->proxy_config_service = ProxyServiceFactory::CreateProxyConfigService( 434 params->proxy_config_service = ProxyServiceFactory::CreateProxyConfigService(
435 profile->GetProxyConfigTracker()); 435 profile->GetProxyConfigTracker());
436 #if defined(ENABLE_SUPERVISED_USERS) 436 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
437 SupervisedUserService* supervised_user_service = 437 SupervisedUserService* supervised_user_service =
438 SupervisedUserServiceFactory::GetForProfile(profile); 438 SupervisedUserServiceFactory::GetForProfile(profile);
439 params->supervised_user_url_filter = 439 params->supervised_user_url_filter =
440 supervised_user_service->GetURLFilterForIOThread(); 440 supervised_user_service->GetURLFilterForIOThread();
441 #endif 441 #endif
442 #if defined(OS_CHROMEOS) 442 #if defined(OS_CHROMEOS)
443 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); 443 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
444 if (user_manager) { 444 if (user_manager) {
445 const user_manager::User* user = 445 const user_manager::User* user =
446 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 446 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 #endif 1091 #endif
1092 1092
1093 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); 1093 resource_context_->host_resolver_ = io_thread_globals->host_resolver.get();
1094 resource_context_->request_context_ = main_request_context_.get(); 1094 resource_context_->request_context_ = main_request_context_.get();
1095 1095
1096 if (profile_params_->resource_prefetch_predictor_observer_) { 1096 if (profile_params_->resource_prefetch_predictor_observer_) {
1097 resource_prefetch_predictor_observer_.reset( 1097 resource_prefetch_predictor_observer_.reset(
1098 profile_params_->resource_prefetch_predictor_observer_.release()); 1098 profile_params_->resource_prefetch_predictor_observer_.release());
1099 } 1099 }
1100 1100
1101 #if defined(ENABLE_SUPERVISED_USERS) 1101 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
1102 supervised_user_url_filter_ = profile_params_->supervised_user_url_filter; 1102 supervised_user_url_filter_ = profile_params_->supervised_user_url_filter;
1103 #endif 1103 #endif
1104 1104
1105 #if defined(OS_CHROMEOS) 1105 #if defined(OS_CHROMEOS)
1106 username_hash_ = profile_params_->username_hash; 1106 username_hash_ = profile_params_->username_hash;
1107 use_system_key_slot_ = profile_params_->use_system_key_slot; 1107 use_system_key_slot_ = profile_params_->use_system_key_slot;
1108 if (use_system_key_slot_) 1108 if (use_system_key_slot_)
1109 EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); 1109 EnableNSSSystemKeySlotForResourceContext(resource_context_.get());
1110 1110
1111 certificate_provider_ = std::move(profile_params_->certificate_provider); 1111 certificate_provider_ = std::move(profile_params_->certificate_provider);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 void ProfileIOData::SetCookieSettingsForTesting( 1353 void ProfileIOData::SetCookieSettingsForTesting(
1354 content_settings::CookieSettings* cookie_settings) { 1354 content_settings::CookieSettings* cookie_settings) {
1355 DCHECK(!cookie_settings_.get()); 1355 DCHECK(!cookie_settings_.get());
1356 cookie_settings_ = cookie_settings; 1356 cookie_settings_ = cookie_settings;
1357 } 1357 }
1358 1358
1359 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1359 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1360 const GURL& url) const { 1360 const GURL& url) const {
1361 return url_blacklist_manager_->GetURLBlacklistState(url); 1361 return url_blacklist_manager_->GetURLBlacklistState(url);
1362 } 1362 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698