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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 11645040: RLZ on ChromeOS-related polishing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: chrome/browser/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 9bfd8694ee772013331c8de8e7f3f58d678a4d0a..cca4e6c3840712a7bf6982d71c3c855a19f0a6cd 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -302,7 +302,7 @@ class LoginUtilsImpl
void OnProfileCreated(Profile* profile,
Profile::CreateStatus status);
- // Initializes RLZ. If |disabled| is true, financial pings are turned off.
+ // Initializes RLZ. If |disabled| is true, RLZ pings are disabled.
void InitRlz(Profile* user_profile, bool disabled);
std::string password_;
@@ -609,7 +609,7 @@ void LoginUtilsImpl::InitRlzDelayed(Profile* user_profile) {
return;
}
base::PostTaskAndReplyWithResult(
- base::WorkerPool::GetTaskRunner(false /* task_is_slow */),
+ base::WorkerPool::GetTaskRunner(false),
FROM_HERE,
base::Bind(&file_util::PathExists, GetRlzDisabledFlagPath()),
base::Bind(&LoginUtilsImpl::InitRlz, AsWeakPtr(), user_profile));
@@ -619,14 +619,17 @@ void LoginUtilsImpl::InitRlzDelayed(Profile* user_profile) {
void LoginUtilsImpl::InitRlz(Profile* user_profile, bool disabled) {
#if defined(ENABLE_RLZ)
if (disabled) {
- // Empty brand code turns financial pings off.
+ // Empty brand code means an organic install (no RLZ pings are sent).
google_util::chromeos::ClearBrandForCurrentSession();
}
// Init the RLZ library.
int ping_delay = user_profile->GetPrefs()->GetInteger(
first_run::GetPingDelayPrefName().c_str());
+ // Negative ping delay means to send ping immediately after a first search is
+ // recorded.
RLZTracker::InitRlzFromProfileDelayed(
- user_profile, UserManager::Get()->IsCurrentUserNew(), ping_delay);
+ user_profile, UserManager::Get()->IsCurrentUserNew(),
+ ping_delay < 0, base::TimeDelta::FromMilliseconds(abs(ping_delay)));
if (delegate_)
delegate_->OnRlzInitialized(user_profile);
#endif

Powered by Google App Engine
This is Rietveld 408576698