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

Unified Diff: sync/internal_api/attachments/on_disk_attachment_store.cc

Issue 751313005: Add the Sync.Attachments.StoreInitResult histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add better comments for the RESULT_SIZE constant. Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/attachments/on_disk_attachment_store.cc
diff --git a/sync/internal_api/attachments/on_disk_attachment_store.cc b/sync/internal_api/attachments/on_disk_attachment_store.cc
index 309e6101dcfbad1454509d345c1196ced953b0e7..dc51508fab233a7e927561aa37b75604a5c28b5b 100644
--- a/sync/internal_api/attachments/on_disk_attachment_store.cc
+++ b/sync/internal_api/attachments/on_disk_attachment_store.cc
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/location.h"
#include "base/memory/scoped_ptr.h"
+#include "base/metrics/histogram.h"
#include "base/sequenced_task_runner.h"
#include "sync/internal_api/attachments/proto/attachment_store.pb.h"
#include "sync/internal_api/public/attachments/attachment_util.h"
@@ -92,6 +93,8 @@ OnDiskAttachmentStore::~OnDiskAttachmentStore() {
void OnDiskAttachmentStore::Init(const InitCallback& callback) {
DCHECK(CalledOnValidThread());
Result result_code = OpenOrCreate(path_);
+ UMA_HISTOGRAM_ENUMERATION("Sync.Attachments.StoreInitResult",
+ result_code, RESULT_SIZE);
callback_task_runner_->PostTask(FROM_HERE, base::Bind(callback, result_code));
}

Powered by Google App Engine
This is Rietveld 408576698