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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 1212163011: Componentize chrome/browser/rlz (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
Index: chrome/browser/chromeos/login/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 0a02b539fc9aa28117f98c2bf7e8fcd05bca168a..267573963fe8513cb98d5da84c90910554527a22 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -65,7 +65,6 @@
#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/rlz/rlz.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
#include "chrome/browser/signin/easy_unlock_service.h"
#include "chrome/browser/signin/signin_manager_factory.h"
@@ -101,6 +100,11 @@
#include "ui/base/ime/chromeos/input_method_manager.h"
#include "url/gurl.h"
+#if defined(ENABLE_RLZ)
+#include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
+#include "components/rlz/rlz_tracker.h"
+#endif
+
namespace chromeos {
namespace {
@@ -1298,7 +1302,7 @@ void UserSessionManager::InitRlzImpl(Profile* profile, bool disabled) {
}
if (disabled != local_state->GetBoolean(prefs::kRLZDisabled)) {
// When switching to RLZ enabled/disabled state, clear all recorded events.
- RLZTracker::ClearRlzState();
+ rlz::RLZTracker::ClearRlzState();
local_state->SetBoolean(prefs::kRLZDisabled, disabled);
}
// Init the RLZ library.
@@ -1306,11 +1310,14 @@ void UserSessionManager::InitRlzImpl(Profile* profile, bool disabled) {
::first_run::GetPingDelayPrefName().c_str());
// Negative ping delay means to send ping immediately after a first search is
// recorded.
- RLZTracker::InitRlzFromProfileDelayed(
- profile,
- user_manager::UserManager::Get()->IsCurrentUserNew(),
- ping_delay < 0,
- base::TimeDelta::FromMilliseconds(abs(ping_delay)));
+ rlz::RLZTracker::SetRlzDelegate(
+ make_scoped_ptr(new ChromeRLZTrackerDelegate));
+ rlz::RLZTracker::InitRlzDelayed(
+ user_manager::UserManager::Get()->IsCurrentUserNew(), ping_delay < 0,
+ base::TimeDelta::FromMilliseconds(abs(ping_delay)),
+ ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile),
+ ChromeRLZTrackerDelegate::IsGoogleHomepage(profile),
+ ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile));
#endif
}
« no previous file with comments | « chrome/browser/chromeos/login/login_utils_browsertest.cc ('k') | chrome/browser/rlz/chrome_rlz_tracker_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698