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

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

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month 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 <map> 10 #include <map>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 #include "content/public/browser/notification_registrar.h" 153 #include "content/public/browser/notification_registrar.h"
154 #include "content/public/browser/notification_service.h" 154 #include "content/public/browser/notification_service.h"
155 #include "content/public/browser/notification_types.h" 155 #include "content/public/browser/notification_types.h"
156 #include "content/public/browser/site_instance.h" 156 #include "content/public/browser/site_instance.h"
157 #include "content/public/common/content_client.h" 157 #include "content/public/common/content_client.h"
158 #include "content/public/common/content_features.h" 158 #include "content/public/common/content_features.h"
159 #include "content/public/common/content_switches.h" 159 #include "content/public/common/content_switches.h"
160 #include "content/public/common/main_function_params.h" 160 #include "content/public/common/main_function_params.h"
161 #include "device/geolocation/geolocation_delegate.h" 161 #include "device/geolocation/geolocation_delegate.h"
162 #include "device/geolocation/geolocation_provider.h" 162 #include "device/geolocation/geolocation_provider.h"
163 #include "extensions/features/features.h"
163 #include "media/base/media_resources.h" 164 #include "media/base/media_resources.h"
164 #include "net/base/net_module.h" 165 #include "net/base/net_module.h"
165 #include "net/cookies/cookie_monster.h" 166 #include "net/cookies/cookie_monster.h"
166 #include "net/http/http_network_layer.h" 167 #include "net/http/http_network_layer.h"
167 #include "net/http/http_stream_factory.h" 168 #include "net/http/http_stream_factory.h"
168 #include "net/url_request/url_request.h" 169 #include "net/url_request/url_request.h"
169 #include "printing/features/features.h" 170 #include "printing/features/features.h"
170 #include "ui/base/l10n/l10n_util.h" 171 #include "ui/base/l10n/l10n_util.h"
171 #include "ui/base/layout.h" 172 #include "ui/base/layout.h"
172 #include "ui/base/material_design/material_design_controller.h" 173 #include "ui/base/material_design/material_design_controller.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 231
231 #if !defined(DISABLE_NACL) 232 #if !defined(DISABLE_NACL)
232 #include "chrome/browser/component_updater/pnacl_component_installer.h" 233 #include "chrome/browser/component_updater/pnacl_component_installer.h"
233 #include "components/nacl/browser/nacl_process_host.h" 234 #include "components/nacl/browser/nacl_process_host.h"
234 #endif // !defined(DISABLE_NACL) 235 #endif // !defined(DISABLE_NACL)
235 236
236 #if BUILDFLAG(ENABLE_BACKGROUND) 237 #if BUILDFLAG(ENABLE_BACKGROUND)
237 #include "chrome/browser/background/background_mode_manager.h" 238 #include "chrome/browser/background/background_mode_manager.h"
238 #endif // BUILDFLAG(ENABLE_BACKGROUND) 239 #endif // BUILDFLAG(ENABLE_BACKGROUND)
239 240
240 #if defined(ENABLE_EXTENSIONS) 241 #if BUILDFLAG(ENABLE_EXTENSIONS)
241 #include "chrome/browser/extensions/startup_helper.h" 242 #include "chrome/browser/extensions/startup_helper.h"
242 #include "extensions/browser/extension_protocols.h" 243 #include "extensions/browser/extension_protocols.h"
243 #include "extensions/common/features/feature_provider.h" 244 #include "extensions/common/features/feature_provider.h"
244 #include "extensions/components/javascript_dialog_extensions_client/javascript_d ialog_extension_client_impl.h" 245 #include "extensions/components/javascript_dialog_extensions_client/javascript_d ialog_extension_client_impl.h"
245 #endif // defined(ENABLE_EXTENSIONS) 246 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
246 247
247 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) 248 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
248 #include "printing/printed_document.h" 249 #include "printing/printed_document.h"
249 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) 250 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
250 251
251 #if defined(ENABLE_RLZ) 252 #if defined(ENABLE_RLZ)
252 #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h" 253 #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
253 #include "components/rlz/rlz_tracker.h" 254 #include "components/rlz/rlz_tracker.h"
254 #endif // defined(ENABLE_RLZ) 255 #endif // defined(ENABLE_RLZ)
255 256
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 1299
1299 #if !defined(OS_ANDROID) 1300 #if !defined(OS_ANDROID)
1300 // Initialize the feedback uploader so it can setup notifications for profile 1301 // Initialize the feedback uploader so it can setup notifications for profile
1301 // creation. 1302 // creation.
1302 feedback::FeedbackProfileObserver::Initialize(); 1303 feedback::FeedbackProfileObserver::Initialize();
1303 1304
1304 // Ephemeral profiles may have been left behind if the browser crashed. 1305 // Ephemeral profiles may have been left behind if the browser crashed.
1305 g_browser_process->profile_manager()->CleanUpEphemeralProfiles(); 1306 g_browser_process->profile_manager()->CleanUpEphemeralProfiles();
1306 #endif // !defined(OS_ANDROID) 1307 #endif // !defined(OS_ANDROID)
1307 1308
1308 #if defined(ENABLE_EXTENSIONS) 1309 #if BUILDFLAG(ENABLE_EXTENSIONS)
1309 javascript_dialog_extensions_client::InstallClient(); 1310 javascript_dialog_extensions_client::InstallClient();
1310 #endif // defined(ENABLE_EXTENSIONS) 1311 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
1311 1312
1312 InstallChromeJavaScriptNativeDialogFactory(); 1313 InstallChromeJavaScriptNativeDialogFactory();
1313 } 1314 }
1314 1315
1315 void ChromeBrowserMainParts::PostProfileInit() { 1316 void ChromeBrowserMainParts::PostProfileInit() {
1316 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit"); 1317 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit");
1317 LaunchDevToolsHandlerIfNeeded(parsed_command_line()); 1318 LaunchDevToolsHandlerIfNeeded(parsed_command_line());
1318 if (parsed_command_line().HasSwitch(::switches::kAutoOpenDevToolsForTabs)) 1319 if (parsed_command_line().HasSwitch(::switches::kAutoOpenDevToolsForTabs))
1319 g_browser_process->CreateDevToolsAutoOpener(); 1320 g_browser_process->CreateDevToolsAutoOpener();
1320 1321
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 1444
1444 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); 1445 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime");
1445 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); 1446 const base::TimeTicks start_time_step1 = base::TimeTicks::Now();
1446 1447
1447 #if defined(OS_WIN) 1448 #if defined(OS_WIN)
1448 // Windows parental controls calls can be slow, so we do an early init here 1449 // Windows parental controls calls can be slow, so we do an early init here
1449 // that calculates this value off of the UI thread. 1450 // that calculates this value off of the UI thread.
1450 IncognitoModePrefs::InitializePlatformParentalControls(); 1451 IncognitoModePrefs::InitializePlatformParentalControls();
1451 #endif 1452 #endif
1452 1453
1453 #if defined(ENABLE_EXTENSIONS) 1454 #if BUILDFLAG(ENABLE_EXTENSIONS)
1454 if (!variations::GetVariationParamValue( 1455 if (!variations::GetVariationParamValue(
1455 "LightSpeed", "EarlyInitStartup").empty()) { 1456 "LightSpeed", "EarlyInitStartup").empty()) {
1456 // Try to compute this early on another thread so that we don't spend time 1457 // Try to compute this early on another thread so that we don't spend time
1457 // during profile load initializing the extensions APIs. 1458 // during profile load initializing the extensions APIs.
1458 BrowserThread::PostTask( 1459 BrowserThread::PostTask(
1459 BrowserThread::FILE_USER_BLOCKING, 1460 BrowserThread::FILE_USER_BLOCKING,
1460 FROM_HERE, 1461 FROM_HERE,
1461 base::Bind( 1462 base::Bind(
1462 base::IgnoreResult(&extensions::FeatureProvider::GetAPIFeatures))); 1463 base::IgnoreResult(&extensions::FeatureProvider::GetAPIFeatures)));
1463 } 1464 }
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 chromeos::CrosSettings::Shutdown(); 2120 chromeos::CrosSettings::Shutdown();
2120 #endif // defined(OS_CHROMEOS) 2121 #endif // defined(OS_CHROMEOS)
2121 #endif // defined(OS_ANDROID) 2122 #endif // defined(OS_ANDROID)
2122 } 2123 }
2123 2124
2124 // Public members: 2125 // Public members:
2125 2126
2126 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2127 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2127 chrome_extra_parts_.push_back(parts); 2128 chrome_extra_parts_.push_back(parts);
2128 } 2129 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/downloads_counter_browsertest.cc ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698