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 <algorithm> | 10 #include <algorithm> |
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 // Set up a task to delete old WebRTC log files for all profiles. Use a delay | 1535 // Set up a task to delete old WebRTC log files for all profiles. Use a delay |
1536 // to reduce the impact on startup time. | 1536 // to reduce the impact on startup time. |
1537 BrowserThread::PostDelayedTask( | 1537 BrowserThread::PostDelayedTask( |
1538 BrowserThread::UI, | 1538 BrowserThread::UI, |
1539 FROM_HERE, | 1539 FROM_HERE, |
1540 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), | 1540 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), |
1541 base::TimeDelta::FromMinutes(1)); | 1541 base::TimeDelta::FromMinutes(1)); |
1542 #endif // defined(ENABLE_WEBRTC) | 1542 #endif // defined(ENABLE_WEBRTC) |
1543 | 1543 |
1544 #if !defined(OS_ANDROID) | 1544 #if !defined(OS_ANDROID) |
1545 // WebUSB is an experimental web API. The sites these notifications will link | 1545 if (base::FeatureList::IsEnabled(features::kWebUsb)) |
1546 // to will only work if the experiment is enabled and WebUSB feature is | |
1547 // enabled. | |
1548 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
1549 switches::kEnableExperimentalWebPlatformFeatures) && | |
1550 base::FeatureList::IsEnabled(features::kWebUsb)) { | |
1551 web_usb_detector_.reset(new WebUsbDetector()); | 1546 web_usb_detector_.reset(new WebUsbDetector()); |
1552 } | |
1553 #endif | 1547 #endif |
1554 | 1548 |
1555 // At this point, StartupBrowserCreator::Start has run creating initial | 1549 // At this point, StartupBrowserCreator::Start has run creating initial |
1556 // browser windows and tabs, but no progress has been made in loading | 1550 // browser windows and tabs, but no progress has been made in loading |
1557 // content as the main message loop hasn't started processing tasks yet. | 1551 // content as the main message loop hasn't started processing tasks yet. |
1558 // We setup to observe to the initial page load here to defer running | 1552 // We setup to observe to the initial page load here to defer running |
1559 // task posted via PostAfterStartupTask until its complete. | 1553 // task posted via PostAfterStartupTask until its complete. |
1560 AfterStartupTaskUtils::StartMonitoringStartup(); | 1554 AfterStartupTaskUtils::StartMonitoringStartup(); |
1561 } | 1555 } |
1562 | 1556 |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2230 chromeos::CrosSettings::Shutdown(); | 2224 chromeos::CrosSettings::Shutdown(); |
2231 #endif // defined(OS_CHROMEOS) | 2225 #endif // defined(OS_CHROMEOS) |
2232 #endif // defined(OS_ANDROID) | 2226 #endif // defined(OS_ANDROID) |
2233 } | 2227 } |
2234 | 2228 |
2235 // Public members: | 2229 // Public members: |
2236 | 2230 |
2237 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2231 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2238 chrome_extra_parts_.push_back(parts); | 2232 chrome_extra_parts_.push_back(parts); |
2239 } | 2233 } |
OLD | NEW |