Chromium Code Reviews| 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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 571 // Must initialize metrics after labs have been converted into switches, | 571 // Must initialize metrics after labs have been converted into switches, |
| 572 // but before field trials are set up (so that client ID is available for | 572 // but before field trials are set up (so that client ID is available for |
| 573 // one-time randomized field trials). | 573 // one-time randomized field trials). |
| 574 #if defined(ARCH_CPU_64_BITS) | 574 #if defined(ARCH_CPU_64_BITS) |
| 575 MetricsLog::set_version_extension("-64"); | 575 MetricsLog::set_version_extension("-64"); |
| 576 #endif // defined(ARCH_CPU_64_BITS) | 576 #endif // defined(ARCH_CPU_64_BITS) |
| 577 | 577 |
| 578 // Initialize FieldTrialList to support FieldTrials that use one-time | 578 // Initialize FieldTrialList to support FieldTrials that use one-time |
| 579 // randomization. | 579 // randomization. |
| 580 MetricsService* metrics = browser_process_->metrics_service(); | 580 MetricsService* metrics = browser_process_->metrics_service(); |
| 581 | |
| 582 if (local_state_->GetBoolean(prefs::kMetricsCloneDetected)) | |
| 583 metrics->ResetVariationsState(); | |
|
Alexei Svitkine (slow)
2014/03/26 21:34:50
Hmm, I'd actually prefer that the logic be entirel
jwd
2014/03/28 16:23:49
Done.
| |
| 584 | |
| 581 MetricsService::ReportingState reporting_state = | 585 MetricsService::ReportingState reporting_state = |
| 582 IsMetricsReportingEnabled() ? MetricsService::REPORTING_ENABLED : | 586 IsMetricsReportingEnabled() ? MetricsService::REPORTING_ENABLED : |
| 583 MetricsService::REPORTING_DISABLED; | 587 MetricsService::REPORTING_DISABLED; |
| 584 if (reporting_state == MetricsService::REPORTING_ENABLED) | 588 if (reporting_state == MetricsService::REPORTING_ENABLED) |
| 585 metrics->ForceClientIdCreation(); // Needed below. | 589 metrics->ForceClientIdCreation(); // Needed below. |
| 586 field_trial_list_.reset( | 590 field_trial_list_.reset( |
| 587 new base::FieldTrialList( | 591 new base::FieldTrialList( |
| 588 metrics->CreateEntropyProvider(reporting_state).release())); | 592 metrics->CreateEntropyProvider(reporting_state).release())); |
| 589 | 593 |
| 590 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 594 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1695 chromeos::CrosSettings::Shutdown(); | 1699 chromeos::CrosSettings::Shutdown(); |
| 1696 #endif | 1700 #endif |
| 1697 #endif | 1701 #endif |
| 1698 } | 1702 } |
| 1699 | 1703 |
| 1700 // Public members: | 1704 // Public members: |
| 1701 | 1705 |
| 1702 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1706 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1703 chrome_extra_parts_.push_back(parts); | 1707 chrome_extra_parts_.push_back(parts); |
| 1704 } | 1708 } |
| OLD | NEW |