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

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

Issue 2606773002: Setup Chromad user policy plumbing (Closed)
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/webui/policy_ui_handler.cc » ('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_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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #include "components/user_manager/user_manager.h" 126 #include "components/user_manager/user_manager.h"
127 #endif 127 #endif
128 128
129 #if BUILDFLAG(ENABLE_BACKGROUND) 129 #if BUILDFLAG(ENABLE_BACKGROUND)
130 #include "chrome/browser/background/background_mode_manager.h" 130 #include "chrome/browser/background/background_mode_manager.h"
131 #endif 131 #endif
132 132
133 #if defined(OS_CHROMEOS) 133 #if defined(OS_CHROMEOS)
134 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 134 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
135 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" 135 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
136 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.h" 136 #include "chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.h"
137 #else 137 #else
138 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" 138 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
139 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" 139 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
140 #endif 140 #endif
141 141
142 #if BUILDFLAG(ENABLE_EXTENSIONS) 142 #if BUILDFLAG(ENABLE_EXTENSIONS)
143 #include "chrome/browser/extensions/extension_service.h" 143 #include "chrome/browser/extensions/extension_service.h"
144 #include "chrome/browser/extensions/extension_special_storage_policy.h" 144 #include "chrome/browser/extensions/extension_special_storage_policy.h"
145 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 145 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
146 #include "components/guest_view/browser/guest_view_manager.h" 146 #include "components/guest_view/browser/guest_view_manager.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 // If we are creating the profile synchronously, then we should load the 428 // If we are creating the profile synchronously, then we should load the
429 // policy data immediately. 429 // policy data immediately.
430 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); 430 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS);
431 policy::BrowserPolicyConnector* connector = 431 policy::BrowserPolicyConnector* connector =
432 g_browser_process->browser_policy_connector(); 432 g_browser_process->browser_policy_connector();
433 schema_registry_service_ = 433 schema_registry_service_ =
434 policy::SchemaRegistryServiceFactory::CreateForContext( 434 policy::SchemaRegistryServiceFactory::CreateForContext(
435 this, connector->GetChromeSchema(), connector->GetSchemaRegistry()); 435 this, connector->GetChromeSchema(), connector->GetSchemaRegistry());
436 #if defined(OS_CHROMEOS) 436 #if defined(OS_CHROMEOS)
437 cloud_policy_manager_ = 437 configuration_policy_provider_ =
438 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( 438 policy::UserPolicyManagerFactoryChromeOS::CreateForProfile(
439 this, force_immediate_policy_load, sequenced_task_runner); 439 this, force_immediate_policy_load, sequenced_task_runner);
440 #else 440 #else
441 cloud_policy_manager_ = 441 configuration_policy_provider_ =
442 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext( 442 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext(
443 this, force_immediate_policy_load, sequenced_task_runner, 443 this, force_immediate_policy_load, sequenced_task_runner,
444 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 444 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
445 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 445 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
446 #endif 446 #endif
447 profile_policy_connector_ = 447 profile_policy_connector_ =
448 policy::ProfilePolicyConnectorFactory::CreateForBrowserContext( 448 policy::ProfilePolicyConnectorFactory::CreateForBrowserContext(
449 this, force_immediate_policy_load); 449 this, force_immediate_policy_load);
450 450
451 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || 451 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS ||
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1275 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1276 domain_reliability::DomainReliabilityService* service = 1276 domain_reliability::DomainReliabilityService* service =
1277 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1277 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1278 GetForBrowserContext(this); 1278 GetForBrowserContext(this);
1279 if (!service) 1279 if (!service)
1280 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); 1280 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>();
1281 1281
1282 return service->CreateMonitor( 1282 return service->CreateMonitor(
1283 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 1283 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
1284 } 1284 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/webui/policy_ui_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698