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

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

Issue 7147015: Move user cloud policy to BrowserProcess (was 6979011) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_test include breakage Created 9 years, 5 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_USER_POLICY_CACHE_H_ 5 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_
6 #define CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_ 6 #define CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 19 matching lines...) Expand all
30 class UserPolicyCache : public CloudPolicyCacheBase, 30 class UserPolicyCache : public CloudPolicyCacheBase,
31 public UserPolicyDiskCache::Delegate { 31 public UserPolicyDiskCache::Delegate {
32 public: 32 public:
33 explicit UserPolicyCache(const FilePath& backing_file_path); 33 explicit UserPolicyCache(const FilePath& backing_file_path);
34 virtual ~UserPolicyCache(); 34 virtual ~UserPolicyCache();
35 35
36 // CloudPolicyCacheBase implementation: 36 // CloudPolicyCacheBase implementation:
37 virtual void Load() OVERRIDE; 37 virtual void Load() OVERRIDE;
38 virtual void SetPolicy(const em::PolicyFetchResponse& policy) OVERRIDE; 38 virtual void SetPolicy(const em::PolicyFetchResponse& policy) OVERRIDE;
39 virtual void SetUnmanaged() OVERRIDE; 39 virtual void SetUnmanaged() OVERRIDE;
40 virtual bool IsReady() OVERRIDE;
40 41
41 private: 42 private:
42 class DiskCache; 43 class DiskCache;
43 44
44 // UserPolicyDiskCache::Delegate implementation: 45 // UserPolicyDiskCache::Delegate implementation:
45 virtual void OnDiskCacheLoaded( 46 virtual void OnDiskCacheLoaded(
46 const em::CachedCloudPolicyResponse& cached_response) OVERRIDE; 47 const em::CachedCloudPolicyResponse& cached_response) OVERRIDE;
47 48
48 // CloudPolicyCacheBase implementation: 49 // CloudPolicyCacheBase implementation:
49 virtual bool DecodePolicyData(const em::PolicyData& policy_data, 50 virtual bool DecodePolicyData(const em::PolicyData& policy_data,
(...skipping 16 matching lines...) Expand all
66 Value* DecodeValue(const em::GenericValue& value) const; 67 Value* DecodeValue(const em::GenericValue& value) const;
67 68
68 // </Old-style policy support> 69 // </Old-style policy support>
69 70
70 // Manages the cache file. 71 // Manages the cache file.
71 scoped_refptr<UserPolicyDiskCache> disk_cache_; 72 scoped_refptr<UserPolicyDiskCache> disk_cache_;
72 73
73 // Used for constructing the weak ptr passed to |disk_cache_|. 74 // Used for constructing the weak ptr passed to |disk_cache_|.
74 base::WeakPtrFactory<UserPolicyDiskCache::Delegate> weak_ptr_factory_; 75 base::WeakPtrFactory<UserPolicyDiskCache::Delegate> weak_ptr_factory_;
75 76
77 // Starts as false, set to true when the first request for policies from
78 // disk is returned.
79 bool first_load_complete_;
80
76 DISALLOW_COPY_AND_ASSIGN(UserPolicyCache); 81 DISALLOW_COPY_AND_ASSIGN(UserPolicyCache);
77 }; 82 };
78 83
79 } // namespace policy 84 } // namespace policy
80 85
81 #endif // CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_ 86 #endif // CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_unittest.cc ('k') | chrome/browser/policy/user_policy_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698