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

Unified Diff: components/policy/core/common/cloud/cloud_policy_manager.cc

Issue 2441653003: Enable fetching of admin policies for login screen apps (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/cloud_policy_manager.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_manager.cc b/components/policy/core/common/cloud/cloud_policy_manager.cc
index 7fca2009466c51934e5e7868f719403eea65d597..67d63be28a71d0eb89c70179bee12f2c10698646 100644
--- a/components/policy/core/common/cloud/cloud_policy_manager.cc
+++ b/components/policy/core/common/cloud/cloud_policy_manager.cc
@@ -16,6 +16,7 @@
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_switches.h"
+#include "components/policy/core/common/schema_registry.h"
#include "components/prefs/pref_service.h"
#include "net/url_request/url_request_context_getter.h"
@@ -117,10 +118,11 @@ void CloudPolicyManager::CreateComponentCloudPolicyService(
const std::string& policy_type,
const base::FilePath& policy_cache_path,
const scoped_refptr<net::URLRequestContextGetter>& request_context,
- CloudPolicyClient* client) {
+ CloudPolicyClient* client,
+ SchemaRegistry* schema_registry) {
#if !defined(OS_ANDROID) && !defined(OS_IOS)
// Init() must have been called.
- CHECK(schema_registry());
+ CHECK(schema_registry);
// Called at most once.
CHECK(!component_policy_service_);
// The core can't be connected yet.
@@ -139,7 +141,7 @@ void CloudPolicyManager::CreateComponentCloudPolicyService(
std::unique_ptr<ResourceCache> resource_cache(
new ResourceCache(policy_cache_path, file_task_runner_));
component_policy_service_.reset(new ComponentCloudPolicyService(
- policy_type, this, schema_registry(), core(), client,
+ policy_type, this, schema_registry, core(), client,
std::move(resource_cache), request_context, file_task_runner_,
io_task_runner_));
#endif // !defined(OS_ANDROID) && !defined(OS_IOS)

Powered by Google App Engine
This is Rietveld 408576698