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

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

Issue 70863002: Refactored the ComponentCloudPolicyService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_COMPONENT_CLOUD_POLICY_UPDATER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_UPDATER_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_UPDATER_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_UPDATER_H_
7 7
8 #include <string>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/policy/cloud/external_policy_data_updater.h" 13 #include "chrome/browser/policy/cloud/external_policy_data_updater.h"
14 #include "components/policy/core/common/policy_namespace.h"
12 15
13 namespace base { 16 namespace base {
14 class SequencedTaskRunner; 17 class SequencedTaskRunner;
15 } 18 }
16 19
17 namespace enterprise_management { 20 namespace enterprise_management {
18 class PolicyFetchResponse; 21 class PolicyFetchResponse;
19 } 22 }
20 23
21 namespace policy { 24 namespace policy {
(...skipping 17 matching lines...) Expand all
39 ComponentCloudPolicyStore* store); 42 ComponentCloudPolicyStore* store);
40 ~ComponentCloudPolicyUpdater(); 43 ~ComponentCloudPolicyUpdater();
41 44
42 // |response| is the latest policy information fetched for some component. 45 // |response| is the latest policy information fetched for some component.
43 // This method schedules the download of the policy data, if |response| is 46 // This method schedules the download of the policy data, if |response| is
44 // validated. If the downloaded data also passes validation then that data 47 // validated. If the downloaded data also passes validation then that data
45 // will be passed to the |store_|. 48 // will be passed to the |store_|.
46 void UpdateExternalPolicy( 49 void UpdateExternalPolicy(
47 scoped_ptr<enterprise_management::PolicyFetchResponse> response); 50 scoped_ptr<enterprise_management::PolicyFetchResponse> response);
48 51
52 // Cancels any pending operations for the given namespace.
53 void CancelUpdate(const PolicyNamespace& ns);
54
49 private: 55 private:
56 std::string NamespaceToKey(const PolicyNamespace& ns);
57
50 ComponentCloudPolicyStore* store_; 58 ComponentCloudPolicyStore* store_;
51 ExternalPolicyDataUpdater external_policy_data_updater_; 59 ExternalPolicyDataUpdater external_policy_data_updater_;
52 60
53 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyUpdater); 61 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyUpdater);
54 }; 62 };
55 63
56 } // namespace policy 64 } // namespace policy
57 65
58 #endif // CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_UPDATER_H_ 66 #endif // CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698