| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 if (urlref) { | 1730 if (urlref) { |
| 1731 google_search_default = urlref->HasGoogleBaseURLs(); | 1731 google_search_default = urlref->HasGoogleBaseURLs(); |
| 1732 } | 1732 } |
| 1733 } | 1733 } |
| 1734 } | 1734 } |
| 1735 | 1735 |
| 1736 bool google_search_homepage = false; | 1736 bool google_search_homepage = false; |
| 1737 PrefService* pref_service = profile_->GetPrefs(); | 1737 PrefService* pref_service = profile_->GetPrefs(); |
| 1738 if (pref_service) { | 1738 if (pref_service) { |
| 1739 std::string homepage = pref_service->GetString(prefs::kHomePage); | 1739 std::string homepage = pref_service->GetString(prefs::kHomePage); |
| 1740 google_search_homepage = | 1740 google_search_homepage = google_util::IsGoogleHomePageUrl(homepage); |
| 1741 homepage == GoogleURLTracker::kDefaultGoogleHomepage; | |
| 1742 } | 1741 } |
| 1743 | 1742 |
| 1744 RLZTracker::InitRlzDelayed(is_first_run_, master_prefs_->ping_delay, | 1743 RLZTracker::InitRlzDelayed(is_first_run_, master_prefs_->ping_delay, |
| 1745 google_search_default, google_search_homepage); | 1744 google_search_default, google_search_homepage); |
| 1746 | 1745 |
| 1747 // Prime the RLZ cache for the home page access point so that its avaiable | 1746 // Prime the RLZ cache for the home page access point so that its avaiable |
| 1748 // for the startup page if needed (i.e., when the startup page is set to | 1747 // for the startup page if needed (i.e., when the startup page is set to |
| 1749 // the home page). | 1748 // the home page). |
| 1750 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_HOME_PAGE, NULL); | 1749 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_HOME_PAGE, NULL); |
| 1751 #endif // GOOGLE_CHROME_BUILD | 1750 #endif // GOOGLE_CHROME_BUILD |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2140 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2139 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2141 (pre_read == "0" || pre_read == "1")) { | 2140 (pre_read == "0" || pre_read == "1")) { |
| 2142 std::string uma_name(name); | 2141 std::string uma_name(name); |
| 2143 uma_name += "_PreRead"; | 2142 uma_name += "_PreRead"; |
| 2144 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2143 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2145 AddPreReadHistogramTime(uma_name.c_str(), time); | 2144 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2146 } | 2145 } |
| 2147 #endif | 2146 #endif |
| 2148 #endif | 2147 #endif |
| 2149 } | 2148 } |
| OLD | NEW |