| 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 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 #include "content/public/browser/notification_types.h" | 152 #include "content/public/browser/notification_types.h" |
| 153 #include "content/public/browser/site_instance.h" | 153 #include "content/public/browser/site_instance.h" |
| 154 #include "content/public/common/content_client.h" | 154 #include "content/public/common/content_client.h" |
| 155 #include "content/public/common/content_features.h" | 155 #include "content/public/common/content_features.h" |
| 156 #include "content/public/common/content_switches.h" | 156 #include "content/public/common/content_switches.h" |
| 157 #include "content/public/common/main_function_params.h" | 157 #include "content/public/common/main_function_params.h" |
| 158 #include "device/geolocation/geolocation_delegate.h" | 158 #include "device/geolocation/geolocation_delegate.h" |
| 159 #include "device/geolocation/geolocation_provider.h" | 159 #include "device/geolocation/geolocation_provider.h" |
| 160 #include "extensions/features/features.h" | 160 #include "extensions/features/features.h" |
| 161 #include "media/base/media_resources.h" | 161 #include "media/base/media_resources.h" |
| 162 #include "media/media_features.h" |
| 162 #include "net/base/net_module.h" | 163 #include "net/base/net_module.h" |
| 163 #include "net/cookies/cookie_monster.h" | 164 #include "net/cookies/cookie_monster.h" |
| 164 #include "net/http/http_network_layer.h" | 165 #include "net/http/http_network_layer.h" |
| 165 #include "net/http/http_stream_factory.h" | 166 #include "net/http/http_stream_factory.h" |
| 166 #include "net/url_request/url_request.h" | 167 #include "net/url_request/url_request.h" |
| 167 #include "printing/features/features.h" | 168 #include "printing/features/features.h" |
| 168 #include "ui/base/l10n/l10n_util.h" | 169 #include "ui/base/l10n/l10n_util.h" |
| 169 #include "ui/base/layout.h" | 170 #include "ui/base/layout.h" |
| 170 #include "ui/base/material_design/material_design_controller.h" | 171 #include "ui/base/material_design/material_design_controller.h" |
| 171 #include "ui/base/resource/resource_bundle.h" | 172 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 245 |
| 245 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) | 246 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) |
| 246 #include "printing/printed_document.h" | 247 #include "printing/printed_document.h" |
| 247 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) | 248 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) |
| 248 | 249 |
| 249 #if defined(ENABLE_RLZ) | 250 #if defined(ENABLE_RLZ) |
| 250 #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h" | 251 #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h" |
| 251 #include "components/rlz/rlz_tracker.h" | 252 #include "components/rlz/rlz_tracker.h" |
| 252 #endif // defined(ENABLE_RLZ) | 253 #endif // defined(ENABLE_RLZ) |
| 253 | 254 |
| 254 #if defined(ENABLE_WEBRTC) | 255 #if BUILDFLAG(ENABLE_WEBRTC) |
| 255 #include "chrome/browser/media/webrtc/webrtc_log_util.h" | 256 #include "chrome/browser/media/webrtc/webrtc_log_util.h" |
| 256 #endif // defined(ENABLE_WEBRTC) | 257 #endif // BUILDFLAG(ENABLE_WEBRTC) |
| 257 | 258 |
| 258 #if defined(USE_AURA) | 259 #if defined(USE_AURA) |
| 259 #include "ui/aura/env.h" | 260 #include "ui/aura/env.h" |
| 260 #endif // defined(USE_AURA) | 261 #endif // defined(USE_AURA) |
| 261 | 262 |
| 262 #if !defined(OS_ANDROID) | 263 #if !defined(OS_ANDROID) |
| 263 #include "chrome/browser/usb/web_usb_detector.h" | 264 #include "chrome/browser/usb/web_usb_detector.h" |
| 264 #endif | 265 #endif |
| 265 | 266 |
| 266 #if defined(USE_AURA) | 267 #if defined(USE_AURA) |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 } | 1377 } |
| 1377 | 1378 |
| 1378 void ChromeBrowserMainParts::PostBrowserStart() { | 1379 void ChromeBrowserMainParts::PostBrowserStart() { |
| 1379 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostBrowserStart"); | 1380 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostBrowserStart"); |
| 1380 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 1381 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 1381 chrome_extra_parts_[i]->PostBrowserStart(); | 1382 chrome_extra_parts_[i]->PostBrowserStart(); |
| 1382 #if !defined(OS_ANDROID) | 1383 #if !defined(OS_ANDROID) |
| 1383 // Allow ProcessSingleton to process messages. | 1384 // Allow ProcessSingleton to process messages. |
| 1384 process_singleton_->Unlock(); | 1385 process_singleton_->Unlock(); |
| 1385 #endif // !defined(OS_ANDROID) | 1386 #endif // !defined(OS_ANDROID) |
| 1386 #if defined(ENABLE_WEBRTC) | 1387 #if BUILDFLAG(ENABLE_WEBRTC) |
| 1387 // Set up a task to delete old WebRTC log files for all profiles. Use a delay | 1388 // Set up a task to delete old WebRTC log files for all profiles. Use a delay |
| 1388 // to reduce the impact on startup time. | 1389 // to reduce the impact on startup time. |
| 1389 BrowserThread::PostDelayedTask( | 1390 BrowserThread::PostDelayedTask( |
| 1390 BrowserThread::UI, | 1391 BrowserThread::UI, |
| 1391 FROM_HERE, | 1392 FROM_HERE, |
| 1392 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), | 1393 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), |
| 1393 base::TimeDelta::FromMinutes(1)); | 1394 base::TimeDelta::FromMinutes(1)); |
| 1394 #endif // defined(ENABLE_WEBRTC) | 1395 #endif // BUILDFLAG(ENABLE_WEBRTC) |
| 1395 | 1396 |
| 1396 #if !defined(OS_ANDROID) | 1397 #if !defined(OS_ANDROID) |
| 1397 if (base::FeatureList::IsEnabled(features::kWebUsb)) { | 1398 if (base::FeatureList::IsEnabled(features::kWebUsb)) { |
| 1398 web_usb_detector_.reset(new WebUsbDetector()); | 1399 web_usb_detector_.reset(new WebUsbDetector()); |
| 1399 BrowserThread::PostAfterStartupTask( | 1400 BrowserThread::PostAfterStartupTask( |
| 1400 FROM_HERE, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), | 1401 FROM_HERE, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
| 1401 base::Bind(&WebUsbDetector::Initialize, | 1402 base::Bind(&WebUsbDetector::Initialize, |
| 1402 base::Unretained(web_usb_detector_.get()))); | 1403 base::Unretained(web_usb_detector_.get()))); |
| 1403 } | 1404 } |
| 1404 #endif | 1405 #endif |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 chromeos::CrosSettings::Shutdown(); | 2093 chromeos::CrosSettings::Shutdown(); |
| 2093 #endif // defined(OS_CHROMEOS) | 2094 #endif // defined(OS_CHROMEOS) |
| 2094 #endif // defined(OS_ANDROID) | 2095 #endif // defined(OS_ANDROID) |
| 2095 } | 2096 } |
| 2096 | 2097 |
| 2097 // Public members: | 2098 // Public members: |
| 2098 | 2099 |
| 2099 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2100 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2100 chrome_extra_parts_.push_back(parts); | 2101 chrome_extra_parts_.push_back(parts); |
| 2101 } | 2102 } |
| OLD | NEW |