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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account_external_data_service.h

Issue 25242002: Support policies referencing external data for device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA_SERVIC E_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA_SERVIC E_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "chrome/browser/chromeos/policy/device_local_account_external_data_mana ger.h"
16 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
17 #include "chrome/browser/policy/cloud/resource_cache.h"
18
19 namespace base {
20 class SequencedTaskRunner;
21 }
22
23 namespace policy {
24
25 class CloudPolicyStore;
26
27 // Provides DeviceLocalAccountExternalDataManagers for all device-local
28 // accounts. This class owns the |resource_cache_| that the managers share.
29 class DeviceLocalAccountExternalDataService
30 : public DeviceLocalAccountPolicyService::Observer {
31 public:
32 DeviceLocalAccountExternalDataService(
33 DeviceLocalAccountPolicyService* parent,
34 scoped_refptr<base::SequencedTaskRunner> backend_task_runner,
35 scoped_refptr<base::SequencedTaskRunner> io_task_runner);
36 virtual ~DeviceLocalAccountExternalDataService();
37
38 // DeviceLocalAccountPolicyService::Observer:
39 virtual void OnPolicyUpdated(const std::string& user_id) OVERRIDE;
40 virtual void OnDeviceLocalAccountsChanged() OVERRIDE;
41
42 scoped_refptr<DeviceLocalAccountExternalDataManager>
43 GetExternalDataManager(const std::string& account_id,
44 CloudPolicyStore* policy_store);
45
46 private:
47 typedef std::map<std::string,
48 scoped_refptr<DeviceLocalAccountExternalDataManager> >
49 ExternalDataManagerMap;
50
51 DeviceLocalAccountPolicyService* parent_;
52 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_;
53 scoped_refptr<base::SequencedTaskRunner> io_task_runner_;
54 scoped_ptr<ResourceCache> resource_cache_;
55
56 ExternalDataManagerMap external_data_managers_;
57
58 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountExternalDataService);
59 };
60
61 } // namespace policy
62
63 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA_SER VICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698