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 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 // Set up a task to delete old WebRTC log files for all profiles. Use a delay | 1270 // Set up a task to delete old WebRTC log files for all profiles. Use a delay |
1271 // to reduce the impact on startup time. | 1271 // to reduce the impact on startup time. |
1272 BrowserThread::PostDelayedTask( | 1272 BrowserThread::PostDelayedTask( |
1273 BrowserThread::UI, | 1273 BrowserThread::UI, |
1274 FROM_HERE, | 1274 FROM_HERE, |
1275 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), | 1275 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), |
1276 base::TimeDelta::FromMinutes(1)); | 1276 base::TimeDelta::FromMinutes(1)); |
1277 #endif // defined(ENABLE_WEBRTC) | 1277 #endif // defined(ENABLE_WEBRTC) |
1278 | 1278 |
1279 #if !defined(OS_ANDROID) | 1279 #if !defined(OS_ANDROID) |
1280 if (base::FeatureList::IsEnabled(features::kWebUsb)) { | 1280 // WebUSB is an experimental web API. The sites these notifications will link |
| 1281 // to will only work if the experiment is enabled and WebUSB feature is |
| 1282 // enabled. |
| 1283 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1284 switches::kEnableExperimentalWebPlatformFeatures) && |
| 1285 base::FeatureList::IsEnabled(features::kWebUsb)) { |
1281 webusb_browser_client_.reset(new ChromeWebUsbBrowserClient()); | 1286 webusb_browser_client_.reset(new ChromeWebUsbBrowserClient()); |
1282 webusb_detector_.reset( | 1287 webusb_detector_.reset( |
1283 new webusb::WebUsbDetector(webusb_browser_client_.get())); | 1288 new webusb::WebUsbDetector(webusb_browser_client_.get())); |
1284 } | 1289 } |
1285 #endif | 1290 #endif |
1286 | 1291 |
1287 // At this point, StartupBrowserCreator::Start has run creating initial | 1292 // At this point, StartupBrowserCreator::Start has run creating initial |
1288 // browser windows and tabs, but no progress has been made in loading | 1293 // browser windows and tabs, but no progress has been made in loading |
1289 // content as the main message loop hasn't started processing tasks yet. | 1294 // content as the main message loop hasn't started processing tasks yet. |
1290 // We setup to observe to the initial page load here to defer running | 1295 // We setup to observe to the initial page load here to defer running |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1950 chromeos::CrosSettings::Shutdown(); | 1955 chromeos::CrosSettings::Shutdown(); |
1951 #endif // defined(OS_CHROMEOS) | 1956 #endif // defined(OS_CHROMEOS) |
1952 #endif // defined(OS_ANDROID) | 1957 #endif // defined(OS_ANDROID) |
1953 } | 1958 } |
1954 | 1959 |
1955 // Public members: | 1960 // Public members: |
1956 | 1961 |
1957 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1962 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1958 chrome_extra_parts_.push_back(parts); | 1963 chrome_extra_parts_.push_back(parts); |
1959 } | 1964 } |
OLD | NEW |