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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 } | 1255 } |
1256 #endif // OS_WIN | 1256 #endif // OS_WIN |
1257 | 1257 |
1258 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1258 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1259 // Init the RLZ library. This just binds the dll and schedules a task on the | 1259 // Init the RLZ library. This just binds the dll and schedules a task on the |
1260 // file thread to be run sometime later. If this is the first run we record | 1260 // file thread to be run sometime later. If this is the first run we record |
1261 // the installation event. | 1261 // the installation event. |
1262 PrefService* pref_service = profile_->GetPrefs(); | 1262 PrefService* pref_service = profile_->GetPrefs(); |
1263 int ping_delay = is_first_run_ ? master_prefs_->ping_delay : | 1263 int ping_delay = is_first_run_ ? master_prefs_->ping_delay : |
1264 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); | 1264 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); |
1265 RLZTracker::InitRlzFromProfileDelayed(profile_, is_first_run_, ping_delay); | 1265 // Negative ping delay means to send ping immediately after a first search is |
| 1266 // recorded. |
| 1267 RLZTracker::InitRlzFromProfileDelayed( |
| 1268 profile_, is_first_run_, ping_delay < 0, |
| 1269 base::TimeDelta::FromMilliseconds(abs(ping_delay))); |
1266 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1270 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1267 | 1271 |
1268 // Configure modules that need access to resources. | 1272 // Configure modules that need access to resources. |
1269 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1273 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
1270 | 1274 |
1271 // In unittest mode, this will do nothing. In normal mode, this will create | 1275 // In unittest mode, this will do nothing. In normal mode, this will create |
1272 // the global IntranetRedirectDetector instance, which will promptly go to | 1276 // the global IntranetRedirectDetector instance, which will promptly go to |
1273 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards | 1277 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards |
1274 // to see if it should do anything else. | 1278 // to see if it should do anything else. |
1275 // | 1279 // |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1687 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1684 uma_name += "_XP"; | 1688 uma_name += "_XP"; |
1685 | 1689 |
1686 uma_name += "_PreRead_"; | 1690 uma_name += "_PreRead_"; |
1687 uma_name += pre_read_percentage; | 1691 uma_name += pre_read_percentage; |
1688 AddPreReadHistogramTime(uma_name.c_str(), time); | 1692 AddPreReadHistogramTime(uma_name.c_str(), time); |
1689 } | 1693 } |
1690 #endif | 1694 #endif |
1691 #endif | 1695 #endif |
1692 } | 1696 } |
OLD | NEW |