Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Side by Side Diff: chrome/browser/browser_main.cc

Issue 7791029: When the user navigates to the home page, make sure to set the RLZ string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/rlz/rlz.h » ('j') | chrome/browser/ui/browser_navigator.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser_main.h" 5 #include "chrome/browser/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 26 matching lines...) Expand all
37 #include "chrome/browser/browser_process_impl.h" 37 #include "chrome/browser/browser_process_impl.h"
38 #include "chrome/browser/browser_shutdown.h" 38 #include "chrome/browser/browser_shutdown.h"
39 #include "chrome/browser/chrome_content_browser_client.h" 39 #include "chrome/browser/chrome_content_browser_client.h"
40 #include "chrome/browser/defaults.h" 40 #include "chrome/browser/defaults.h"
41 #include "chrome/browser/extensions/extension_protocols.h" 41 #include "chrome/browser/extensions/extension_protocols.h"
42 #include "chrome/browser/extensions/extension_service.h" 42 #include "chrome/browser/extensions/extension_service.h"
43 #include "chrome/browser/extensions/extensions_startup.h" 43 #include "chrome/browser/extensions/extensions_startup.h"
44 #include "chrome/browser/first_run/first_run.h" 44 #include "chrome/browser/first_run/first_run.h"
45 #include "chrome/browser/first_run/first_run_browser_process.h" 45 #include "chrome/browser/first_run/first_run_browser_process.h"
46 #include "chrome/browser/first_run/upgrade_util.h" 46 #include "chrome/browser/first_run/upgrade_util.h"
47 #include "chrome/browser/google/google_url_tracker.h"
47 #include "chrome/browser/instant/instant_field_trial.h" 48 #include "chrome/browser/instant/instant_field_trial.h"
48 #include "chrome/browser/jankometer.h" 49 #include "chrome/browser/jankometer.h"
49 #include "chrome/browser/language_usage_metrics.h" 50 #include "chrome/browser/language_usage_metrics.h"
50 #include "chrome/browser/metrics/field_trial_synchronizer.h" 51 #include "chrome/browser/metrics/field_trial_synchronizer.h"
51 #include "chrome/browser/metrics/histogram_synchronizer.h" 52 #include "chrome/browser/metrics/histogram_synchronizer.h"
52 #include "chrome/browser/metrics/metrics_log.h" 53 #include "chrome/browser/metrics/metrics_log.h"
53 #include "chrome/browser/metrics/metrics_service.h" 54 #include "chrome/browser/metrics/metrics_service.h"
54 #include "chrome/browser/metrics/thread_watcher.h" 55 #include "chrome/browser/metrics/thread_watcher.h"
55 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" 56 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h"
56 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" 57 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h"
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 if (template_url_service) { 1874 if (template_url_service) {
1874 const TemplateURL* url_template = 1875 const TemplateURL* url_template =
1875 template_url_service->GetDefaultSearchProvider(); 1876 template_url_service->GetDefaultSearchProvider();
1876 if (url_template) { 1877 if (url_template) {
1877 const TemplateURLRef* urlref = url_template->url(); 1878 const TemplateURLRef* urlref = url_template->url();
1878 if (urlref) { 1879 if (urlref) {
1879 google_search_default = urlref->HasGoogleBaseURLs(); 1880 google_search_default = urlref->HasGoogleBaseURLs();
1880 } 1881 }
1881 } 1882 }
1882 } 1883 }
1883 // TODO(rogerta): For now, always passing false for google_homeapge_default 1884
1884 // argument, so that functionality is disabled. A follow up CL will set it 1885 bool google_search_homepage = false;
1885 // correctly. 1886 PrefService* pref_service = profile->GetPrefs();
1887 if (pref_service) {
1888 std::string homepage = pref_service->GetString(prefs::kHomePage);
sky 2011/08/30 15:56:53 I don't know enough about the install flow. If you
Roger Tawa OOO till Jul 10th 2011/08/30 16:19:31 Yes, I already checked this wit the PSO folks.
1889 google_search_homepage =
1890 homepage == GoogleURLTracker::kDefaultGoogleHomepage;
1891 }
1892
1886 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay, 1893 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay,
1887 google_search_default, false); 1894 google_search_default, google_search_homepage);
1895
1896 // Prime the RLZ cache for the home page access point so that its avaiable
1897 // for the startup page if needed (i.e., when the startup page is set to
1898 // the home page).
1899 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_HOME_PAGE, NULL);
sky 2011/08/30 15:56:53 This sounds like you're trying to work around a ra
Roger Tawa OOO till Jul 10th 2011/08/30 16:19:31 This posts a tasks to the file thread to fetch the
1900
1888 #endif // GOOGLE_CHROME_BUILD 1901 #endif // GOOGLE_CHROME_BUILD
1889 #endif // OS_WIN 1902 #endif // OS_WIN
1890 1903
1891 // Configure modules that need access to resources. 1904 // Configure modules that need access to resources.
1892 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); 1905 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
1893 1906
1894 // In unittest mode, this will do nothing. In normal mode, this will create 1907 // In unittest mode, this will do nothing. In normal mode, this will create
1895 // the global GoogleURLTracker and IntranetRedirectDetector instances, which 1908 // the global GoogleURLTracker and IntranetRedirectDetector instances, which
1896 // will promptly go to sleep for five and seven seconds, respectively (to 1909 // will promptly go to sleep for five and seven seconds, respectively (to
1897 // avoid slowing startup), and wake up afterwards to see if they should do 1910 // avoid slowing startup), and wake up afterwards to see if they should do
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2182 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2195 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2183 (pre_read == "0" || pre_read == "1")) { 2196 (pre_read == "0" || pre_read == "1")) {
2184 std::string uma_name(name); 2197 std::string uma_name(name);
2185 uma_name += "_PreRead"; 2198 uma_name += "_PreRead";
2186 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2199 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2187 AddPreReadHistogramTime(uma_name.c_str(), time); 2200 AddPreReadHistogramTime(uma_name.c_str(), time);
2188 } 2201 }
2189 #endif 2202 #endif
2190 } 2203 }
2191 2204
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/rlz/rlz.h » ('j') | chrome/browser/ui/browser_navigator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698