| 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 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 // Set up a task to delete old WebRTC log files for all profiles. Use a delay | 1539 // Set up a task to delete old WebRTC log files for all profiles. Use a delay |
| 1540 // to reduce the impact on startup time. | 1540 // to reduce the impact on startup time. |
| 1541 BrowserThread::PostDelayedTask( | 1541 BrowserThread::PostDelayedTask( |
| 1542 BrowserThread::UI, | 1542 BrowserThread::UI, |
| 1543 FROM_HERE, | 1543 FROM_HERE, |
| 1544 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), | 1544 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), |
| 1545 base::TimeDelta::FromMinutes(1)); | 1545 base::TimeDelta::FromMinutes(1)); |
| 1546 #endif // defined(ENABLE_WEBRTC) | 1546 #endif // defined(ENABLE_WEBRTC) |
| 1547 | 1547 |
| 1548 #if !defined(OS_ANDROID) | 1548 #if !defined(OS_ANDROID) |
| 1549 if (base::FeatureList::IsEnabled(features::kWebUsb)) | 1549 if (base::FeatureList::IsEnabled(features::kWebUsb)) { |
| 1550 web_usb_detector_.reset(new WebUsbDetector()); | 1550 web_usb_detector_.reset(new WebUsbDetector()); |
| 1551 BrowserThread::PostAfterStartupTask( |
| 1552 FROM_HERE, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
| 1553 base::Bind(&WebUsbDetector::Initialize, |
| 1554 base::Unretained(web_usb_detector_.get()))); |
| 1555 } |
| 1551 #endif | 1556 #endif |
| 1552 | 1557 |
| 1553 // At this point, StartupBrowserCreator::Start has run creating initial | 1558 // At this point, StartupBrowserCreator::Start has run creating initial |
| 1554 // browser windows and tabs, but no progress has been made in loading | 1559 // browser windows and tabs, but no progress has been made in loading |
| 1555 // content as the main message loop hasn't started processing tasks yet. | 1560 // content as the main message loop hasn't started processing tasks yet. |
| 1556 // We setup to observe to the initial page load here to defer running | 1561 // We setup to observe to the initial page load here to defer running |
| 1557 // task posted via PostAfterStartupTask until its complete. | 1562 // task posted via PostAfterStartupTask until its complete. |
| 1558 AfterStartupTaskUtils::StartMonitoringStartup(); | 1563 AfterStartupTaskUtils::StartMonitoringStartup(); |
| 1559 } | 1564 } |
| 1560 | 1565 |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2228 chromeos::CrosSettings::Shutdown(); | 2233 chromeos::CrosSettings::Shutdown(); |
| 2229 #endif // defined(OS_CHROMEOS) | 2234 #endif // defined(OS_CHROMEOS) |
| 2230 #endif // defined(OS_ANDROID) | 2235 #endif // defined(OS_ANDROID) |
| 2231 } | 2236 } |
| 2232 | 2237 |
| 2233 // Public members: | 2238 // Public members: |
| 2234 | 2239 |
| 2235 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2240 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2236 chrome_extra_parts_.push_back(parts); | 2241 chrome_extra_parts_.push_back(parts); |
| 2237 } | 2242 } |
| OLD | NEW |