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 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1718 if (urlref) { | 1718 if (urlref) { |
1719 google_search_default = urlref->HasGoogleBaseURLs(); | 1719 google_search_default = urlref->HasGoogleBaseURLs(); |
1720 } | 1720 } |
1721 } | 1721 } |
1722 } | 1722 } |
1723 | 1723 |
1724 bool google_search_homepage = false; | 1724 bool google_search_homepage = false; |
1725 PrefService* pref_service = profile_->GetPrefs(); | 1725 PrefService* pref_service = profile_->GetPrefs(); |
1726 if (pref_service) { | 1726 if (pref_service) { |
1727 std::string homepage = pref_service->GetString(prefs::kHomePage); | 1727 std::string homepage = pref_service->GetString(prefs::kHomePage); |
1728 google_search_homepage = | 1728 google_search_homepage = google_util::IsGoogleHomePageUrl(homepage); |
1729 homepage == GoogleURLTracker::kDefaultGoogleHomepage; | |
1730 } | 1729 } |
1731 | 1730 |
1732 RLZTracker::InitRlzDelayed(is_first_run, master_prefs_->ping_delay, | 1731 RLZTracker::InitRlzDelayed(is_first_run, master_prefs_->ping_delay, |
1733 google_search_default, google_search_homepage); | 1732 google_search_default, google_search_homepage); |
1734 | 1733 |
1735 // Prime the RLZ cache for the home page access point so that its avaiable | 1734 // Prime the RLZ cache for the home page access point so that its avaiable |
1736 // for the startup page if needed (i.e., when the startup page is set to | 1735 // for the startup page if needed (i.e., when the startup page is set to |
1737 // the home page). | 1736 // the home page). |
1738 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_HOME_PAGE, NULL); | 1737 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_HOME_PAGE, NULL); |
1739 #endif // GOOGLE_CHROME_BUILD | 1738 #endif // GOOGLE_CHROME_BUILD |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2114 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2113 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2115 (pre_read == "0" || pre_read == "1")) { | 2114 (pre_read == "0" || pre_read == "1")) { |
2116 std::string uma_name(name); | 2115 std::string uma_name(name); |
2117 uma_name += "_PreRead"; | 2116 uma_name += "_PreRead"; |
2118 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2117 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2119 AddPreReadHistogramTime(uma_name.c_str(), time); | 2118 AddPreReadHistogramTime(uma_name.c_str(), time); |
2120 } | 2119 } |
2121 #endif | 2120 #endif |
2122 #endif | 2121 #endif |
2123 } | 2122 } |
OLD | NEW |