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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 // Register a synthetic field trial with the PreRead group used during the | 576 // Register a synthetic field trial with the PreRead group used during the |
577 // current startup. This must be done before the first metric log | 577 // current startup. This must be done before the first metric log |
578 // (metrics::MetricLog) is created. Otherwise, UMA metrics generated during | 578 // (metrics::MetricLog) is created. Otherwise, UMA metrics generated during |
579 // startup won't be correctly annotated. The current function is always called | 579 // startup won't be correctly annotated. The current function is always called |
580 // before the first metric log is created, as part of | 580 // before the first metric log is created, as part of |
581 // ChromeBrowserMainParts::PreMainMessageLoopRun(). | 581 // ChromeBrowserMainParts::PreMainMessageLoopRun(). |
582 startup_metric_utils::RegisterPreReadSyntheticFieldTrial( | 582 startup_metric_utils::RegisterPreReadSyntheticFieldTrial( |
583 registry_path, | 583 registry_path, |
584 base::Bind(&ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial)); | 584 base::Bind(&ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial)); |
585 | 585 |
586 // After startup is complete, update the pre-read group in the registry. The | 586 // Initialize the PreRead options for the current process. |
| 587 startup_metric_utils::InitializePreReadOptions(registry_path); |
| 588 |
| 589 // After startup is complete, update the PreRead group in the registry. The |
587 // group written in the registry will be used for the next startup. | 590 // group written in the registry will be used for the next startup. |
588 BrowserThread::PostAfterStartupTask( | 591 BrowserThread::PostAfterStartupTask( |
589 FROM_HERE, content::BrowserThread::GetBlockingPool(), | 592 FROM_HERE, content::BrowserThread::GetBlockingPool(), |
590 base::Bind(&startup_metric_utils::UpdatePreReadOptions, registry_path)); | 593 base::Bind(&startup_metric_utils::UpdatePreReadOptions, registry_path)); |
591 } | 594 } |
592 #endif // defined(OS_WIN) | 595 #endif // defined(OS_WIN) |
593 | 596 |
594 // This error message is not localized because we failed to load the | 597 // This error message is not localized because we failed to load the |
595 // localization data files. | 598 // localization data files. |
596 #if defined(OS_WIN) | 599 #if defined(OS_WIN) |
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 chromeos::CrosSettings::Shutdown(); | 1877 chromeos::CrosSettings::Shutdown(); |
1875 #endif // defined(OS_CHROMEOS) | 1878 #endif // defined(OS_CHROMEOS) |
1876 #endif // defined(OS_ANDROID) | 1879 #endif // defined(OS_ANDROID) |
1877 } | 1880 } |
1878 | 1881 |
1879 // Public members: | 1882 // Public members: |
1880 | 1883 |
1881 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1884 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1882 chrome_extra_parts_.push_back(parts); | 1885 chrome_extra_parts_.push_back(parts); |
1883 } | 1886 } |
OLD | NEW |