| OLD | NEW |
| 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_DISK_CACHE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_DISK_CACHE_H_ |
| 6 #define CHROME_BROWSER_POLICY_USER_POLICY_DISK_CACHE_H_ | 6 #define CHROME_BROWSER_POLICY_USER_POLICY_DISK_CACHE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 | 13 |
| 14 namespace em = enterprise_management; | 14 namespace enterprise_management { |
| 15 | 15 |
| 16 namespace enterprise_management { | |
| 17 class CachedCloudPolicyResponse; | 16 class CachedCloudPolicyResponse; |
| 17 |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace policy { | 20 namespace policy { |
| 21 | 21 |
| 22 namespace em = enterprise_management; |
| 23 |
| 22 // Handles the on-disk cache file used by UserPolicyCache. This class handles | 24 // Handles the on-disk cache file used by UserPolicyCache. This class handles |
| 23 // the necessary thread switching and may outlive the associated UserPolicyCache | 25 // the necessary thread switching and may outlive the associated UserPolicyCache |
| 24 // instance. | 26 // instance. |
| 25 class UserPolicyDiskCache | 27 class UserPolicyDiskCache |
| 26 : public base::RefCountedThreadSafe<UserPolicyDiskCache> { | 28 : public base::RefCountedThreadSafe<UserPolicyDiskCache> { |
| 27 public: | 29 public: |
| 28 // Indicates the status of a completed load operation. | 30 // Indicates the status of a completed load operation. |
| 29 enum LoadResult { | 31 enum LoadResult { |
| 30 // Policy was loaded successfully. | 32 // Policy was loaded successfully. |
| 31 LOAD_RESULT_SUCCESS, | 33 LOAD_RESULT_SUCCESS, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 79 |
| 78 base::WeakPtr<Delegate> delegate_; | 80 base::WeakPtr<Delegate> delegate_; |
| 79 const FilePath backing_file_path_; | 81 const FilePath backing_file_path_; |
| 80 | 82 |
| 81 DISALLOW_COPY_AND_ASSIGN(UserPolicyDiskCache); | 83 DISALLOW_COPY_AND_ASSIGN(UserPolicyDiskCache); |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 } // namespace policy | 86 } // namespace policy |
| 85 | 87 |
| 86 #endif // CHROME_BROWSER_POLICY_USER_POLICY_DISK_CACHE_H_ | 88 #endif // CHROME_BROWSER_POLICY_USER_POLICY_DISK_CACHE_H_ |
| OLD | NEW |