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

Unified Diff: chrome/browser/rlz/rlz.h

Issue 11645040: RLZ on ChromeOS-related polishing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix RlzInitialized being hung Created 8 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
« no previous file with comments | « chrome/browser/chromeos/login/test_login_utils.cc ('k') | chrome/browser/rlz/rlz.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/rlz/rlz.h
diff --git a/chrome/browser/rlz/rlz.h b/chrome/browser/rlz/rlz.h
index 6d719c39575a27812efb1613af5b39bb42520a2a..23075e1a7673f32a0e63192ece8e333fdcf00e9c 100644
--- a/chrome/browser/rlz/rlz.h
+++ b/chrome/browser/rlz/rlz.h
@@ -16,6 +16,7 @@
#include "base/memory/singleton.h"
#include "base/string16.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "base/time.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "rlz/lib/rlz_lib.h"
@@ -37,14 +38,19 @@ class URLRequestContextGetter;
class RLZTracker : public content::NotificationObserver {
public:
- // Initializes the RLZ library services for use in chrome. Schedules a
- // delayed task (delayed by |delay| seconds) that performs the ping and
- // registers some events when 'first-run' is true.
+ // Initializes the RLZ library services for use in chrome. Schedules a delayed
+ // task that performs the ping and registers some events when 'first-run' is
+ // true.
+ //
+ // When |send_ping_immediately| is true, a financial ping should be sent
+ // immediately after a first search is recorded, without waiting for |delay|.
+ // However, we only want this behaviour on first run.
//
// If the chrome brand is organic (no partners) then the pings don't occur.
static bool InitRlzFromProfileDelayed(Profile* profile,
bool first_run,
- int delay);
+ bool send_ping_immediately,
+ base::TimeDelta delay);
// Records an RLZ event. Some events can be access point independent.
// Returns false it the event could not be recorded. Requires write access
@@ -92,7 +98,8 @@ class RLZTracker : public content::NotificationObserver {
// Called by InitRlzFromProfileDelayed with values taken from |profile|.
static bool InitRlzDelayed(bool first_run,
- int delay,
+ bool send_ping_immediately,
+ base::TimeDelta delay,
bool is_google_default_search,
bool is_google_homepage,
bool is_google_in_startpages);
@@ -123,7 +130,8 @@ class RLZTracker : public content::NotificationObserver {
// Implementation called from InitRlzDelayed() static method.
bool Init(bool first_run,
- int delay,
+ bool send_ping_immediately,
+ base::TimeDelta delay,
bool google_default_search,
bool google_default_homepage,
bool is_google_in_startpages);
@@ -141,7 +149,7 @@ class RLZTracker : public content::NotificationObserver {
// Schedules the delayed initialization. This method is virtual to allow
// tests to override how the scheduling is done.
- virtual void ScheduleDelayedInit(int delay);
+ virtual void ScheduleDelayedInit(base::TimeDelta delay);
// Schedules a call to rlz_lib::RecordProductEvent(). This method is virtual
// to allow tests to override how the scheduling is done.
@@ -217,7 +225,7 @@ class RLZTracker : public content::NotificationObserver {
content::NotificationRegistrar registrar_;
// Minimum delay before sending financial ping after initialization.
- int min_delay_;
+ base::TimeDelta min_init_delay_;
DISALLOW_COPY_AND_ASSIGN(RLZTracker);
};
« no previous file with comments | « chrome/browser/chromeos/login/test_login_utils.cc ('k') | chrome/browser/rlz/rlz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698