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_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 virtual ~CloudExternalDataManagerBase(); | 40 virtual ~CloudExternalDataManagerBase(); |
41 | 41 |
42 // Allows downloaded external data to be cached in |external_data_store|. | 42 // Allows downloaded external data to be cached in |external_data_store|. |
43 // Ownership of the store is taken. The store can be destroyed by calling | 43 // Ownership of the store is taken. The store can be destroyed by calling |
44 // SetExternalDataStore(scoped_ptr<CloudExternalDataStore>()). Accesses to the | 44 // SetExternalDataStore(scoped_ptr<CloudExternalDataStore>()). Accesses to the |
45 // store are made via |backend_task_runner_| only. | 45 // store are made via |backend_task_runner_| only. |
46 void SetExternalDataStore( | 46 void SetExternalDataStore( |
47 scoped_ptr<CloudExternalDataStore> external_data_store); | 47 scoped_ptr<CloudExternalDataStore> external_data_store); |
48 | 48 |
49 // CloudExternalDataManager: | 49 // CloudExternalDataManager: |
50 virtual void SetPolicyStore(CloudPolicyStore* policy_store) OVERRIDE; | 50 virtual void SetPolicyStore(CloudPolicyStore* policy_store) override; |
51 virtual void OnPolicyStoreLoaded() OVERRIDE; | 51 virtual void OnPolicyStoreLoaded() override; |
52 virtual void Connect( | 52 virtual void Connect( |
53 scoped_refptr<net::URLRequestContextGetter> request_context) OVERRIDE; | 53 scoped_refptr<net::URLRequestContextGetter> request_context) override; |
54 virtual void Disconnect() OVERRIDE; | 54 virtual void Disconnect() override; |
55 virtual void Fetch( | 55 virtual void Fetch( |
56 const std::string& policy, | 56 const std::string& policy, |
57 const ExternalDataFetcher::FetchCallback& callback) OVERRIDE; | 57 const ExternalDataFetcher::FetchCallback& callback) override; |
58 | 58 |
59 // Allows policies to reference |max_size| bytes of external data even if no | 59 // Allows policies to reference |max_size| bytes of external data even if no |
60 // |max_size| was specified in policy_templates.json. | 60 // |max_size| was specified in policy_templates.json. |
61 // TODO(bartfab): This override is only needed because there are no policies | 61 // TODO(bartfab): This override is only needed because there are no policies |
62 // that reference external data and have a |max_size| yet. Once the first such | 62 // that reference external data and have a |max_size| yet. Once the first such |
63 // policy is added, use that policy in tests and remove the override. | 63 // policy is added, use that policy in tests and remove the override. |
64 static void SetMaxExternalDataSizeForTesting(int max_size); | 64 static void SetMaxExternalDataSizeForTesting(int max_size); |
65 | 65 |
66 protected: | 66 protected: |
67 friend class CloudExternalDataManagerBaseTest; | 67 friend class CloudExternalDataManagerBaseTest; |
(...skipping 20 matching lines...) Expand all Loading... |
88 // |backend_task_runner_|. | 88 // |backend_task_runner_|. |
89 class Backend; | 89 class Backend; |
90 scoped_ptr<Backend> backend_; | 90 scoped_ptr<Backend> backend_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(CloudExternalDataManagerBase); | 92 DISALLOW_COPY_AND_ASSIGN(CloudExternalDataManagerBase); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace policy | 95 } // namespace policy |
96 | 96 |
97 #endif // CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_H_ | 97 #endif // CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_H_ |
OLD | NEW |