Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: chrome/browser/search/one_google_bar/one_google_bar_fetcher.h

Issue 2811353002: Local NTP: Introduce OneGoogleBarService (Closed)
Patch Set: fix memleak Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_FETCHER_H_ 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_ 6 #define CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_FETCHER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/optional.h" 9 #include "base/optional.h"
10 10
11 struct OneGoogleBarData; 11 struct OneGoogleBarData;
12 12
13 // Interface for fetching OneGoogleBarData over the network. 13 // Interface for fetching OneGoogleBarData over the network.
14 class OneGoogleBarFetcher { 14 class OneGoogleBarFetcher {
15 public: 15 public:
16 using OneGoogleCallback = 16 using OneGoogleCallback =
17 base::OnceCallback<void(const base::Optional<OneGoogleBarData>&)>; 17 base::OnceCallback<void(const base::Optional<OneGoogleBarData>&)>;
18 18
19 virtual ~OneGoogleBarFetcher() = default;
20
19 // Initiates a fetch from the network. On completion (successful or not), the 21 // 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. 22 // callback will be called with the result, which will be nullopt on failure.
21 virtual void Fetch(OneGoogleCallback callback) = 0; 23 virtual void Fetch(OneGoogleCallback callback) = 0;
22 }; 24 };
23 25
24 #endif // CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_FETCHER_H_ 26 #endif // CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698