Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Side by Side Diff: components/metrics/metrics_service.cc

Issue 1984003002: Use low entropy for studies that send experiment IDs to Google properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/test/mock_entropy_provider.cc ('k') | components/metrics/metrics_state_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 //------------------------------------------------------------------------------ 5 //------------------------------------------------------------------------------
6 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It is 10 // A MetricsService instance is typically created at application startup. It is
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 377
378 bool MetricsService::WasLastShutdownClean() const { 378 bool MetricsService::WasLastShutdownClean() const {
379 return clean_exit_beacon_.exited_cleanly(); 379 return clean_exit_beacon_.exited_cleanly();
380 } 380 }
381 381
382 std::unique_ptr<const base::FieldTrial::EntropyProvider> 382 std::unique_ptr<const base::FieldTrial::EntropyProvider>
383 MetricsService::CreateEntropyProvider() { 383 MetricsService::CreateEntropyProvider() {
384 // TODO(asvitkine): Refactor the code so that MetricsService does not expose 384 // TODO(asvitkine): Refactor the code so that MetricsService does not expose
385 // this method. 385 // this method.
386 return state_manager_->CreateEntropyProvider(); 386 return state_manager_->CreateDefaultEntropyProvider();
387 } 387 }
388 388
389 void MetricsService::EnableRecording() { 389 void MetricsService::EnableRecording() {
390 DCHECK(IsSingleThreaded()); 390 DCHECK(IsSingleThreaded());
391 391
392 if (recording_state_ == ACTIVE) 392 if (recording_state_ == ACTIVE)
393 return; 393 return;
394 recording_state_ = ACTIVE; 394 recording_state_ = ACTIVE;
395 395
396 state_manager_->ForceClientIdCreation(); 396 state_manager_->ForceClientIdCreation();
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 base::Time::Now().ToTimeT()); 1195 base::Time::Now().ToTimeT());
1196 } 1196 }
1197 1197
1198 void MetricsService::SkipAndDiscardUpload() { 1198 void MetricsService::SkipAndDiscardUpload() {
1199 log_manager_.DiscardStagedLog(); 1199 log_manager_.DiscardStagedLog();
1200 scheduler_->UploadCancelled(); 1200 scheduler_->UploadCancelled();
1201 log_upload_in_progress_ = false; 1201 log_upload_in_progress_ = false;
1202 } 1202 }
1203 1203
1204 } // namespace metrics 1204 } // namespace metrics
OLDNEW
« no previous file with comments | « base/test/mock_entropy_provider.cc ('k') | components/metrics/metrics_state_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698