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

Side by Side Diff: chrome/browser/policy/cloud/user_cloud_policy_manager.h

Issue 79023002: Support cloud policy for extensions on the desktop platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed stub, again Created 7 years 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
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 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "chrome/browser/policy/cloud/cloud_policy_manager.h" 15 #include "chrome/browser/policy/cloud/cloud_policy_manager.h"
15 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 16 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
16 17
17 class PrefService; 18 class PrefService;
18 19
19 namespace base { 20 namespace base {
20 class SequencedTaskRunner; 21 class SequencedTaskRunner;
21 } 22 }
(...skipping 11 matching lines...) Expand all
33 class CloudExternalDataManager; 34 class CloudExternalDataManager;
34 class DeviceManagementService; 35 class DeviceManagementService;
35 class UserCloudPolicyStore; 36 class UserCloudPolicyStore;
36 37
37 // UserCloudPolicyManager handles initialization of user policy for Chrome 38 // UserCloudPolicyManager handles initialization of user policy for Chrome
38 // Profiles on the desktop platforms. 39 // Profiles on the desktop platforms.
39 class UserCloudPolicyManager : public CloudPolicyManager, 40 class UserCloudPolicyManager : public CloudPolicyManager,
40 public BrowserContextKeyedService { 41 public BrowserContextKeyedService {
41 public: 42 public:
42 // |task_runner| is the runner for policy refresh tasks. 43 // |task_runner| is the runner for policy refresh tasks.
44 // |file_task_runner| is used for file operations.
45 // |io_task_runner| is used for network IO.
46 // Note: currently these must be the FILE and the IO BrowserThreads.
bartfab (slow) 2013/11/25 15:05:50 Nit: "these" is ambiguous (there are three task ru
Joao da Silva 2013/11/25 16:44:11 Done.
43 UserCloudPolicyManager( 47 UserCloudPolicyManager(
44 content::BrowserContext* context, 48 content::BrowserContext* context,
45 scoped_ptr<UserCloudPolicyStore> store, 49 scoped_ptr<UserCloudPolicyStore> store,
50 const base::FilePath& component_policy_cache_path,
46 scoped_ptr<CloudExternalDataManager> external_data_manager, 51 scoped_ptr<CloudExternalDataManager> external_data_manager,
47 const scoped_refptr<base::SequencedTaskRunner>& task_runner); 52 const scoped_refptr<base::SequencedTaskRunner>& task_runner,
53 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner,
54 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner);
48 virtual ~UserCloudPolicyManager(); 55 virtual ~UserCloudPolicyManager();
49 56
50 virtual void Shutdown() OVERRIDE; 57 virtual void Shutdown() OVERRIDE;
51 58
52 void SetSigninUsername(const std::string& username); 59 void SetSigninUsername(const std::string& username);
53 60
54 // Initializes the cloud connection. |local_state| must stay valid until this 61 // Initializes the cloud connection. |local_state| must stay valid until this
55 // object is deleted or DisconnectAndRemovePolicy() gets called. Virtual for 62 // object is deleted or DisconnectAndRemovePolicy() gets called. Virtual for
56 // mocking. 63 // mocking.
57 virtual void Connect( 64 virtual void Connect(
(...skipping 18 matching lines...) Expand all
76 DeviceManagementService* device_management_service); 83 DeviceManagementService* device_management_service);
77 84
78 private: 85 private:
79 // The context this instance belongs to. 86 // The context this instance belongs to.
80 content::BrowserContext* context_; 87 content::BrowserContext* context_;
81 88
82 // Typed pointer to the store owned by UserCloudPolicyManager. Note that 89 // Typed pointer to the store owned by UserCloudPolicyManager. Note that
83 // CloudPolicyManager only keeps a plain CloudPolicyStore pointer. 90 // CloudPolicyManager only keeps a plain CloudPolicyStore pointer.
84 scoped_ptr<UserCloudPolicyStore> store_; 91 scoped_ptr<UserCloudPolicyStore> store_;
85 92
93 // Path where policy for components will be cached.
94 base::FilePath component_policy_cache_path_;
95
86 // Manages external data referenced by policies. 96 // Manages external data referenced by policies.
87 scoped_ptr<CloudExternalDataManager> external_data_manager_; 97 scoped_ptr<CloudExternalDataManager> external_data_manager_;
88 98
89 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManager); 99 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManager);
90 }; 100 };
91 101
92 } // namespace policy 102 } // namespace policy
93 103
94 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ 104 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698