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

Side by Side Diff: components/doodle/doodle_fetcher.h

Issue 2710003006: [Doodle] Introduce a DoodleService (Closed)
Patch Set: comment Created 3 years, 9 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
« no previous file with comments | « components/doodle/BUILD.gn ('k') | components/doodle/doodle_fetcher_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_DOODLE_DOODLE_FETCHER_H_ 5 #ifndef COMPONENTS_DOODLE_DOODLE_FETCHER_H_
6 #define COMPONENTS_DOODLE_DOODLE_FETCHER_H_ 6 #define COMPONENTS_DOODLE_DOODLE_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 #include "components/doodle/doodle_types.h" 10 #include "components/doodle/doodle_types.h"
(...skipping 11 matching lines...) Expand all
22 // |doodle_config| will only contain a value if |state| is AVAILABLE. 22 // |doodle_config| will only contain a value if |state| is AVAILABLE.
23 using FinishedCallback = base::OnceCallback<void( 23 using FinishedCallback = base::OnceCallback<void(
24 DoodleState state, 24 DoodleState state,
25 const base::Optional<DoodleConfig>& doodle_config)>; 25 const base::Optional<DoodleConfig>& doodle_config)>;
26 26
27 virtual ~DoodleFetcher() = default; 27 virtual ~DoodleFetcher() = default;
28 28
29 // Fetches a doodle asynchronously. The |callback| is called with a 29 // Fetches a doodle asynchronously. The |callback| is called with a
30 // DoodleState indicating whether the request succeded in fetching a doodle. 30 // DoodleState indicating whether the request succeded in fetching a doodle.
31 // If a fetch is already running, the callback will be queued and invoked with 31 // If a fetch is already running, the callback will be queued and invoked with
32 // result from the next completed request. 32 // the result from the next completed request.
33 virtual void FetchDoodle(FinishedCallback callback) = 0; 33 virtual void FetchDoodle(FinishedCallback callback) = 0;
34 }; 34 };
35 35
36 } // namespace doodle 36 } // namespace doodle
37 37
38 #endif // COMPONENTS_DOODLE_DOODLE_FETCHER_H_ 38 #endif // COMPONENTS_DOODLE_DOODLE_FETCHER_H_
OLDNEW
« no previous file with comments | « components/doodle/BUILD.gn ('k') | components/doodle/doodle_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698