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

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

Issue 2286903002: Remove code related to the PreReadChromeChildInBrowser field trial. (Closed)
Patch Set: Created 4 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
OLDNEW
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 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 #endif // defined(OS_CHROMEOS) 200 #endif // defined(OS_CHROMEOS)
201 201
202 // TODO(port): several win-only methods have been pulled out of this, but 202 // TODO(port): several win-only methods have been pulled out of this, but
203 // BrowserMain() as a whole needs to be broken apart so that it's usable by 203 // BrowserMain() as a whole needs to be broken apart so that it's usable by
204 // other platforms. For now, it's just a stub. This is a serious work in 204 // other platforms. For now, it's just a stub. This is a serious work in
205 // progress and should not be taken as an indication of a real refactoring. 205 // progress and should not be taken as an indication of a real refactoring.
206 206
207 #if defined(OS_WIN) 207 #if defined(OS_WIN)
208 #include "base/trace_event/trace_event_etw_export_win.h" 208 #include "base/trace_event/trace_event_etw_export_win.h"
209 #include "base/win/windows_version.h" 209 #include "base/win/windows_version.h"
210 #include "chrome/app/file_pre_reader_win.h"
211 #include "chrome/browser/chrome_browser_main_win.h" 210 #include "chrome/browser/chrome_browser_main_win.h"
212 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" 211 #include "chrome/browser/component_updater/sw_reporter_installer_win.h"
213 #include "chrome/browser/downgrade/user_data_downgrade.h" 212 #include "chrome/browser/downgrade/user_data_downgrade.h"
214 #include "chrome/browser/first_run/try_chrome_dialog_view.h" 213 #include "chrome/browser/first_run/try_chrome_dialog_view.h"
215 #include "chrome/browser/first_run/upgrade_util_win.h" 214 #include "chrome/browser/first_run/upgrade_util_win.h"
216 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" 215 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
217 #include "chrome/browser/ui/network_profile_bubble.h" 216 #include "chrome/browser/ui/network_profile_bubble.h"
218 #include "chrome/browser/win/browser_util.h" 217 #include "chrome/browser/win/browser_util.h"
219 #include "chrome/browser/win/chrome_select_file_dialog_factory.h" 218 #include "chrome/browser/win/chrome_select_file_dialog_factory.h"
220 #include "chrome/installer/util/browser_distribution.h" 219 #include "chrome/installer/util/browser_distribution.h"
221 #include "chrome/installer/util/helper.h" 220 #include "chrome/installer/util/helper.h"
222 #include "chrome/installer/util/install_util.h" 221 #include "chrome/installer/util/install_util.h"
223 #include "chrome/installer/util/module_util_win.h"
224 #include "chrome/installer/util/shell_util.h" 222 #include "chrome/installer/util/shell_util.h"
225 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win. h" 223 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win. h"
226 #include "ui/base/l10n/l10n_util_win.h" 224 #include "ui/base/l10n/l10n_util_win.h"
227 #include "ui/shell_dialogs/select_file_dialog.h" 225 #include "ui/shell_dialogs/select_file_dialog.h"
228 #endif // defined(OS_WIN) 226 #endif // defined(OS_WIN)
229 227
230 #if defined(OS_MACOSX) 228 #if defined(OS_MACOSX)
231 #include <Security/Security.h> 229 #include <Security/Security.h>
232 230
233 #include "base/mac/scoped_nsautorelease_pool.h" 231 #include "base/mac/scoped_nsautorelease_pool.h"
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 AfterStartupTaskUtils::StartMonitoringStartup(); 1552 AfterStartupTaskUtils::StartMonitoringStartup();
1555 } 1553 }
1556 1554
1557 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { 1555 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
1558 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); 1556 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl");
1559 1557
1560 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); 1558 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime");
1561 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); 1559 const base::TimeTicks start_time_step1 = base::TimeTicks::Now();
1562 1560
1563 #if defined(OS_WIN) 1561 #if defined(OS_WIN)
1564 // Pre-read chrome_child.dll.
1565 const startup_metric_utils::PreReadOptions pre_read_options =
1566 startup_metric_utils::GetPreReadOptions();
1567 if (pre_read_options.pre_read &&
1568 pre_read_options.pre_read_chrome_child_in_browser) {
1569 BrowserThread::PostTask(
1570 BrowserThread::FILE_USER_BLOCKING, FROM_HERE,
1571 base::Bind(&PreReadFile,
1572 installer::GetModulePath(installer::kChromeChildDll),
1573 pre_read_options));
1574 }
1575
1576 // Windows parental controls calls can be slow, so we do an early init here 1562 // Windows parental controls calls can be slow, so we do an early init here
1577 // that calculates this value off of the UI thread. 1563 // that calculates this value off of the UI thread.
1578 IncognitoModePrefs::InitializePlatformParentalControls(); 1564 IncognitoModePrefs::InitializePlatformParentalControls();
1579 #endif 1565 #endif
1580 1566
1581 #if defined(ENABLE_EXTENSIONS) 1567 #if defined(ENABLE_EXTENSIONS)
1582 if (!variations::GetVariationParamValue( 1568 if (!variations::GetVariationParamValue(
1583 "LightSpeed", "EarlyInitStartup").empty()) { 1569 "LightSpeed", "EarlyInitStartup").empty()) {
1584 // Try to compute this early on another thread so that we don't spend time 1570 // Try to compute this early on another thread so that we don't spend time
1585 // during profile load initializing the extensions APIs. 1571 // during profile load initializing the extensions APIs.
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 chromeos::CrosSettings::Shutdown(); 2210 chromeos::CrosSettings::Shutdown();
2225 #endif // defined(OS_CHROMEOS) 2211 #endif // defined(OS_CHROMEOS)
2226 #endif // defined(OS_ANDROID) 2212 #endif // defined(OS_ANDROID)
2227 } 2213 }
2228 2214
2229 // Public members: 2215 // Public members:
2230 2216
2231 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2217 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2232 chrome_extra_parts_.push_back(parts); 2218 chrome_extra_parts_.push_back(parts);
2233 } 2219 }
OLDNEW
« no previous file with comments | « chrome/app/main_dll_loader_win.cc ('k') | components/startup_metric_utils/common/pre_read_field_trial_utils_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698