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