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

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: 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
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 483528f955f22d6ff792a440ed0b5db950fa7c8b..9f51de2fc3f352f3bb6098d10002937c4fed589c 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -312,7 +312,7 @@ class LoginUtilsImpl
// Restores GAIA auth cookies for the created profile.
void RestoreAuthCookies(Profile* user_profile);
- // 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_;
@@ -646,7 +646,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));
@@ -657,7 +657,7 @@ void LoginUtilsImpl::InitRlz(Profile* user_profile, bool disabled) {
#if defined(ENABLE_RLZ)
PrefService* local_state = g_browser_process->local_state();
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();
}
if (disabled != local_state->GetBoolean(prefs::kRLZDisabled)) {
@@ -668,8 +668,11 @@ void LoginUtilsImpl::InitRlz(Profile* user_profile, bool disabled) {
// 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
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/login/login_utils_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698