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

Unified Diff: components/rlz/rlz_tracker.h

Issue 2949263003: Remove call to GetBlockingPool in RLZ (Closed)
Patch Set: Use PostDelayedTaskWithTraits Created 3 years, 5 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 | « chrome/browser/rlz/chrome_rlz_tracker_delegate_unittest.cc ('k') | components/rlz/rlz_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rlz/rlz_tracker.h
diff --git a/components/rlz/rlz_tracker.h b/components/rlz/rlz_tracker.h
index bbf8db5f7a9699acc8fbba4e8242f823d80fd8d8..6e6009aa6c1ff341bce794832e16349dc36f576e 100644
--- a/components/rlz/rlz_tracker.h
+++ b/components/rlz/rlz_tracker.h
@@ -10,13 +10,18 @@
#include <string>
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
+#include "base/sequence_checker.h"
#include "base/strings/string16.h"
-#include "base/threading/sequenced_worker_pool.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "rlz/lib/rlz_lib.h"
+namespace base {
+class SequencedTaskRunner;
+}
+
namespace rlz {
class RLZTrackerDelegate;
@@ -205,10 +210,6 @@ class RLZTracker {
bool is_google_homepage_;
bool is_google_in_startpages_;
- // Unique sequence token so that tasks posted by RLZTracker are executed
- // sequentially in the blocking pool.
- base::SequencedWorkerPool::SequenceToken worker_pool_token_;
-
// Keeps track if the RLZ tracker has already performed its delayed
// initialization.
bool already_ran_;
@@ -231,6 +232,11 @@ class RLZTracker {
// Minimum delay before sending financial ping after initialization.
base::TimeDelta min_init_delay_;
+ // Runner for RLZ background tasks. The checked is used to verify operations
+ // occur in the correct sequence, especially in tests.
+ scoped_refptr<base::SequencedTaskRunner> background_task_runner_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(RLZTracker);
};
« no previous file with comments | « chrome/browser/rlz/chrome_rlz_tracker_delegate_unittest.cc ('k') | components/rlz/rlz_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698