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

Unified Diff: components/ntp_snippets/remote/ntp_snippets_scheduler.h

Issue 2557363002: [NTP Snippets] Refactor background scheduling for remote suggestions (Closed)
Patch Set: Fixing the last changes :) Created 4 years 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
Index: components/ntp_snippets/remote/ntp_snippets_scheduler.h
diff --git a/components/ntp_snippets/remote/ntp_snippets_scheduler.h b/components/ntp_snippets/remote/ntp_snippets_scheduler.h
deleted file mode 100644
index 7a4fc1ef5c9a3379a7f110825d6c25517465d9a8..0000000000000000000000000000000000000000
--- a/components/ntp_snippets/remote/ntp_snippets_scheduler.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_SCHEDULER_H_
-#define COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_SCHEDULER_H_
-
-#include "base/macros.h"
-#include "base/time/time.h"
-
-namespace ntp_snippets {
-
-// Interface to schedule the periodic fetching of snippets.
-class NTPSnippetsScheduler {
- public:
- // Schedule periodic fetching of snippets, with different periods depending on
- // network state. The concrete implementation should call
- // NTPSnippetsService::FetchSnippets once per period.
- // Any of the periods can be zero to indicate that the corresponding task
- // should not be scheduled.
- virtual bool Schedule(base::TimeDelta period_wifi,
- base::TimeDelta period_fallback) = 0;
-
- // Cancel any scheduled tasks.
- virtual bool Unschedule() = 0;
-
- protected:
- NTPSnippetsScheduler() = default;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NTPSnippetsScheduler);
-};
-
-} // namespace ntp_snippets
-
-#endif // COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_SCHEDULER_H_
« no previous file with comments | « components/ntp_snippets/content_suggestions_service.cc ('k') | components/ntp_snippets/remote/persistent_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698