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_POLICY_EXTERNAL_DATA_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_EXTERNAL_DATA_FETCHER_H_ |
6 #define CHROME_BROWSER_POLICY_EXTERNAL_DATA_FETCHER_H_ | 6 #define CHROME_BROWSER_POLICY_EXTERNAL_DATA_FETCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // |callback| is invoked with a NULL pointer. Otherwise, the |callback| is | 37 // |callback| is invoked with a NULL pointer. Otherwise, the |callback| is |
38 // invoked with the referenced data once it has been successfully retrieved. | 38 // invoked with the referenced data once it has been successfully retrieved. |
39 // If retrieval is temporarily impossible (e.g. no network connectivity), the | 39 // If retrieval is temporarily impossible (e.g. no network connectivity), the |
40 // |callback| will be invoked when the temporary hindrance is resolved. If | 40 // |callback| will be invoked when the temporary hindrance is resolved. If |
41 // retrieval is permanently impossible (e.g. |policy_| references data that | 41 // retrieval is permanently impossible (e.g. |policy_| references data that |
42 // does not exist on the server), the |callback| will never be invoked. | 42 // does not exist on the server), the |callback| will never be invoked. |
43 void Fetch(const FetchCallback& callback) const; | 43 void Fetch(const FetchCallback& callback) const; |
44 | 44 |
45 private: | 45 private: |
46 base::WeakPtr<ExternalDataManager> manager_; | 46 base::WeakPtr<ExternalDataManager> manager_; |
47 std::string policy_; | 47 const std::string policy_; |
48 }; | 48 }; |
49 | 49 |
50 } // namespace policy | 50 } // namespace policy |
51 | 51 |
52 #endif // CHROME_BROWSER_POLICY_EXTERNAL_DATA_FETCHER_H_ | 52 #endif // CHROME_BROWSER_POLICY_EXTERNAL_DATA_FETCHER_H_ |
OLD | NEW |