OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_FETCHER_H_ |
| 6 #define CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_FETCHER_H_ |
| 7 |
| 8 #include "base/callback_forward.h" |
| 9 #include "base/optional.h" |
| 10 |
| 11 struct OneGoogleBarData; |
| 12 |
| 13 // Interface for fetching OneGoogleBarData over the network. |
| 14 class OneGoogleBarFetcher { |
| 15 public: |
| 16 using OneGoogleCallback = |
| 17 base::OnceCallback<void(const base::Optional<OneGoogleBarData>&)>; |
| 18 |
| 19 // Initiates a fetch from the network. On completion (successful or not), the |
| 20 // callback will be called with the result, which will be nullopt on failure. |
| 21 virtual void Fetch(OneGoogleCallback callback) = 0; |
| 22 }; |
| 23 |
| 24 #endif // CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_FETCHER_H_ |
OLD | NEW |