OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_EXTERNAL_POLICY_
LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_EXTERNAL_POLICY_
LOADER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_EXTERNAL_POLICY_
LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_EXTERNAL_POLICY_
LOADER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // write operations to |cache_dir_| on any thread and none will be initiated | 41 // write operations to |cache_dir_| on any thread and none will be initiated |
42 // while the cache is running. | 42 // while the cache is running. |
43 void StartCache( | 43 void StartCache( |
44 const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner); | 44 const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner); |
45 | 45 |
46 // Stop the cache. The |callback| will be invoked when the cache has shut down | 46 // Stop the cache. The |callback| will be invoked when the cache has shut down |
47 // completely and write access to the |cache_dir_| is permitted again. | 47 // completely and write access to the |cache_dir_| is permitted again. |
48 void StopCache(const base::Closure& callback); | 48 void StopCache(const base::Closure& callback); |
49 | 49 |
50 // extensions::ExternalLoader: | 50 // extensions::ExternalLoader: |
51 virtual void StartLoading() OVERRIDE; | 51 virtual void StartLoading() override; |
52 | 52 |
53 // policy::CloudPolicyStore::Observer: | 53 // policy::CloudPolicyStore::Observer: |
54 virtual void OnStoreLoaded(policy::CloudPolicyStore* store) OVERRIDE; | 54 virtual void OnStoreLoaded(policy::CloudPolicyStore* store) override; |
55 virtual void OnStoreError(policy::CloudPolicyStore* store) OVERRIDE; | 55 virtual void OnStoreError(policy::CloudPolicyStore* store) override; |
56 | 56 |
57 // ExternalCache::Delegate: | 57 // ExternalCache::Delegate: |
58 virtual void OnExtensionListsUpdated( | 58 virtual void OnExtensionListsUpdated( |
59 const base::DictionaryValue* prefs) OVERRIDE; | 59 const base::DictionaryValue* prefs) override; |
60 | 60 |
61 ExternalCache* GetExternalCacheForTesting(); | 61 ExternalCache* GetExternalCacheForTesting(); |
62 | 62 |
63 private: | 63 private: |
64 // If the cache was started, it must be stopped before |this| is destroyed. | 64 // If the cache was started, it must be stopped before |this| is destroyed. |
65 virtual ~DeviceLocalAccountExternalPolicyLoader(); | 65 virtual ~DeviceLocalAccountExternalPolicyLoader(); |
66 | 66 |
67 // Pass the current list of force-installed extensions from the |store_| to | 67 // Pass the current list of force-installed extensions from the |store_| to |
68 // the |external_cache_|. | 68 // the |external_cache_|. |
69 void UpdateExtensionListFromStore(); | 69 void UpdateExtensionListFromStore(); |
70 | 70 |
71 policy::CloudPolicyStore* store_; | 71 policy::CloudPolicyStore* store_; |
72 const base::FilePath cache_dir_; | 72 const base::FilePath cache_dir_; |
73 scoped_ptr<ExternalCache> external_cache_; | 73 scoped_ptr<ExternalCache> external_cache_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountExternalPolicyLoader); | 75 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountExternalPolicyLoader); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace chromeos | 78 } // namespace chromeos |
79 | 79 |
80 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_EXTERNAL_POLI
CY_LOADER_H_ | 80 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_EXTERNAL_POLI
CY_LOADER_H_ |
OLD | NEW |