| OLD | NEW |
| 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" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // |task_runner| is the runner for policy refresh tasks. | 39 // |task_runner| is the runner for policy refresh tasks. |
| 40 UserCloudPolicyManager( | 40 UserCloudPolicyManager( |
| 41 Profile* profile, | 41 Profile* profile, |
| 42 scoped_ptr<UserCloudPolicyStore> store, | 42 scoped_ptr<UserCloudPolicyStore> store, |
| 43 scoped_ptr<CloudExternalDataManager> external_data_manager, | 43 scoped_ptr<CloudExternalDataManager> external_data_manager, |
| 44 const scoped_refptr<base::SequencedTaskRunner>& task_runner); | 44 const scoped_refptr<base::SequencedTaskRunner>& task_runner); |
| 45 virtual ~UserCloudPolicyManager(); | 45 virtual ~UserCloudPolicyManager(); |
| 46 | 46 |
| 47 virtual void Shutdown() OVERRIDE; | 47 virtual void Shutdown() OVERRIDE; |
| 48 | 48 |
| 49 void SetSigninUsername(const std::string& username); |
| 50 |
| 49 // Initializes the cloud connection. |local_state| must stay valid until this | 51 // Initializes the cloud connection. |local_state| must stay valid until this |
| 50 // object is deleted or DisconnectAndRemovePolicy() gets called. Virtual for | 52 // object is deleted or DisconnectAndRemovePolicy() gets called. Virtual for |
| 51 // mocking. | 53 // mocking. |
| 52 virtual void Connect( | 54 virtual void Connect( |
| 53 PrefService* local_state, | 55 PrefService* local_state, |
| 54 scoped_refptr<net::URLRequestContextGetter> request_context, | 56 scoped_refptr<net::URLRequestContextGetter> request_context, |
| 55 scoped_ptr<CloudPolicyClient> client); | 57 scoped_ptr<CloudPolicyClient> client); |
| 56 | 58 |
| 57 // Shuts down the UserCloudPolicyManager (removes and stops refreshing the | 59 // Shuts down the UserCloudPolicyManager (removes and stops refreshing the |
| 58 // cached cloud policy). This is typically called when a profile is being | 60 // cached cloud policy). This is typically called when a profile is being |
| (...skipping 21 matching lines...) Expand all Loading... |
| 80 | 82 |
| 81 // Manages external data referenced by policies. | 83 // Manages external data referenced by policies. |
| 82 scoped_ptr<CloudExternalDataManager> external_data_manager_; | 84 scoped_ptr<CloudExternalDataManager> external_data_manager_; |
| 83 | 85 |
| 84 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManager); | 86 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManager); |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 } // namespace policy | 89 } // namespace policy |
| 88 | 90 |
| 89 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ | 91 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ |
| OLD | NEW |