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