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

Side by Side Diff: chrome/browser/policy/cloud_policy_provider.h

Issue 7941008: Cosmetic cleanups in chrome/browser/policy/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload was broken? Created 9 years, 3 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_POLICY_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/policy/cloud_policy_cache_base.h"
11 #include "chrome/browser/policy/configuration_policy_provider.h" 10 #include "chrome/browser/policy/configuration_policy_provider.h"
12 11
13 namespace policy { 12 namespace policy {
14 13
14 class CloudPolicyCacheBase;
15
15 // A policy provider having multiple backend caches, combining their relevant 16 // A policy provider having multiple backend caches, combining their relevant
16 // PolicyMaps and keeping the result cached. The underlying caches are kept as 17 // PolicyMaps and keeping the result cached. The underlying caches are kept as
17 // weak references and can be added dynamically. Also the 18 // weak references and can be added dynamically. Also the
18 // |CloudPolicyProvider| instance listens to cache-notifications and removes 19 // |CloudPolicyProvider| instance listens to cache-notifications and removes
19 // the caches automatically when they go away. The order in which the caches are 20 // the caches automatically when they go away. The order in which the caches are
20 // stored matters! The first cache is applied as is and the following caches 21 // stored matters! The first cache is applied as is and the following caches
21 // only contribute the not-yet applied policies. There are two functions to add 22 // only contribute the not-yet applied policies. There are two functions to add
22 // a new cache: 23 // a new cache:
23 // PrependCache(cache): adds |cache| to the front (i.e. most important cache). 24 // PrependCache(cache): adds |cache| to the front (i.e. most important cache).
24 // AppendCache(cache): adds |cache| to the back (i.e. least important cache). 25 // AppendCache(cache): adds |cache| to the back (i.e. least important cache).
(...skipping 13 matching lines...) Expand all
38 // automatically remove it from |caches_|. 39 // automatically remove it from |caches_|.
39 virtual void PrependCache(CloudPolicyCacheBase* cache) = 0; 40 virtual void PrependCache(CloudPolicyCacheBase* cache) = 0;
40 41
41 private: 42 private:
42 DISALLOW_COPY_AND_ASSIGN(CloudPolicyProvider); 43 DISALLOW_COPY_AND_ASSIGN(CloudPolicyProvider);
43 }; 44 };
44 45
45 } // namespace policy 46 } // namespace policy
46 47
47 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_H_ 48 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_controller_unittest.cc ('k') | chrome/browser/policy/cloud_policy_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698