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

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
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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 base::Time::Now().ToTimeT()); 1193 base::Time::Now().ToTimeT());
1194 } 1194 }
1195 1195
1196 void MetricsService::SkipAndDiscardUpload() { 1196 void MetricsService::SkipAndDiscardUpload() {
1197 log_manager_.DiscardStagedLog(); 1197 log_manager_.DiscardStagedLog();
1198 scheduler_->UploadCancelled(); 1198 scheduler_->UploadCancelled();
1199 log_upload_in_progress_ = false; 1199 log_upload_in_progress_ = false;
1200 } 1200 }
1201 1201
1202 } // namespace metrics 1202 } // namespace metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698