Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1735 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 1735 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 1736 base::Bind(&NetworkProfileBubble::CheckNetworkProfile, | 1736 base::Bind(&NetworkProfileBubble::CheckNetworkProfile, |
| 1737 profile_->GetPath())); | 1737 profile_->GetPath())); |
| 1738 } | 1738 } |
| 1739 #endif // defined(OS_WIN) | 1739 #endif // defined(OS_WIN) |
| 1740 | 1740 |
| 1741 #if BUILDFLAG(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1741 #if BUILDFLAG(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
| 1742 // Init the RLZ library. This just binds the dll and schedules a task on the | 1742 // Init the RLZ library. This just binds the dll and schedules a task on the |
| 1743 // file thread to be run sometime later. If this is the first run we record | 1743 // file thread to be run sometime later. If this is the first run we record |
| 1744 // the installation event. | 1744 // the installation event. |
| 1745 PrefService* pref_service = profile_->GetPrefs(); | 1745 int ping_delay = profile_->GetPrefs()->GetInteger(prefs::kRlzPingDelay); |
| 1746 int ping_delay = first_run::IsChromeFirstRun() ? master_prefs_->ping_delay : | |
| 1747 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); | |
| 1748 // Negative ping delay means to send ping immediately after a first search is | 1746 // Negative ping delay means to send ping immediately after a first search is |
| 1749 // recorded. | 1747 // recorded. |
| 1750 rlz::RLZTracker::SetRlzDelegate( | 1748 rlz::RLZTracker::SetRlzDelegate( |
| 1751 base::WrapUnique(new ChromeRLZTrackerDelegate)); | 1749 base::WrapUnique(new ChromeRLZTrackerDelegate)); |
| 1752 rlz::RLZTracker::InitRlzDelayed( | 1750 rlz::RLZTracker::InitRlzDelayed( |
| 1753 first_run::IsChromeFirstRun(), ping_delay < 0, | 1751 first_run::IsChromeFirstRun(), ping_delay < 0, |
| 1754 base::TimeDelta::FromMilliseconds(abs(ping_delay)), | 1752 base::TimeDelta::FromMilliseconds(abs(ping_delay)), |
|
Roger Tawa OOO till Jul 10th
2017/02/24 16:02:17
This should be FromSeconds() and not FromMilliseco
gab
2017/02/28 19:54:45
Done.
| |
| 1755 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile_), | 1753 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile_), |
| 1756 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile_), | 1754 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile_), |
| 1757 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile_)); | 1755 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile_)); |
| 1758 #endif // BUILDFLAG(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1756 #endif // BUILDFLAG(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
| 1759 | 1757 |
| 1760 // Configure modules that need access to resources. | 1758 // Configure modules that need access to resources. |
| 1761 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1759 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
| 1762 media::SetLocalizedStringProvider( | 1760 media::SetLocalizedStringProvider( |
| 1763 chrome_common_media::LocalizedStringProvider); | 1761 chrome_common_media::LocalizedStringProvider); |
| 1764 | 1762 |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2113 chromeos::CrosSettings::Shutdown(); | 2111 chromeos::CrosSettings::Shutdown(); |
| 2114 #endif // defined(OS_CHROMEOS) | 2112 #endif // defined(OS_CHROMEOS) |
| 2115 #endif // defined(OS_ANDROID) | 2113 #endif // defined(OS_ANDROID) |
| 2116 } | 2114 } |
| 2117 | 2115 |
| 2118 // Public members: | 2116 // Public members: |
| 2119 | 2117 |
| 2120 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2118 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2121 chrome_extra_parts_.push_back(parts); | 2119 chrome_extra_parts_.push_back(parts); |
| 2122 } | 2120 } |
| OLD | NEW |