OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1428 if (disabled) { | 1428 if (disabled) { |
1429 // Empty brand code means an organic install (no RLZ pings are sent). | 1429 // Empty brand code means an organic install (no RLZ pings are sent). |
1430 google_brand::chromeos::ClearBrandForCurrentSession(); | 1430 google_brand::chromeos::ClearBrandForCurrentSession(); |
1431 } | 1431 } |
1432 if (disabled != local_state->GetBoolean(prefs::kRLZDisabled)) { | 1432 if (disabled != local_state->GetBoolean(prefs::kRLZDisabled)) { |
1433 // When switching to RLZ enabled/disabled state, clear all recorded events. | 1433 // When switching to RLZ enabled/disabled state, clear all recorded events. |
1434 rlz::RLZTracker::ClearRlzState(); | 1434 rlz::RLZTracker::ClearRlzState(); |
1435 local_state->SetBoolean(prefs::kRLZDisabled, disabled); | 1435 local_state->SetBoolean(prefs::kRLZDisabled, disabled); |
1436 } | 1436 } |
1437 // Init the RLZ library. | 1437 // Init the RLZ library. |
1438 int ping_delay = profile->GetPrefs()->GetInteger( | 1438 int ping_delay = profile->GetPrefs()->GetInteger(prefs::kRlzPingDelay); |
1439 ::first_run::GetPingDelayPrefName().c_str()); | |
1440 // Negative ping delay means to send ping immediately after a first search is | 1439 // Negative ping delay means to send ping immediately after a first search is |
1441 // recorded. | 1440 // recorded. |
1442 rlz::RLZTracker::SetRlzDelegate( | 1441 rlz::RLZTracker::SetRlzDelegate( |
1443 base::WrapUnique(new ChromeRLZTrackerDelegate)); | 1442 base::WrapUnique(new ChromeRLZTrackerDelegate)); |
1444 rlz::RLZTracker::InitRlzDelayed( | 1443 rlz::RLZTracker::InitRlzDelayed( |
1445 user_manager::UserManager::Get()->IsCurrentUserNew(), ping_delay < 0, | 1444 user_manager::UserManager::Get()->IsCurrentUserNew(), ping_delay < 0, |
1446 base::TimeDelta::FromMilliseconds(abs(ping_delay)), | 1445 base::TimeDelta::FromMilliseconds(abs(ping_delay)), |
Roger Tawa OOO till Jul 10th
2017/02/24 16:02:17
This should be FromSeconds() too.
gab
2017/02/28 19:54:45
Done.
| |
1447 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile), | 1446 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile), |
1448 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile), | 1447 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile), |
1449 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile)); | 1448 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile)); |
1450 #endif | 1449 #endif |
1451 } | 1450 } |
1452 | 1451 |
1453 void UserSessionManager::InitializeCerts(Profile* profile) { | 1452 void UserSessionManager::InitializeCerts(Profile* profile) { |
1454 // Now that the user profile has been initialized | 1453 // Now that the user profile has been initialized |
1455 // |GetNSSCertDatabaseForProfile| is safe to be used. | 1454 // |GetNSSCertDatabaseForProfile| is safe to be used. |
1456 if (CertLoader::IsInitialized() && base::SysInfo::IsRunningOnChromeOS()) { | 1455 if (CertLoader::IsInitialized() && base::SysInfo::IsRunningOnChromeOS()) { |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1916 ->browser_policy_connector_chromeos() | 1915 ->browser_policy_connector_chromeos() |
1917 ->IsEnterpriseManaged()) { | 1916 ->IsEnterpriseManaged()) { |
1918 return false; | 1917 return false; |
1919 } | 1918 } |
1920 | 1919 |
1921 // Do not show end of life notification if this is a guest session | 1920 // Do not show end of life notification if this is a guest session |
1922 return !profile->IsGuestSession(); | 1921 return !profile->IsGuestSession(); |
1923 } | 1922 } |
1924 | 1923 |
1925 } // namespace chromeos | 1924 } // namespace chromeos |
OLD | NEW |