Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / chromeos / policy / device_local_account_extension_tracker.h
blob5ab6be903c12fbf8da8de0a00e2254d31f835354
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER_H_
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "components/policy/core/common/cloud/cloud_policy_store.h"
12 namespace policy {
14 struct DeviceLocalAccount;
15 class SchemaRegistry;
17 // Helper class that keeps all the extensions that a device-local account uses
18 // registered in a SchemaRegistry.
19 // This makes it possible to precache the policy for extensions for public
20 // sessions before the session is started (e.g. during enrollment).
21 // Otherwise, the ComponentCloudPolicyService would ignore the
22 // PolicyFetchResponses from the DMServer because the SchemaRegistry for this
23 // account doesn't have this extension "installed".
24 class DeviceLocalAccountExtensionTracker : public CloudPolicyStore::Observer {
25 public:
26 DeviceLocalAccountExtensionTracker(
27 const DeviceLocalAccount& account,
28 CloudPolicyStore* store,
29 SchemaRegistry* schema_registry);
31 ~DeviceLocalAccountExtensionTracker() override;
33 // CloudPolicyStore::Observer:
34 void OnStoreLoaded(CloudPolicyStore* store) override;
35 void OnStoreError(CloudPolicyStore* store) override;
37 private:
38 void UpdateFromStore();
40 CloudPolicyStore* store_;
41 SchemaRegistry* schema_registry_;
43 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountExtensionTracker);
46 } // namespace policy
48 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER_H_