OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 // Initialize histogram synchronizer system. This is a singleton and is used | 1409 // Initialize histogram synchronizer system. This is a singleton and is used |
1410 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of | 1410 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of |
1411 // scope. Even though NewRunnableMethod does AddRef and Release, the object | 1411 // scope. Even though NewRunnableMethod does AddRef and Release, the object |
1412 // will not be deleted after the Task is executed. | 1412 // will not be deleted after the Task is executed. |
1413 scoped_refptr<HistogramSynchronizer> histogram_synchronizer( | 1413 scoped_refptr<HistogramSynchronizer> histogram_synchronizer( |
1414 new HistogramSynchronizer()); | 1414 new HistogramSynchronizer()); |
1415 | 1415 |
1416 // Initialize thread watcher system. This is a singleton and is used by | 1416 // Initialize thread watcher system. This is a singleton and is used by |
1417 // WatchDogThread to keep track of information about threads that are being | 1417 // WatchDogThread to keep track of information about threads that are being |
1418 // watched. | 1418 // watched. |
1419 scoped_ptr<ThreadWatcherList> thread_watcher_list(new ThreadWatcherList()); | 1419 scoped_ptr<ThreadWatcherList> thread_watcher_list( |
| 1420 new ThreadWatcherList(parsed_command_line)); |
1420 | 1421 |
1421 // Now the command line has been mutated based on about:flags, we can | 1422 // Now the command line has been mutated based on about:flags, we can |
1422 // set up metrics and initialize field trials. | 1423 // set up metrics and initialize field trials. |
1423 MetricsService* metrics = parts->SetupMetricsAndFieldTrials( | 1424 MetricsService* metrics = parts->SetupMetricsAndFieldTrials( |
1424 parsed_command_line, local_state); | 1425 parsed_command_line, local_state); |
1425 | 1426 |
1426 // Now that all preferences have been registered, set the install date | 1427 // Now that all preferences have been registered, set the install date |
1427 // for the uninstall metrics if this is our first run. This only actually | 1428 // for the uninstall metrics if this is our first run. This only actually |
1428 // gets used if the user has metrics reporting enabled at uninstall time. | 1429 // gets used if the user has metrics reporting enabled at uninstall time. |
1429 int64 install_date = | 1430 int64 install_date = |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1970 #if defined(OS_CHROMEOS) | 1971 #if defined(OS_CHROMEOS) |
1971 // To be precise, logout (browser shutdown) is not yet done, but the | 1972 // To be precise, logout (browser shutdown) is not yet done, but the |
1972 // remaining work is negligible, hence we say LogoutDone here. | 1973 // remaining work is negligible, hence we say LogoutDone here. |
1973 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1974 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1974 false); | 1975 false); |
1975 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1976 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1976 #endif | 1977 #endif |
1977 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1978 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
1978 return result_code; | 1979 return result_code; |
1979 } | 1980 } |
OLD | NEW |