Chromium Code Reviews| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 // This will be called after the command-line has been mutated by about:flags | 266 // This will be called after the command-line has been mutated by about:flags |
| 267 MetricsService* BrowserMainParts::SetupMetricsAndFieldTrials( | 267 MetricsService* BrowserMainParts::SetupMetricsAndFieldTrials( |
| 268 const CommandLine& parsed_command_line, | 268 const CommandLine& parsed_command_line, |
| 269 PrefService* local_state) { | 269 PrefService* local_state) { |
| 270 // Must initialize metrics after labs have been converted into switches, | 270 // Must initialize metrics after labs have been converted into switches, |
| 271 // but before field trials are set up (so that client ID is available for | 271 // but before field trials are set up (so that client ID is available for |
| 272 // one-time randomized field trials). | 272 // one-time randomized field trials). |
| 273 MetricsService* metrics = InitializeMetrics(parsed_command_line, local_state); | 273 MetricsService* metrics = InitializeMetrics(parsed_command_line, local_state); |
| 274 | 274 |
| 275 // Initialize FieldTrialList to support FieldTrials that use one-time | 275 // Initialize FieldTrialList to support FieldTrials that use one-time |
| 276 // randomization. The client ID will be empty if the user has not opted | 276 // randomization. The client ID will not be empty even if the user has not |
|
jar (doing other things)
2011/07/18 17:33:49
This appears problematic from a privacy perspectiv
| |
| 277 // to send metrics. | 277 // opted to send metrics. |
| 278 field_trial_list_.reset(new base::FieldTrialList(metrics->GetClientId())); | 278 field_trial_list_.reset( |
| 279 new base::FieldTrialList(metrics->GetClientIdNonEmpty())); | |
| 279 | 280 |
| 280 SetupFieldTrials(metrics->recording_active(), | 281 SetupFieldTrials(metrics->recording_active(), |
| 281 local_state->IsManagedPreference( | 282 local_state->IsManagedPreference( |
| 282 prefs::kMaxConnectionsPerProxy)); | 283 prefs::kMaxConnectionsPerProxy)); |
| 283 | 284 |
| 284 // Initialize FieldTrialSynchronizer system. This is a singleton and is used | 285 // Initialize FieldTrialSynchronizer system. This is a singleton and is used |
| 285 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of | 286 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of |
| 286 // scope. Even though NewRunnableMethod does AddRef and Release, the object | 287 // scope. Even though NewRunnableMethod does AddRef and Release, the object |
| 287 // will not be deleted after the Task is executed. | 288 // will not be deleted after the Task is executed. |
| 288 field_trial_synchronizer_ = new FieldTrialSynchronizer(); | 289 field_trial_synchronizer_ = new FieldTrialSynchronizer(); |
| (...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2086 #if defined(OS_CHROMEOS) | 2087 #if defined(OS_CHROMEOS) |
| 2087 // To be precise, logout (browser shutdown) is not yet done, but the | 2088 // To be precise, logout (browser shutdown) is not yet done, but the |
| 2088 // remaining work is negligible, hence we say LogoutDone here. | 2089 // remaining work is negligible, hence we say LogoutDone here. |
| 2089 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2090 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 2090 false); | 2091 false); |
| 2091 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2092 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 2092 #endif | 2093 #endif |
| 2093 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2094 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 2094 return result_code; | 2095 return result_code; |
| 2095 } | 2096 } |
| OLD | NEW |