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

Unified Diff: components/doodle/doodle_fetcher.h

Issue 2725143003: [Doodle] Pull time_to_live out of DoodleConfig (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/doodle/doodle_fetcher_impl.h » ('j') | components/doodle/doodle_fetcher_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/doodle/doodle_fetcher.h
diff --git a/components/doodle/doodle_fetcher.h b/components/doodle/doodle_fetcher.h
index f5ef780410ce5094f66e2a91b7a1ee866864035c..e7a5d2636b9243c07533f81cf6a05988f5103e45 100644
--- a/components/doodle/doodle_fetcher.h
+++ b/components/doodle/doodle_fetcher.h
@@ -9,6 +9,10 @@
#include "base/optional.h"
#include "components/doodle/doodle_types.h"
+namespace base {
+class TimeDelta;
+}
+
namespace doodle {
// Interface for fetching the current doodle from the network.
@@ -19,9 +23,11 @@ namespace doodle {
class DoodleFetcher {
public:
// Callback that is invoked when the fetching is done.
- // |doodle_config| will only contain a value if |state| is AVAILABLE.
+ // |time_to_live| will only be meaningful, and |doodle_config| will only
+ // contain a value, if |state| is AVAILABLE.
using FinishedCallback = base::OnceCallback<void(
DoodleState state,
+ base::TimeDelta time_to_live,
const base::Optional<DoodleConfig>& doodle_config)>;
Marc Treib 2017/03/02 11:42:51 As an alternative, we could wrap ttl and config in
fhorschig 2017/03/02 13:18:08 Doesn't sound too bad but I think for three parame
virtual ~DoodleFetcher() = default;
« no previous file with comments | « no previous file | components/doodle/doodle_fetcher_impl.h » ('j') | components/doodle/doodle_fetcher_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698