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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 #include "chrome/browser/service/service_process_control.h" | 82 #include "chrome/browser/service/service_process_control.h" |
83 #include "chrome/browser/shell_integration.h" | 83 #include "chrome/browser/shell_integration.h" |
84 #include "chrome/browser/translate/translate_manager.h" | 84 #include "chrome/browser/translate/translate_manager.h" |
85 #include "chrome/browser/ui/browser.h" | 85 #include "chrome/browser/ui/browser.h" |
86 #include "chrome/browser/ui/browser_finder.h" | 86 #include "chrome/browser/ui/browser_finder.h" |
87 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 87 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
88 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 88 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
89 #include "chrome/browser/ui/uma_browsing_activity_observer.h" | 89 #include "chrome/browser/ui/uma_browsing_activity_observer.h" |
90 #include "chrome/browser/ui/user_data_dir_dialog.h" | 90 #include "chrome/browser/ui/user_data_dir_dialog.h" |
91 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 91 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
92 #include "chrome/browser/visitedlink/visitedlink_master.h" | |
92 #include "chrome/common/child_process_logging.h" | 93 #include "chrome/common/child_process_logging.h" |
93 #include "chrome/common/chrome_constants.h" | 94 #include "chrome/common/chrome_constants.h" |
94 #include "chrome/common/chrome_paths.h" | 95 #include "chrome/common/chrome_paths.h" |
95 #include "chrome/common/chrome_result_codes.h" | 96 #include "chrome/common/chrome_result_codes.h" |
96 #include "chrome/common/chrome_switches.h" | 97 #include "chrome/common/chrome_switches.h" |
97 #include "chrome/common/env_vars.h" | 98 #include "chrome/common/env_vars.h" |
98 #include "chrome/common/jstemplate_builder.h" | 99 #include "chrome/common/jstemplate_builder.h" |
99 #include "chrome/common/logging_chrome.h" | 100 #include "chrome/common/logging_chrome.h" |
100 #include "chrome/common/metrics/variations/variations_util.h" | 101 #include "chrome/common/metrics/variations/variations_util.h" |
101 #include "chrome/common/net/net_resource_provider.h" | 102 #include "chrome/common/net/net_resource_provider.h" |
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1249 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1250 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1250 // Init the RLZ library. This just binds the dll and schedules a task on the | 1251 // Init the RLZ library. This just binds the dll and schedules a task on the |
1251 // file thread to be run sometime later. If this is the first run we record | 1252 // file thread to be run sometime later. If this is the first run we record |
1252 // the installation event. | 1253 // the installation event. |
1253 PrefService* pref_service = profile_->GetPrefs(); | 1254 PrefService* pref_service = profile_->GetPrefs(); |
1254 int ping_delay = is_first_run_ ? master_prefs_->ping_delay : | 1255 int ping_delay = is_first_run_ ? master_prefs_->ping_delay : |
1255 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); | 1256 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); |
1256 RLZTracker::InitRlzFromProfileDelayed(profile_, is_first_run_, ping_delay); | 1257 RLZTracker::InitRlzFromProfileDelayed(profile_, is_first_run_, ping_delay); |
1257 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1258 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1258 | 1259 |
1260 // Force creation of the VisitedLinkMaster so that it catches the visited | |
1261 // links in the first tab. This is a workaround for crbug.com/171475 and | |
1262 // crbug.com/160025 which require that the VisitedLinkMaster be created after | |
1263 // the importer is done, but before page navigation starts. | |
1264 // | |
1265 // TODO(caitkp): Hopefully remove this in M26 when refactoring of VisitedLink | |
brettw
2013/02/14 18:50:39
Since you're landing this on the branch only, can
Cait (Slow)
2013/02/14 20:24:53
Fixed. and yes, this is going on the branch only.
| |
1266 // code lands. | |
1267 VisitedLinkMaster::FromProfile(profile_); | |
1268 | |
1259 // Configure modules that need access to resources. | 1269 // Configure modules that need access to resources. |
1260 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1270 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
1261 | 1271 |
1262 // In unittest mode, this will do nothing. In normal mode, this will create | 1272 // In unittest mode, this will do nothing. In normal mode, this will create |
1263 // the global IntranetRedirectDetector instance, which will promptly go to | 1273 // the global IntranetRedirectDetector instance, which will promptly go to |
1264 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards | 1274 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards |
1265 // to see if it should do anything else. | 1275 // to see if it should do anything else. |
1266 // | 1276 // |
1267 // A simpler way of doing all this would be to have some function which could | 1277 // A simpler way of doing all this would be to have some function which could |
1268 // give the time elapsed since startup, and simply have this object check that | 1278 // give the time elapsed since startup, and simply have this object check that |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1674 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1684 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1675 uma_name += "_XP"; | 1685 uma_name += "_XP"; |
1676 | 1686 |
1677 uma_name += "_PreRead_"; | 1687 uma_name += "_PreRead_"; |
1678 uma_name += pre_read_percentage; | 1688 uma_name += pre_read_percentage; |
1679 AddPreReadHistogramTime(uma_name.c_str(), time); | 1689 AddPreReadHistogramTime(uma_name.c_str(), time); |
1680 } | 1690 } |
1681 #endif | 1691 #endif |
1682 #endif | 1692 #endif |
1683 } | 1693 } |
OLD | NEW |